ON_Circle is a circle in 3d. The cirle is represented by a radius and an orthonormal frame of the plane containing the circle, with origin at the center. More...
#include <opennurbs_circle.h>
Public Member Functions | |
ON_Circle ()=default | |
ON_Circle (const ON_Circle &)=default | |
ON_Circle (const ON_Plane &plane, double radius) | |
ON_Circle (const ON_3dPoint ¢er, double radius) | |
ON_Circle (const ON_Plane &plane, const ON_3dPoint ¢er, double radius) | |
ON_Circle (const ON_2dPoint &P, const ON_2dPoint &Q, const ON_2dPoint &R) | |
ON_Circle (const ON_3dPoint &P, const ON_3dPoint &Q, const ON_3dPoint &R) | |
~ON_Circle ()=default | |
ON_BoundingBox | BoundingBox () const |
const ON_3dPoint & | Center () const |
double | Circumference () const |
bool | ClosestPointTo (const ON_3dPoint &point, double *t) const |
returns parameters of point on circle that is closest to given point More... | |
ON_3dPoint | ClosestPointTo (const ON_3dPoint &point) const |
returns point on circle that is closest to given point More... | |
bool | Create (const ON_Plane &plane, double radius) |
bool | Create (const ON_3dPoint ¢er, double radius) |
bool | Create (const ON_Plane &plane, const ON_3dPoint ¢er, double radius) |
bool | Create (const ON_2dPoint &P, const ON_2dPoint &Q, const ON_2dPoint &R) |
bool | Create (const ON_3dPoint &P, const ON_3dPoint &Q, const ON_3dPoint &R) |
bool | Create (const ON_2dPoint &P, const ON_2dVector &tangent_at_P, const ON_2dPoint &Q) |
bool | Create (const ON_3dPoint &P, const ON_3dVector &tangent_at_P, const ON_3dPoint &Q) |
ON_3dVector | DerivativeAt (int, double) const |
double | Diameter () const |
double | EquationAt (const ON_2dPoint &plane_point) const |
evaluate circle's implicit equation in plane More... | |
int | GetNurbForm (ON_NurbsCurve &nurbs_curve) const |
Get a four span rational degree 2 NURBS circle representation of the circle. More... | |
bool | GetNurbFormParameterFromRadian (double circle_radians_parameter, double *nurbs_parameter) const |
Convert a circle radians parameter to a NURBS curve circle parameter. More... | |
bool | GetRadianFromNurbFormParameter (double nurbs_parameter, double *circle_radians_parameter) const |
Convert a NURBS curve circle parameter to a circle radians parameter. More... | |
bool | GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const |
Get tight bounding box. More... | |
ON_2dVector | GradientAt (const ON_2dPoint &plane_point) const |
bool | IsInPlane (const ON_Plane &, double=ON_ZERO_TOLERANCE) const |
bool UpdatePoints(); // sets m_point[] to have valid points More... | |
bool | IsValid () const |
A Valid circle has m_radius>0 and m_plane.IsValid(). More... | |
const ON_3dVector & | Normal () const |
ON_Circle & | operator= (const ON_Circle &)=default |
const ON_Plane & | Plane () const |
ON_3dPoint | PointAt (double) const |
double | Radius () const |
bool | Reverse () |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation) |
rotate circle about its center More... | |
bool | Rotate (double angle_in_radians, const ON_3dVector &axis_of_rotation) |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
rotate circle about a point and axis More... | |
bool | Rotate (double angle_in_radians, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
ON_3dVector | TangentAt (double) const |
bool | Transform (const ON_Xform &) |
bool | Translate (const ON_3dVector &delta) |
Public Attributes | |
ON_Plane | plane = ON_Plane::World_xy |
double | radius = 1.0 |
Static Public Attributes | |
static const ON_Circle | UnitCircle |
ON_Circle is a circle in 3d. The cirle is represented by a radius and an orthonormal frame of the plane containing the circle, with origin at the center.
An Is_Valid() circle has positive radius and an Is_ Valid() plane defining the frame.
The circle is parameterized by radians from 0 to 2 Pi given by t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis where center, xaxis and yaxis define the orthonormal frame of the circle's plane.
|
default |
|
default |
|
default |
ON_Circle::ON_Circle | ( | const ON_Plane & | plane, |
double | radius | ||
) |
ON_Circle::ON_Circle | ( | const ON_3dPoint & | center, |
double | radius | ||
) |
ON_Circle::ON_Circle | ( | const ON_Plane & | plane, |
const ON_3dPoint & | center, | ||
double | radius | ||
) |
ON_Circle::ON_Circle | ( | const ON_2dPoint & | P, |
const ON_2dPoint & | Q, | ||
const ON_2dPoint & | R | ||
) |
ON_Circle::ON_Circle | ( | const ON_3dPoint & | P, |
const ON_3dPoint & | Q, | ||
const ON_3dPoint & | R | ||
) |
ON_BoundingBox ON_Circle::BoundingBox | ( | ) | const |
const ON_3dPoint& ON_Circle::Center | ( | ) | const |
double ON_Circle::Circumference | ( | ) | const |
bool ON_Circle::ClosestPointTo | ( | const ON_3dPoint & | point, |
double * | t | ||
) | const |
returns parameters of point on circle that is closest to given point
ON_3dPoint ON_Circle::ClosestPointTo | ( | const ON_3dPoint & | point | ) | const |
returns point on circle that is closest to given point
bool ON_Circle::Create | ( | const ON_Plane & | plane, |
double | radius | ||
) |
bool ON_Circle::Create | ( | const ON_3dPoint & | center, |
double | radius | ||
) |
bool ON_Circle::Create | ( | const ON_Plane & | plane, |
const ON_3dPoint & | center, | ||
double | radius | ||
) |
bool ON_Circle::Create | ( | const ON_2dPoint & | P, |
const ON_2dPoint & | Q, | ||
const ON_2dPoint & | R | ||
) |
bool ON_Circle::Create | ( | const ON_3dPoint & | P, |
const ON_3dPoint & | Q, | ||
const ON_3dPoint & | R | ||
) |
bool ON_Circle::Create | ( | const ON_2dPoint & | P, |
const ON_2dVector & | tangent_at_P, | ||
const ON_2dPoint & | Q | ||
) |
bool ON_Circle::Create | ( | const ON_3dPoint & | P, |
const ON_3dVector & | tangent_at_P, | ||
const ON_3dPoint & | Q | ||
) |
ON_3dVector ON_Circle::DerivativeAt | ( | int | , |
double | |||
) | const |
double ON_Circle::Diameter | ( | ) | const |
double ON_Circle::EquationAt | ( | const ON_2dPoint & | plane_point | ) | const |
evaluate circle's implicit equation in plane
int ON_Circle::GetNurbForm | ( | ON_NurbsCurve & | nurbs_curve | ) | const |
Get a four span rational degree 2 NURBS circle representation of the circle.
Note that the parameterization of NURBS curve does not match circle's transcendental paramaterization. Use ON_Circle::GetRadianFromNurbFormParameter() and ON_Circle::GetParameterFromRadian() to convert between the NURBS curve parameter and the transcendental parameter.
bool ON_Circle::GetNurbFormParameterFromRadian | ( | double | circle_radians_parameter, |
double * | nurbs_parameter | ||
) | const |
Convert a circle radians parameter to a NURBS curve circle parameter.
circle_radians_parameter | [in] 0.0 to 2.0*ON_PI |
nurbs_parameter | [out] |
The NURBS curve parameter is with respect to the NURBS curve created by ON_Circle::GetNurbForm. At radian values of 0.0, 0.5*ON_PI, ON_PI, 1.5*ON_PI, and 2.0*ON_PI, the nurbs parameter and radian parameter are the same. At all other values the nurbs and radian parameter values are different.
bool ON_Circle::GetRadianFromNurbFormParameter | ( | double | nurbs_parameter, |
double * | circle_radians_parameter | ||
) | const |
Convert a NURBS curve circle parameter to a circle radians parameter.
nurbs_parameter | [in] |
circle_radians_parameter | [out] |
The NURBS curve parameter is with respect to the NURBS curve created by ON_Circle::GetNurbForm. At nurbs parameter values of 0.0, 0.5*ON_PI, ON_PI, 1.5*ON_PI, and 2.0*ON_PI, the nurbs parameter and radian parameter are the same. At all other values the nurbs and radian parameter values are different.
bool ON_Circle::GetTightBoundingBox | ( | ON_BoundingBox & | tight_bbox, |
bool | bGrowBox = false , |
||
const ON_Xform * | xform = nullptr |
||
) | const |
Get tight bounding box.
tight_bbox | [in/out] tight bounding box |
bGrowBox | [in] (default=false) If true and the input tight_bbox is valid, then returned tight_bbox is the union of the input tight_bbox and the arc's tight bounding box. |
xform | [in] (default=nullptr) If not nullptr, the tight bounding box of the transformed arc is calculated. The arc is not modified. |
ON_2dVector ON_Circle::GradientAt | ( | const ON_2dPoint & | plane_point | ) | const |
bool ON_Circle::IsInPlane | ( | const ON_Plane & | , |
double | = ON_ZERO_TOLERANCE |
||
) | const |
bool UpdatePoints(); // sets m_point[] to have valid points
bool ON_Circle::IsValid | ( | ) | const |
A Valid circle has m_radius>0 and m_plane.IsValid().
const ON_3dVector& ON_Circle::Normal | ( | ) | const |
const ON_Plane& ON_Circle::Plane | ( | ) | const |
ON_3dPoint ON_Circle::PointAt | ( | double | ) | const |
double ON_Circle::Radius | ( | ) | const |
bool ON_Circle::Reverse | ( | ) |
bool ON_Circle::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation | ||
) |
rotate circle about its center
bool ON_Circle::Rotate | ( | double | angle_in_radians, |
const ON_3dVector & | axis_of_rotation | ||
) |
bool ON_Circle::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
rotate circle about a point and axis
bool ON_Circle::Rotate | ( | double | angle_in_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
ON_3dVector ON_Circle::TangentAt | ( | double | ) | const |
bool ON_Circle::Transform | ( | const ON_Xform & | ) |
bool ON_Circle::Translate | ( | const ON_3dVector & | delta | ) |
ON_Plane ON_Circle::plane = ON_Plane::World_xy |
double ON_Circle::radius = 1.0 |
|
static |