2D arc.
More...
#include <Arc2D.h>
2D arc.
Definition at line 25 of file Arc2D.h.
◆ Arc2D()
Arc2D |
( |
double | x, |
|
|
double | y, |
|
|
double | radius, |
|
|
double | angle1, |
|
|
double | angle2 ) |
Constructor.
- Parameters
-
[in] | x | Center X coordinate. |
[in] | y | Center Y coordinate. |
[in] | radius | Radius. |
[in] | angle1 | Angle 1. |
[in] | angle2 | Angle 2. |
Values of angles must be from -M_PI to M_PI (as returned by atan2()).
Definition at line 14 of file Arc2D.cc.
15 :
16 Circle2D(x, y, radius),
17 m_Angle1(angle1),
18 m_Angle2(angle2)
19{
20}
◆ ~Arc2D()
Destructor.
Definition at line 22 of file Arc2D.cc.
◆ angleWithinRange()
bool angleWithinRange |
( |
double | angle | ) |
const |
Check if angle is within the arc.
- Parameters
-
[in] | angle | Angle from -M_PI to M_PI. |
Definition at line 26 of file Arc2D.cc.
27{
28 if (m_Angle2 > m_Angle1)
29 return (angle <= m_Angle2 && angle >= m_Angle1);
30 return (angle >= m_Angle1 || angle <= m_Angle2);
31}
◆ getCenter()
Get center.
Definition at line 45 of file Circle2D.h.
46 {
47 return m_Center;
48 }
◆ getInitialPoint()
Get initial point.
Definition at line 33 of file Arc2D.cc.
34{
35 HepGeom::Point3D<double> p;
36 p.setX(m_Radius * cos(m_Angle1));
37 p.setY(m_Radius * sin(m_Angle1));
38 p.setZ(0);
39 return p;
40}
◆ getRadius()
double getRadius |
( |
| ) |
const |
|
inlineinherited |
Get radius.
Definition at line 53 of file Circle2D.h.
54 {
55 return m_Radius;
56 }
◆ m_Angle1
Angle 1.
Definition at line 60 of file Arc2D.h.
◆ m_Angle2
Angle 2.
Definition at line 63 of file Arc2D.h.
◆ m_Center
◆ m_Radius
The documentation for this class was generated from the following files: