mt
 All Classes Files Functions Enumerations Groups Pages
Public Member Functions | List of all members
mt::Circle3 Class Reference

Three-dimensional circle class. More...

#include <circle3.h>

Public Member Functions

 Circle3 ()
 Default constructor. Creates a unit circle in the xy plane.
 Circle3 (const Point3 &point, const Scalar &radius, const Unit3 &normal)
 Circle3 (const Sphere3 &sphere, const Plane3 &plane)
bool operator== (const Circle3 &c) const
bool operator!= (const Circle3 &c) const
Point3 project (const Point3 &p) const
 Projects point p on current circle.
Scalar distance (const Point3 &p) const
 Unsigned distance from point p to current circle.
Point3 getCenter () const
Point3getCenterRef ()
const Point3getCenterRef () const
Scalar getRadius () const
Scalar & getRadiusRef ()
const Scalar & getRadiusRef () const
Unit3 getNormal () const
Unit3getNormalRef ()
const Unit3getNormalRef () const
Plane3 getSupportPlane () const
void setCenter (const Point3 &center)
void setRadius (const Scalar &radius)
void setNormal (const Unit3 &normal)
void setValue (const Point3 &center, const Scalar &radius, const Unit3 &normal)
bool isSingular () const
 Returns true if circle has null radius.

Detailed Description

Three-dimensional circle class.

A circle is represented by a centerpoint, a radius, and a normal unit vector.

A point $ \mathbf{p} $ belongs to the circle $ \mathbf{C}(\mathbf{c}, r, \mathbf{\hat n}) $ if it satisfies simultaneously $ \Vert\overrightarrow{\mathbf{pc}}\Vert = r $ and $ \overrightarrow{\mathbf{pc}} \cdot \mathbf{\hat n} = 0 $, where $ \mathbf{c} $, $ r $, and $ \mathbf{\hat n} $ represent the circle centerpoint, radius, and normal, respectively.

Constructor & Destructor Documentation

mt::Circle3::Circle3 ( const Point3 point,
const Scalar &  radius,
const Unit3 normal 
)
inline

Centerpoint, radius, and normal vector constructor. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.

mt::Circle3::Circle3 ( const Sphere3 sphere,
const Plane3 plane 
)
inline

Constructor for sphere and support plane input. The circle is defined as the intersection of the two surfaces. If the intersection is null, a run-time exception is thrown.

Member Function Documentation

void mt::Circle3::setRadius ( const Scalar &  radius)
inline

Sets circle radius. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.

void mt::Circle3::setValue ( const Point3 center,
const Scalar &  radius,
const Unit3 normal 
)
inline

Sets circle parameters. Since the radius must be a positive value, its absolute value is taken (just in case) without issuing warnings or errors.


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