A circular arc in 3-dimensional space. More...
#include <CircularArc3.h>
Public Types | |
typedef T | Number |
The number type. | |
typedef ads::FixedArray < 3, Number > | Point |
The representation of a point. | |
Public Member Functions | |
Constructors etc. | |
CircularArc3 () | |
Default constructor. Uninitialized memory. | |
CircularArc3 (const Point ¢er, const Point &source, const Point &target) | |
Construct from the center, the source, and the target. | |
CircularArc3 (const CircularArc3 &other) | |
Copy constructor. | |
CircularArc3 & | operator= (const CircularArc3 &other) |
Assignment operator. | |
~CircularArc3 () | |
Trivial destructor. | |
void | make (const Point ¢er, const Point &source, const Point &target) |
Make from the center, the source, and the target. | |
Accesors. | |
const Circle & | getCircle () const |
Return the circle. | |
const Point & | getCenter () const |
Return the center. | |
Number | getRadius () const |
Return the radius. | |
const Point & | getFirstAxis () const |
Return the first axis. | |
const Point & | getSecondAxis () const |
Return the second axis. | |
Number | getAngle () const |
Return the angle. | |
Functor. | |
Point | operator() (const Number t) const |
Evaluate a point on the circular arc. | |
Translations. | |
CircularArc3 & | operator+= (const Point &x) |
Translate by p. | |
CircularArc3 & | operator-= (const Point &x) |
Translate by -p. | |
Validity. | |
bool | isValid () const |
Return true if the circular arc is valid. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
bool | operator== (const CircularArc3< T > &x, const CircularArc3< T > &y) |
Return true if the balls are equal. | |
template<typename T > | |
bool | operator!= (const CircularArc3< T > &x, const CircularArc3< T > &y) |
Return true if the balls are not equal. | |
template<typename T > | |
CircularArc3< T > | operator+ (const CircularArc3< T > &circularArc, const typename CircularArc3< T >::Point &vector) |
Return a circular arc translated by the vector. | |
template<typename T > | |
CircularArc3< T > | operator- (const CircularArc3< T > &circularArc, const typename CircularArc3< T >::Point &vector) |
Return a circular arc translated by the negative of the vector. | |
template<typename T > | |
std::istream & | operator>> (std::istream &in, CircularArc3< T > &x) |
Read a circular arc. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, const CircularArc3< T > &x) |
Write the circular arc. |
A circular arc in 3-dimensional space.
T | is the number type. By default it is double. |
A circular arc in 3-D is defined by a circle (acenter, a normal, and a radius), two vectors which form axes in the plane of the circle and an angle. The parametrization for t in [0..1] is:
x = center + radius * (axis0 * cos(angle * t) + axis1 * sin(angle * t))
Thus the circular arc lies on the circle. It starts at the first axis and goes in the positive direction toward the second axis through the defined angle.
Point CircularArc3< T >::operator() | ( | const Number | t | ) | const [inline] |
Evaluate a point on the circular arc.
The arc is parametrized with .
bool operator!= | ( | const CircularArc3< T > & | x, | |
const CircularArc3< T > & | y | |||
) | [related] |
Return true if the balls are not equal.
CircularArc3< T > operator+ | ( | const CircularArc3< T > & | circularArc, | |
const typename CircularArc3< T >::Point & | vector | |||
) | [related] |
Return a circular arc translated by the vector.
CircularArc3< T > operator- | ( | const CircularArc3< T > & | circularArc, | |
const typename CircularArc3< T >::Point & | vector | |||
) | [related] |
Return a circular arc translated by the negative of the vector.
std::ostream & operator<< | ( | std::ostream & | out, | |
const CircularArc3< T > & | x | |||
) | [related] |
Write the circular arc.
bool operator== | ( | const CircularArc3< T > & | x, | |
const CircularArc3< T > & | y | |||
) | [related] |
Return true if the balls are equal.
References CircularArc3< T >::getAngle(), CircularArc3< T >::getCircle(), CircularArc3< T >::getFirstAxis(), and CircularArc3< T >::getSecondAxis().
std::istream & operator>> | ( | std::istream & | in, | |
CircularArc3< T > & | x | |||
) | [related] |
Read a circular arc.