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 |
Point3 & | getCenterRef () |
const Point3 & | getCenterRef () const |
Scalar | getRadius () const |
Scalar & | getRadiusRef () |
const Scalar & | getRadiusRef () const |
Unit3 | getNormal () const |
Unit3 & | getNormalRef () |
const Unit3 & | getNormalRef () const |
Plane3 | getSupportPlane () const |
void | setCenter (const Point3 ¢er) |
void | setRadius (const Scalar &radius) |
void | setNormal (const Unit3 &normal) |
void | setValue (const Point3 ¢er, const Scalar &radius, const Unit3 &normal) |
bool | isSingular () const |
Returns true if circle has null radius. |
Three-dimensional circle class.
A circle is represented by a centerpoint, a radius, and a normal unit vector.
A point belongs to the circle
if it satisfies simultaneously
and
, where
,
, and
represent the circle centerpoint, radius, and normal, respectively.
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.
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.
|
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.
|
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.