1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Ipelib: IpeSegment Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.1 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="modules.html"><span>Modules</span></a></li>
12
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
16
<li><a href="annotated.html"><span>Class List</span></a></li>
17
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
18
<li><a href="functions.html"><span>Class Members</span></a></li>
20
<h1>IpeSegment Class Reference<br>
22
[<a class="el" href="group__geo.html">Ipe Geometry</a>]</small>
23
</h1><!-- doxytag: class="IpeSegment" -->A directed line segment.
24
<a href="#_details">More...</a>
26
<a href="class_ipe_segment-members.html">List of all members.</a><h2>Public Member Functions</h2>
28
<li><a class="el" href="class_ipe_segment.html#b6c757c5da52969eaafc1dbce41a7d40">IpeSegment</a> ()
29
<li><a class="anchor" name="40a27e701ebf392ecd16ac0c731fc7bb"></a><!-- doxytag: member="IpeSegment::IpeSegment" ref="40a27e701ebf392ecd16ac0c731fc7bb" args="(const IpeVector &p, const IpeVector &q)" -->
30
<b>IpeSegment</b> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &p, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &q)
31
<li><a class="el" href="class_ipe_line.html">IpeLine</a> <a class="el" href="class_ipe_segment.html#02989bdab253fcf7d649c240d2b57084">Line</a> () const
32
<li>double <a class="el" href="class_ipe_segment.html#6997785b07c9f57eafe69e28cd918b2b">Distance</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v, double bound) const
33
<li>double <a class="el" href="class_ipe_segment.html#70720cb0c7dd5b7bce0f62de66fe5662">Distance</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v) const
34
<li>bool <a class="el" href="class_ipe_segment.html#acf0bd5bafecfc07ebc89cc7811bde5b">Project</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v, <a class="el" href="class_ipe_vector.html">IpeVector</a> &projection) const
35
<li>bool <a class="el" href="class_ipe_segment.html#907fea9c22f5f377388354793c169df9">Intersects</a> (const <a class="el" href="class_ipe_segment.html">IpeSegment</a> &seg, <a class="el" href="class_ipe_vector.html">IpeVector</a> &pt) const
36
<li>bool <a class="el" href="class_ipe_segment.html#f181ff19847d81121142e73d53f46003">Intersects</a> (const <a class="el" href="class_ipe_line.html">IpeLine</a> &l, <a class="el" href="class_ipe_vector.html">IpeVector</a> &pt) const
37
<li>bool <a class="el" href="class_ipe_segment.html#e70393c41d3f17b5d5ac0233468f5e40">snap</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &mouse, <a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, double &bound) const
39
<h2>Public Attributes</h2>
41
<li><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_segment.html#fad5a767e97f481fa5cc036efead0253">iP</a>
42
<li><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_segment.html#0804957831761262d7a6d16f95624966">iQ</a>
44
<hr><a name="_details"></a><h2>Detailed Description</h2>
45
A directed line segment.
47
<hr><h2>Constructor & Destructor Documentation</h2>
48
<a class="anchor" name="b6c757c5da52969eaafc1dbce41a7d40"></a><!-- doxytag: member="IpeSegment::IpeSegment" ref="b6c757c5da52969eaafc1dbce41a7d40" args="()" -->
50
<div class="memproto">
51
<table class="memname">
53
<td class="memname">IpeSegment::IpeSegment </td>
55
<td class="paramname"> </td>
56
<td> ) </td>
57
<td width="100%"><code> [inline]</code></td>
64
Create uninitialized segment.
69
<hr><h2>Member Function Documentation</h2>
70
<a class="anchor" name="02989bdab253fcf7d649c240d2b57084"></a><!-- doxytag: member="IpeSegment::Line" ref="02989bdab253fcf7d649c240d2b57084" args="() const" -->
72
<div class="memproto">
73
<table class="memname">
75
<td class="memname"><a class="el" href="class_ipe_line.html">IpeLine</a> IpeSegment::Line </td>
77
<td class="paramname"> </td>
78
<td> ) </td>
79
<td width="100%"> const<code> [inline]</code></td>
86
Return directed line supporting the segment.
91
<a class="anchor" name="6997785b07c9f57eafe69e28cd918b2b"></a><!-- doxytag: member="IpeSegment::Distance" ref="6997785b07c9f57eafe69e28cd918b2b" args="(const IpeVector &v, double bound) const" -->
93
<div class="memproto">
94
<table class="memname">
96
<td class="memname">double IpeSegment::Distance </td>
98
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
99
<td class="paramname"> <em>v</em>, </td>
102
<td class="paramkey"></td>
104
<td class="paramtype">double </td>
105
<td class="paramname"> <em>bound</em></td><td> </td>
110
<td></td><td></td><td width="100%"> const</td>
117
Returns distance between segment and point <em>v</em>, but may just return <em>bound</em> when its larger than <em>bound</em>.
120
<a class="anchor" name="70720cb0c7dd5b7bce0f62de66fe5662"></a><!-- doxytag: member="IpeSegment::Distance" ref="70720cb0c7dd5b7bce0f62de66fe5662" args="(const IpeVector &v) const" -->
121
<div class="memitem">
122
<div class="memproto">
123
<table class="memname">
125
<td class="memname">double IpeSegment::Distance </td>
127
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
128
<td class="paramname"> <em>v</em> </td>
129
<td> ) </td>
130
<td width="100%"> const</td>
137
Returns distance between segment and point <em>v</em>
140
<a class="anchor" name="acf0bd5bafecfc07ebc89cc7811bde5b"></a><!-- doxytag: member="IpeSegment::Project" ref="acf0bd5bafecfc07ebc89cc7811bde5b" args="(const IpeVector &v, IpeVector &projection) const" -->
141
<div class="memitem">
142
<div class="memproto">
143
<table class="memname">
145
<td class="memname">bool IpeSegment::Project </td>
147
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
148
<td class="paramname"> <em>v</em>, </td>
151
<td class="paramkey"></td>
153
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
154
<td class="paramname"> <em>projection</em></td><td> </td>
159
<td></td><td></td><td width="100%"> const</td>
166
Project point <em>v</em> orthogonally on segment. Returns false if the point falls outside the segment.
169
<a class="anchor" name="907fea9c22f5f377388354793c169df9"></a><!-- doxytag: member="IpeSegment::Intersects" ref="907fea9c22f5f377388354793c169df9" args="(const IpeSegment &seg, IpeVector &pt) const" -->
170
<div class="memitem">
171
<div class="memproto">
172
<table class="memname">
174
<td class="memname">bool IpeSegment::Intersects </td>
176
<td class="paramtype">const <a class="el" href="class_ipe_segment.html">IpeSegment</a> & </td>
177
<td class="paramname"> <em>seg</em>, </td>
180
<td class="paramkey"></td>
182
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
183
<td class="paramname"> <em>pt</em></td><td> </td>
188
<td></td><td></td><td width="100%"> const</td>
195
Compute intersection point. Return <code>false</code> if segs don't intersect.
200
<a class="anchor" name="f181ff19847d81121142e73d53f46003"></a><!-- doxytag: member="IpeSegment::Intersects" ref="f181ff19847d81121142e73d53f46003" args="(const IpeLine &l, IpeVector &pt) const" -->
201
<div class="memitem">
202
<div class="memproto">
203
<table class="memname">
205
<td class="memname">bool IpeSegment::Intersects </td>
207
<td class="paramtype">const <a class="el" href="class_ipe_line.html">IpeLine</a> & </td>
208
<td class="paramname"> <em>l</em>, </td>
211
<td class="paramkey"></td>
213
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
214
<td class="paramname"> <em>pt</em></td><td> </td>
219
<td></td><td></td><td width="100%"> const</td>
226
Compute intersection point. Return <code>false</code> if no intersection.
231
<a class="anchor" name="e70393c41d3f17b5d5ac0233468f5e40"></a><!-- doxytag: member="IpeSegment::snap" ref="e70393c41d3f17b5d5ac0233468f5e40" args="(const IpeVector &mouse, IpeVector &pos, double &bound) const" -->
232
<div class="memitem">
233
<div class="memproto">
234
<table class="memname">
236
<td class="memname">bool IpeSegment::snap </td>
238
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
239
<td class="paramname"> <em>mouse</em>, </td>
242
<td class="paramkey"></td>
244
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
245
<td class="paramname"> <em>pos</em>, </td>
248
<td class="paramkey"></td>
250
<td class="paramtype">double & </td>
251
<td class="paramname"> <em>bound</em></td><td> </td>
256
<td></td><td></td><td width="100%"> const</td>
263
Snap mouse position to this segment.
265
If distance between <em>mouse</em> and the segment is less than <em>bound</em>, then set <em>pos</em> to the point on the segment, <em>bound</em> to the distance, and return true.
268
<hr><h2>Member Data Documentation</h2>
269
<a class="anchor" name="fad5a767e97f481fa5cc036efead0253"></a><!-- doxytag: member="IpeSegment::iP" ref="fad5a767e97f481fa5cc036efead0253" args="" -->
270
<div class="memitem">
271
<div class="memproto">
272
<table class="memname">
274
<td class="memname"><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_segment.html#fad5a767e97f481fa5cc036efead0253">IpeSegment::iP</a> </td>
286
<a class="anchor" name="0804957831761262d7a6d16f95624966"></a><!-- doxytag: member="IpeSegment::iQ" ref="0804957831761262d7a6d16f95624966" args="" -->
287
<div class="memitem">
288
<div class="memproto">
289
<table class="memname">
291
<td class="memname"><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_segment.html#0804957831761262d7a6d16f95624966">IpeSegment::iQ</a> </td>
303
<hr>The documentation for this class was generated from the following files:<ul>
304
<li>ipegeo.h<li>ipegeo.cpp</ul>