The torus is defined by a major circle and minor radius. The torus is parameterized by (major_angle,minor_angle). The angles are specified in radians. The domain of both parameters is (0,2pi). More...
#include <opennurbs_torus.h>
Public Member Functions | |
ON_Torus () | |
ON_Torus (const ON_Plane &major__plane, double major__radius, double minor__radius) | |
ON_Torus (const ON_Circle &major__circle, double minor__radius) | |
~ON_Torus () | |
ON_3dVector | Axis () const |
ON_3dPoint | Center () const |
bool | ClosestPointTo (ON_3dPoint test_point, double *major_angle_radians, double *minor_angle_radians) const |
returns parameters of point on torus that is closest to test_point. More... | |
ON_3dPoint | ClosestPointTo (ON_3dPoint test_point) const |
returns point on torus that is closest to test_point More... | |
bool | Create (const ON_Plane &major__plane, double major__radius, double minor__radius) |
bool | Create (const ON_Circle &major__circle, double minor__radius) |
int | GetNurbForm (ON_NurbsSurface &) const |
parameterization of NURBS surface does not match torus's transcendental paramaterization More... | |
bool | IsValid (ON_TextLog *text_log=nullptr) const |
ON_Circle | MajorCircleDegrees (double minor_angle_degrees) const |
Get the circle that is the isocurve on the torus at a specified minor angle. Parameteters: minor_angle_degrees - [in] More... | |
ON_Circle | MajorCircleRadians (double minor_angle_radians) const |
Get the circle that is the isocurve on the torus at a specified minor angle. Parameteters: minor_angle_radians - [in] More... | |
double | MajorRadius () const |
ON_Circle | MinorCircleDegrees (double major_angle_degrees) const |
Get the minor circle that is the isocurve on the torus at a specified major angle. Parameteters: major_angle_degrees - [in] More... | |
ON_Circle | MinorCircleRadians (double major_angle_radians) const |
Get the minor circle that is the isocurve on the torus at a specified major angle. Parameteters: major_angle_radians - [in] More... | |
double | MinorRadius () const |
ON_3dVector | NormalAt (double major_angle_radians, double minor_angle_radians) const |
ON_3dPoint | PointAt (double major_angle_radians, double minor_angle_radians) const |
ON_RevSurface * | RevSurfaceForm (ON_RevSurface *srf=nullptr) const |
Creates a surface of revolution definition of the torus. More... | |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation) |
rotate torus about its origin More... | |
bool | Rotate (double angle_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 torus about a point and axis More... | |
bool | Rotate (double angle_radians, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
bool | Transform (const ON_Xform &) |
bool | Translate (const ON_3dVector &) |
Public Attributes | |
double | major_radius |
double | minor_radius |
ON_Plane | plane |
for expert users More... | |
The torus is defined by a major circle and minor radius. The torus is parameterized by (major_angle,minor_angle). The angles are specified in radians. The domain of both parameters is (0,2pi).
ON_Torus::ON_Torus | ( | ) |
ON_Torus::ON_Torus | ( | const ON_Plane & | major__plane, |
double | major__radius, | ||
double | minor__radius | ||
) |
ON_Torus::ON_Torus | ( | const ON_Circle & | major__circle, |
double | minor__radius | ||
) |
ON_Torus::~ON_Torus | ( | ) |
ON_3dVector ON_Torus::Axis | ( | ) | const |
ON_3dPoint ON_Torus::Center | ( | ) | const |
bool ON_Torus::ClosestPointTo | ( | ON_3dPoint | test_point, |
double * | major_angle_radians, | ||
double * | minor_angle_radians | ||
) | const |
returns parameters of point on torus that is closest to test_point.
ON_3dPoint ON_Torus::ClosestPointTo | ( | ON_3dPoint | test_point | ) | const |
returns point on torus that is closest to test_point
bool ON_Torus::Create | ( | const ON_Plane & | major__plane, |
double | major__radius, | ||
double | minor__radius | ||
) |
bool ON_Torus::Create | ( | const ON_Circle & | major__circle, |
double | minor__radius | ||
) |
int ON_Torus::GetNurbForm | ( | ON_NurbsSurface & | ) | const |
parameterization of NURBS surface does not match torus's transcendental paramaterization
bool ON_Torus::IsValid | ( | ON_TextLog * | text_log = nullptr | ) | const |
ON_Circle ON_Torus::MajorCircleDegrees | ( | double | minor_angle_degrees | ) | const |
Get the circle that is the isocurve on the torus at a specified minor angle. Parameteters: minor_angle_degrees - [in]
ON_Circle ON_Torus::MajorCircleRadians | ( | double | minor_angle_radians | ) | const |
Get the circle that is the isocurve on the torus at a specified minor angle. Parameteters: minor_angle_radians - [in]
double ON_Torus::MajorRadius | ( | ) | const |
ON_Circle ON_Torus::MinorCircleDegrees | ( | double | major_angle_degrees | ) | const |
Get the minor circle that is the isocurve on the torus at a specified major angle. Parameteters: major_angle_degrees - [in]
ON_Circle ON_Torus::MinorCircleRadians | ( | double | major_angle_radians | ) | const |
Get the minor circle that is the isocurve on the torus at a specified major angle. Parameteters: major_angle_radians - [in]
double ON_Torus::MinorRadius | ( | ) | const |
ON_3dVector ON_Torus::NormalAt | ( | double | major_angle_radians, |
double | minor_angle_radians | ||
) | const |
ON_3dPoint ON_Torus::PointAt | ( | double | major_angle_radians, |
double | minor_angle_radians | ||
) | const |
ON_RevSurface* ON_Torus::RevSurfaceForm | ( | ON_RevSurface * | srf = nullptr | ) | const |
Creates a surface of revolution definition of the torus.
srf | [in] if not nullptr, then this srf is used. Result: A surface of revolution or nullptr if the torus is not valid. |
bool ON_Torus::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation | ||
) |
rotate torus about its origin
bool ON_Torus::Rotate | ( | double | angle_radians, |
const ON_3dVector & | axis_of_rotation | ||
) |
bool ON_Torus::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
rotate torus about a point and axis
bool ON_Torus::Rotate | ( | double | angle_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
bool ON_Torus::Transform | ( | const ON_Xform & | ) |
bool ON_Torus::Translate | ( | const ON_3dVector & | ) |
double ON_Torus::major_radius |
double ON_Torus::minor_radius |
ON_Plane ON_Torus::plane |
for expert users