1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>Ipelib: ipe::Arc Class Reference</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10
<!-- Generated by Doxygen 1.6.1 -->
11
<div class="navigation" id="top">
14
<li><a href="index.html"><span>Main Page</span></a></li>
15
<li><a href="modules.html"><span>Modules</span></a></li>
16
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
17
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
22
<li><a href="annotated.html"><span>Class List</span></a></li>
23
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
24
<li><a href="functions.html"><span>Class Members</span></a></li>
27
<div class="navpath"><a class="el" href="namespaceipe.html">ipe</a>::<a class="el" href="classipe_1_1_arc.html">Arc</a>
30
<div class="contents">
31
<h1>ipe::Arc Class Reference<br/>
33
[<a class="el" href="group__geo.html">Ipe Geometry</a>]</small>
34
</h1><!-- doxytag: class="ipe::Arc" -->
35
<p>An arc of an ellipse.
36
<a href="#_details">More...</a></p>
38
<p><code>#include <ipegeo.h></code></p>
40
<p><a href="classipe_1_1_arc-members.html">List of all members.</a></p>
41
<h2>Public Member Functions</h2>
43
<li><a class="el" href="classipe_1_1_arc.html#aa716b2571912afd9d6fb4cbe5cf252cb">Arc</a> ()
44
<li><a class="el" href="classipe_1_1_arc.html#a334447e755980e1cb2364ee834a5d274">Arc</a> (const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> &m, <a class="el" href="classipe_1_1_angle.html">Angle</a> alpha, <a class="el" href="classipe_1_1_angle.html">Angle</a> beta)
45
<li><a class="el" href="classipe_1_1_arc.html#ac52297ca4a1a27372cdfab8c4aac0752">Arc</a> (const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> &m)
46
<li><a class="el" href="classipe_1_1_arc.html#a29c7c631073f864e1804ef7bd9a2153d">Arc</a> (const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> &m0, const <a class="el" href="classipe_1_1_vector.html">Vector</a> &begp, const <a class="el" href="classipe_1_1_vector.html">Vector</a> &endp)
47
<li>bool <a class="el" href="classipe_1_1_arc.html#ae7074652d0e72daea931cf827734eafb">isEllipse</a> () const
48
<li>double <a class="el" href="classipe_1_1_arc.html#a9701124ade10da6035c51afe5bc2f484">distance</a> (const <a class="el" href="classipe_1_1_vector.html">Vector</a> &v, double bound) const
49
<li>double <a class="el" href="classipe_1_1_arc.html#adacd3e8686d3361c3c8b438fff10c977">distance</a> (const <a class="el" href="classipe_1_1_vector.html">Vector</a> &v, double bound, <a class="el" href="classipe_1_1_vector.html">Vector</a> &pos, <a class="el" href="classipe_1_1_angle.html">Angle</a> &angle) const
50
<li><a class="el" href="classipe_1_1_rect.html">Rect</a> <a class="el" href="classipe_1_1_arc.html#a0c8afda61aa391f8e0d23b2f4c2582c4">bbox</a> () const
51
<li><a class="el" href="classipe_1_1_vector.html">Vector</a> <a class="el" href="classipe_1_1_arc.html#a4965ff77ddb1ab99adf1f5aa7014448f">beginp</a> () const
52
<li><a class="el" href="classipe_1_1_vector.html">Vector</a> <a class="el" href="classipe_1_1_arc.html#ab075755dc66899252847c68523990f9e">endp</a> () const
53
<li>void <a class="el" href="classipe_1_1_arc.html#abd603df341ffd27e4f86e523c743e6de">intersect</a> (const <a class="el" href="classipe_1_1_line.html">Line</a> &l, std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > &result) const
54
<li>void <a class="el" href="classipe_1_1_arc.html#a866b85ff868b68c7027e16930fb711c3">intersect</a> (const <a class="el" href="classipe_1_1_segment.html">Segment</a> &s, std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > &result) const
55
<li>void <a class="el" href="classipe_1_1_arc.html#acdd2deb8b7dd275b25febe98ef8ea9f9">intersect</a> (const <a class="el" href="classipe_1_1_arc.html">Arc</a> &a, std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > &result) const
56
<li>void <a class="el" href="classipe_1_1_arc.html#aab9e11810102ff192ef22e1843ab3157">intersect</a> (const <a class="el" href="classipe_1_1_bezier.html">Bezier</a> &b, std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > &result) const
58
<h2>Public Attributes</h2>
60
<li><a class="el" href="classipe_1_1_matrix.html">Matrix</a> <a class="el" href="classipe_1_1_arc.html#a4859fd3dc9cd1c91f71f8e687daae9eb">iM</a>
61
<li><a class="el" href="classipe_1_1_angle.html">Angle</a> <a class="el" href="classipe_1_1_arc.html#ae89d897d07c9da4993eb98cd970252b0">iAlpha</a>
62
<li><a class="el" href="classipe_1_1_angle.html">Angle</a> <a class="el" href="classipe_1_1_arc.html#ad0ea849ecef4fe7d3e17b9a8a70fe89f">iBeta</a>
64
<hr/><a name="_details"></a><h2>Detailed Description</h2>
65
<p>An arc of an ellipse. </p>
66
<p>The ellipse is represented using the matrix that transforms the unit circle x^2 + y^2 = 1 to the desired ellipse. The arc coordinate system is the coordinate system of this unit circle.</p>
67
<p>A full ellipse is described by iAlpha = 0, iBeta = IpeTwoPi.</p>
68
<p>An elliptic arc is the image of the circular arc from iAlpha to iBeta (in increasing angle in arc coordinate system). </p>
69
<hr/><h2>Constructor & Destructor Documentation</h2>
70
<a class="anchor" id="aa716b2571912afd9d6fb4cbe5cf252cb"></a><!-- doxytag: member="ipe::Arc::Arc" ref="aa716b2571912afd9d6fb4cbe5cf252cb" args="()" -->
72
<div class="memproto">
73
<table class="memname">
75
<td class="memname">ipe::Arc::Arc </td>
77
<td class="paramname"></td>
78
<td> ) </td>
79
<td><code> [inline]</code></td>
85
<p>Construct unit circle. </p>
89
<a class="anchor" id="a334447e755980e1cb2364ee834a5d274"></a><!-- doxytag: member="ipe::Arc::Arc" ref="a334447e755980e1cb2364ee834a5d274" args="(const Matrix &m, Angle alpha, Angle beta)" -->
91
<div class="memproto">
92
<table class="memname">
94
<td class="memname">ipe::Arc::Arc </td>
96
<td class="paramtype">const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> & </td>
97
<td class="paramname"> <em>m</em>, </td>
100
<td class="paramkey"></td>
102
<td class="paramtype"><a class="el" href="classipe_1_1_angle.html">Angle</a> </td>
103
<td class="paramname"> <em>alpha</em>, </td>
106
<td class="paramkey"></td>
108
<td class="paramtype"><a class="el" href="classipe_1_1_angle.html">Angle</a> </td>
109
<td class="paramname"> <em>beta</em></td><td> </td>
114
<td></td><td></td><td><code> [inline]</code></td>
120
<p>Construct with given parameters. </p>
124
<a class="anchor" id="ac52297ca4a1a27372cdfab8c4aac0752"></a><!-- doxytag: member="ipe::Arc::Arc" ref="ac52297ca4a1a27372cdfab8c4aac0752" args="(const Matrix &m)" -->
125
<div class="memitem">
126
<div class="memproto">
127
<table class="memname">
129
<td class="memname">ipe::Arc::Arc </td>
131
<td class="paramtype">const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> & </td>
132
<td class="paramname"> <em>m</em></td>
133
<td> ) </td>
134
<td><code> [inline]</code></td>
140
<p>Construct an ellipse. </p>
144
<a class="anchor" id="a29c7c631073f864e1804ef7bd9a2153d"></a><!-- doxytag: member="ipe::Arc::Arc" ref="a29c7c631073f864e1804ef7bd9a2153d" args="(const Matrix &m0, const Vector &begp, const Vector &endp)" -->
145
<div class="memitem">
146
<div class="memproto">
147
<table class="memname">
149
<td class="memname">Arc::Arc </td>
151
<td class="paramtype">const <a class="el" href="classipe_1_1_matrix.html">Matrix</a> & </td>
152
<td class="paramname"> <em>m</em>, </td>
155
<td class="paramkey"></td>
157
<td class="paramtype">const <a class="el" href="classipe_1_1_vector.html">Vector</a> & </td>
158
<td class="paramname"> <em>begp</em>, </td>
161
<td class="paramkey"></td>
163
<td class="paramtype">const <a class="el" href="classipe_1_1_vector.html">Vector</a> & </td>
164
<td class="paramname"> <em>endp</em></td><td> </td>
169
<td></td><td></td><td></td>
175
<p>Construct arc for ellipse defined by m, from begp to endp. </p>
176
<p>This assumes that <em>m</em> has been correctly computed such that <em>begb</em> and <em>endp</em> already lie on the ellipse. </p>
180
<hr/><h2>Member Function Documentation</h2>
181
<a class="anchor" id="ae7074652d0e72daea931cf827734eafb"></a><!-- doxytag: member="ipe::Arc::isEllipse" ref="ae7074652d0e72daea931cf827734eafb" args="() const " -->
182
<div class="memitem">
183
<div class="memproto">
184
<table class="memname">
186
<td class="memname">bool ipe::Arc::isEllipse </td>
188
<td class="paramname"></td>
189
<td> ) </td>
190
<td> const<code> [inline]</code></td>
196
<p>Is this an entire ellipse? </p>
200
<a class="anchor" id="a9701124ade10da6035c51afe5bc2f484"></a><!-- doxytag: member="ipe::Arc::distance" ref="a9701124ade10da6035c51afe5bc2f484" args="(const Vector &v, double bound) const " -->
201
<div class="memitem">
202
<div class="memproto">
203
<table class="memname">
205
<td class="memname">double Arc::distance </td>
207
<td class="paramtype">const <a class="el" href="classipe_1_1_vector.html">Vector</a> & </td>
208
<td class="paramname"> <em>v</em>, </td>
211
<td class="paramkey"></td>
213
<td class="paramtype">double </td>
214
<td class="paramname"> <em>bound</em></td><td> </td>
219
<td></td><td></td><td> const</td>
225
<p>This doesn't really compute the distance, but a reasonable approximation. </p>
229
<a class="anchor" id="adacd3e8686d3361c3c8b438fff10c977"></a><!-- doxytag: member="ipe::Arc::distance" ref="adacd3e8686d3361c3c8b438fff10c977" args="(const Vector &v, double bound, Vector &pos, Angle &angle) const " -->
230
<div class="memitem">
231
<div class="memproto">
232
<table class="memname">
234
<td class="memname">double Arc::distance </td>
236
<td class="paramtype">const <a class="el" href="classipe_1_1_vector.html">Vector</a> & </td>
237
<td class="paramname"> <em>v</em>, </td>
240
<td class="paramkey"></td>
242
<td class="paramtype">double </td>
243
<td class="paramname"> <em>bound</em>, </td>
246
<td class="paramkey"></td>
248
<td class="paramtype"><a class="el" href="classipe_1_1_vector.html">Vector</a> & </td>
249
<td class="paramname"> <em>pos</em>, </td>
252
<td class="paramkey"></td>
254
<td class="paramtype"><a class="el" href="classipe_1_1_angle.html">Angle</a> & </td>
255
<td class="paramname"> <em>angle</em></td><td> </td>
260
<td></td><td></td><td> const</td>
265
<p>Like <a class="el" href="classipe_1_1_arc.html#a9701124ade10da6035c51afe5bc2f484" title="This doesn't really compute the distance, but a reasonable approximation.">distance()</a>, but sets pos to point on arc and angle to its angle in arc coordinates. <em>angle</em> and <em>pos</em> are not modified if result is larger than bound. </p>
269
<a class="anchor" id="a0c8afda61aa391f8e0d23b2f4c2582c4"></a><!-- doxytag: member="ipe::Arc::bbox" ref="a0c8afda61aa391f8e0d23b2f4c2582c4" args="() const " -->
270
<div class="memitem">
271
<div class="memproto">
272
<table class="memname">
274
<td class="memname"><a class="el" href="classipe_1_1_rect.html">Rect</a> Arc::bbox </td>
276
<td class="paramname"></td>
277
<td> ) </td>
284
<p>Return a tight bounding box. </p>
288
<a class="anchor" id="a4965ff77ddb1ab99adf1f5aa7014448f"></a><!-- doxytag: member="ipe::Arc::beginp" ref="a4965ff77ddb1ab99adf1f5aa7014448f" args="() const " -->
289
<div class="memitem">
290
<div class="memproto">
291
<table class="memname">
293
<td class="memname"><a class="el" href="classipe_1_1_vector.html">Vector</a> ipe::Arc::beginp </td>
295
<td class="paramname"></td>
296
<td> ) </td>
297
<td> const<code> [inline]</code></td>
303
<p>Return begin point of arc. </p>
307
<a class="anchor" id="ab075755dc66899252847c68523990f9e"></a><!-- doxytag: member="ipe::Arc::endp" ref="ab075755dc66899252847c68523990f9e" args="() const " -->
308
<div class="memitem">
309
<div class="memproto">
310
<table class="memname">
312
<td class="memname"><a class="el" href="classipe_1_1_vector.html">Vector</a> ipe::Arc::endp </td>
314
<td class="paramname"></td>
315
<td> ) </td>
316
<td> const<code> [inline]</code></td>
322
<p>Return end point of arc. </p>
326
<a class="anchor" id="abd603df341ffd27e4f86e523c743e6de"></a><!-- doxytag: member="ipe::Arc::intersect" ref="abd603df341ffd27e4f86e523c743e6de" args="(const Line &l, std::vector< Vector > &result) const " -->
327
<div class="memitem">
328
<div class="memproto">
329
<table class="memname">
331
<td class="memname">void Arc::intersect </td>
333
<td class="paramtype">const <a class="el" href="classipe_1_1_line.html">Line</a> & </td>
334
<td class="paramname"> <em>l</em>, </td>
337
<td class="paramkey"></td>
339
<td class="paramtype">std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > & </td>
340
<td class="paramname"> <em>result</em></td><td> </td>
345
<td></td><td></td><td> const</td>
351
<p>Compute intersection points of <a class="el" href="classipe_1_1_arc.html" title="An arc of an ellipse.">Arc</a> with <a class="el" href="classipe_1_1_line.html" title="A directed line.">Line</a>. </p>
355
<a class="anchor" id="a866b85ff868b68c7027e16930fb711c3"></a><!-- doxytag: member="ipe::Arc::intersect" ref="a866b85ff868b68c7027e16930fb711c3" args="(const Segment &s, std::vector< Vector > &result) const " -->
356
<div class="memitem">
357
<div class="memproto">
358
<table class="memname">
360
<td class="memname">void Arc::intersect </td>
362
<td class="paramtype">const <a class="el" href="classipe_1_1_segment.html">Segment</a> & </td>
363
<td class="paramname"> <em>s</em>, </td>
366
<td class="paramkey"></td>
368
<td class="paramtype">std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > & </td>
369
<td class="paramname"> <em>result</em></td><td> </td>
374
<td></td><td></td><td> const</td>
380
<p>Compute intersection points of <a class="el" href="classipe_1_1_arc.html" title="An arc of an ellipse.">Arc</a> with <a class="el" href="classipe_1_1_segment.html" title="A directed line segment.">Segment</a>. </p>
384
<a class="anchor" id="acdd2deb8b7dd275b25febe98ef8ea9f9"></a><!-- doxytag: member="ipe::Arc::intersect" ref="acdd2deb8b7dd275b25febe98ef8ea9f9" args="(const Arc &a, std::vector< Vector > &result) const " -->
385
<div class="memitem">
386
<div class="memproto">
387
<table class="memname">
389
<td class="memname">void Arc::intersect </td>
391
<td class="paramtype">const <a class="el" href="classipe_1_1_arc.html">Arc</a> & </td>
392
<td class="paramname"> <em>a</em>, </td>
395
<td class="paramkey"></td>
397
<td class="paramtype">std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > & </td>
398
<td class="paramname"> <em>result</em></td><td> </td>
403
<td></td><td></td><td> const</td>
409
<p>Compute intersection points of <a class="el" href="classipe_1_1_arc.html" title="An arc of an ellipse.">Arc</a> with <a class="el" href="classipe_1_1_arc.html" title="An arc of an ellipse.">Arc</a>. </p>
413
<a class="anchor" id="aab9e11810102ff192ef22e1843ab3157"></a><!-- doxytag: member="ipe::Arc::intersect" ref="aab9e11810102ff192ef22e1843ab3157" args="(const Bezier &b, std::vector< Vector > &result) const " -->
414
<div class="memitem">
415
<div class="memproto">
416
<table class="memname">
418
<td class="memname">void Arc::intersect </td>
420
<td class="paramtype">const <a class="el" href="classipe_1_1_bezier.html">Bezier</a> & </td>
421
<td class="paramname"> <em>b</em>, </td>
424
<td class="paramkey"></td>
426
<td class="paramtype">std::vector< <a class="el" href="classipe_1_1_vector.html">Vector</a> > & </td>
427
<td class="paramname"> <em>result</em></td><td> </td>
432
<td></td><td></td><td> const</td>
438
<p>Compute intersection points of <a class="el" href="classipe_1_1_arc.html" title="An arc of an ellipse.">Arc</a> with <a class="el" href="classipe_1_1_bezier.html" title="A cubic Bezier spline.">Bezier</a>. </p>
442
<hr/><h2>Member Data Documentation</h2>
443
<a class="anchor" id="a4859fd3dc9cd1c91f71f8e687daae9eb"></a><!-- doxytag: member="ipe::Arc::iM" ref="a4859fd3dc9cd1c91f71f8e687daae9eb" args="" -->
444
<div class="memitem">
445
<div class="memproto">
446
<table class="memname">
448
<td class="memname"><a class="el" href="classipe_1_1_matrix.html">Matrix</a> <a class="el" href="classipe_1_1_arc.html#a4859fd3dc9cd1c91f71f8e687daae9eb">ipe::Arc::iM</a></td>
456
<a class="anchor" id="ae89d897d07c9da4993eb98cd970252b0"></a><!-- doxytag: member="ipe::Arc::iAlpha" ref="ae89d897d07c9da4993eb98cd970252b0" args="" -->
457
<div class="memitem">
458
<div class="memproto">
459
<table class="memname">
461
<td class="memname"><a class="el" href="classipe_1_1_angle.html">Angle</a> <a class="el" href="classipe_1_1_arc.html#ae89d897d07c9da4993eb98cd970252b0">ipe::Arc::iAlpha</a></td>
469
<a class="anchor" id="ad0ea849ecef4fe7d3e17b9a8a70fe89f"></a><!-- doxytag: member="ipe::Arc::iBeta" ref="ad0ea849ecef4fe7d3e17b9a8a70fe89f" args="" -->
470
<div class="memitem">
471
<div class="memproto">
472
<table class="memname">
474
<td class="memname"><a class="el" href="classipe_1_1_angle.html">Angle</a> <a class="el" href="classipe_1_1_arc.html#ad0ea849ecef4fe7d3e17b9a8a70fe89f">ipe::Arc::iBeta</a></td>
482
<hr/>The documentation for this class was generated from the following files:<ul>