Belle II Software development
Arc2D Class Reference

2D arc. More...

#include <Arc2D.h>

Inheritance diagram for Arc2D:
Circle2D

Public Member Functions

 Arc2D (double x, double y, double radius, double angle1, double angle2)
 Constructor.
 
 ~Arc2D ()
 Destructor.
 
bool angleWithinRange (double angle) const
 Check if angle is within the arc.
 
HepGeom::Point3D< double > getInitialPoint () const
 Get initial point.
 
const HepGeom::Point3D< double > & getCenter () const
 Get center.
 
double getRadius () const
 Get radius.
 

Protected Attributes

HepGeom::Point3D< double > m_Center
 Center.
 
double m_Radius
 Radius.
 

Private Attributes

double m_Angle1
 Angle 1.
 
double m_Angle2
 Angle 2.
 

Detailed Description

2D arc.

Definition at line 25 of file Arc2D.h.

Constructor & Destructor Documentation

◆ Arc2D()

Arc2D ( double  x,
double  y,
double  radius,
double  angle1,
double  angle2 
)

Constructor.

Parameters
[in]xCenter X coordinate.
[in]yCenter Y coordinate.
[in]radiusRadius.
[in]angle1Angle 1.
[in]angle2Angle 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}
double m_Angle2
Angle 2.
Definition: Arc2D.h:63
double m_Angle1
Angle 1.
Definition: Arc2D.h:60
Circle2D(double x, double y, double radius)
Constructor.
Definition: Circle2D.cc:14

◆ ~Arc2D()

~Arc2D ( )

Destructor.

Definition at line 22 of file Arc2D.cc.

23{
24}

Member Function Documentation

◆ angleWithinRange()

bool angleWithinRange ( double  angle) const

Check if angle is within the arc.

Parameters
[in]angleAngle 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()

const HepGeom::Point3D< double > & getCenter ( ) const
inlineinherited

Get center.

Definition at line 45 of file Circle2D.h.

46 {
47 return m_Center;
48 }
HepGeom::Point3D< double > m_Center
Center.
Definition: Circle2D.h:61

◆ getInitialPoint()

HepGeom::Point3D< double > getInitialPoint ( ) const

Get initial point.

Definition at line 33 of file Arc2D.cc.

34{
36 p.setX(m_Radius * cos(m_Angle1));
37 p.setY(m_Radius * sin(m_Angle1));
38 p.setZ(0);
39 return p;
40}
double m_Radius
Radius.
Definition: Circle2D.h:64

◆ getRadius()

double getRadius ( ) const
inlineinherited

Get radius.

Definition at line 53 of file Circle2D.h.

54 {
55 return m_Radius;
56 }

Member Data Documentation

◆ m_Angle1

double m_Angle1
private

Angle 1.

Definition at line 60 of file Arc2D.h.

◆ m_Angle2

double m_Angle2
private

Angle 2.

Definition at line 63 of file Arc2D.h.

◆ m_Center

HepGeom::Point3D<double> m_Center
protectedinherited

Center.

Definition at line 61 of file Circle2D.h.

◆ m_Radius

double m_Radius
protectedinherited

Radius.

Definition at line 64 of file Circle2D.h.


The documentation for this class was generated from the following files: