Core 1.0
Public Member Functions | Protected Attributes | Friends | List of all members
CircleArc Class Reference

Circle arcs in three dimensions. More...

#include <circlearc.h>

Inheritance diagram for CircleArc:
Circle

Public Member Functions

 CircleArc ()
 Empty.
 
 CircleArc (const Vector &, const Vector &, const double &, const Vector &, const Vector &)
 Creates a circle arc. More...
 
 CircleArc (const Vector &, const Vector &, const Vector &)
 Creates a circle arc given three vertices. More...
 
 ~CircleArc ()
 Empty.
 
void Rotate (const Matrix &)
 Rotates the arc. More...
 
void Translate (const Vector &)
 Translates the arc. More...
 
void Scale (const double &)
 Uniformly scales a circle. More...
 
Box GetBox () const
 Compute the axis aligned bounding box of a circle.
 
Vector Normal (const Vector &) const
 Compute the distance vector between a circular arc and a given point. More...
 
double R (const Vector &) const
 Compute the squared distance between a point and the circurlar arc. More...
 

Protected Attributes

Vector b
 End points of arc.
 
Vector nab
 Slab vectors.
 
- Protected Attributes inherited from Circle
Vector c = Vector::Null
 Center of the circle.
 
Vector axis = Vector::Z
 Axis.
 
double r = 1.0
 Radius.
 

Friends

std::ostream & operator<< (std::ostream &, const Circle &)
 Overloaded. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Circle
 Circle ()
 Empty.
 
 Circle (const double &)
 Creates a circle. More...
 
 Circle (const Vector &, const Vector &, const double &)
 Creates a circle. More...
 
 Circle (const Vector &, const Vector &, const Vector &)
 Creates a circle given three vertices. More...
 
 ~Circle ()
 Empty.
 
bool Intersect (const Ray &, double &) const
 Compute the ray-disc intersection. More...
 
Vector Center () const
 Gets the center of a circle.
 
Vector Axis () const
 Axis of the circle.
 
double Radius () const
 Radius of the circle.
 
double R (const Vector &) const
 Compute the distance between a point and a circle. More...
 
Vector Normal (const Vector &) const
 Computes the distance vector between a circle and a point. More...
 
void Rotate (const Matrix &)
 Rotates a circle. More...
 
void Translate (const Vector &)
 Transltes a circle. More...
 
void Scale (const double &)
 Uniformly scales a circle. More...
 
Box GetBox () const
 Compute the axis aligned bounding box of a circle. More...
 
double Area () const
 Area of a circle. More...
 
Vector RandomInside (Random &=Random::R239) const
 Generate a random vector inside the circle. More...
 
Vector RandomOn (Random &=Random::R239) const
 Generate a random vector on the circle. More...
 
- Static Protected Member Functions inherited from Circle
static double Area (const double &)
 Area of a circle given its radius. More...
 
- Static Protected Attributes inherited from Circle
static constexpr const double epsilon = 1.0e-10
 Internal epsilon constant.
 

Detailed Description

Circle arcs in three dimensions.

Constructor & Destructor Documentation

◆ CircleArc() [1/2]

CircleArc::CircleArc ( const Vector c,
const Vector axis,
const double &  r,
const Vector a,
const Vector b 
)
explicit

Creates a circle arc.

Parameters
cCenter.
axisAxis, which should be normalized.
rRadius.
a,bEnd points.

◆ CircleArc() [2/2]

CircleArc::CircleArc ( const Vector x,
const Vector y,
const Vector z 
)
explicit

Creates a circle arc given three vertices.

Parameters
x,y,zPoints on the circle.

Member Function Documentation

◆ Normal()

Vector CircleArc::Normal ( const Vector p) const

Compute the distance vector between a circular arc and a given point.

Parameters
pPoint.

◆ R()

double CircleArc::R ( const Vector p) const

Compute the squared distance between a point and the circurlar arc.

Parameters
pPoint.

◆ Rotate()

void CircleArc::Rotate ( const Matrix r)

Rotates the arc.

Parameters
rRotation matrix.

◆ Scale()

void CircleArc::Scale ( const double &  s)

Uniformly scales a circle.

Parameters
sScaling factor.

◆ Translate()

void CircleArc::Translate ( const Vector t)

Translates the arc.

Parameters
tTranslation vector.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  s,
const Circle circle 
)
friend

Overloaded.

Parameters
sStream.
circleThe circle.