Rhino C++ API
8.13
|
#include <opennurbs_torus.h>
Public Member Functions | |
ON_Torus () | |
ON_Torus (const ON_Circle &major__circle, double minor__radius) | |
ON_Torus (const ON_Plane &major__plane, double major__radius, double minor__radius) | |
~ON_Torus () | |
ON_3dVector | Axis () const |
ON_3dPoint | Center () const |
ON_3dPoint | ClosestPointTo (ON_3dPoint test_point) const |
returns point on torus that is closest to test_point More... | |
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... | |
bool | Create (const ON_Circle &major__circle, double minor__radius) |
bool | Create (const ON_Plane &major__plane, double major__radius, double minor__radius) |
int | GetNurbForm (ON_NurbsSurface &) const |
parameterization of NURBS surface does not match torus's transcendental parameterization More... | |
bool | IsValid (ON_TextLog *text_log=nullptr) const |
ON_Circle | MajorCircleDegrees (double minor_angle_degrees) const |
ON_Circle | MajorCircleRadians (double minor_angle_radians) const |
double | MajorRadius () const |
ON_Circle | MinorCircleDegrees (double major_angle_degrees) const |
ON_Circle | MinorCircleRadians (double major_angle_radians) const |
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 |
bool | Rotate (double angle_radians, const ON_3dVector &axis_of_rotation) |
bool | Rotate (double angle_radians, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation) |
rotate torus about its origin More... | |
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 | Transform (const ON_Xform &) |
bool | Translate (const ON_3dVector &) |
Public Attributes | |
double | major_radius |
More... | |
double | minor_radius |
More... | |
ON_Plane | plane |
for expert users More... | |
Description: 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 |
ON_3dPoint ON_Torus::ClosestPointTo | ( | ON_3dPoint | test_point | ) | const |
returns point on torus that is closest to test_point
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.
bool ON_Torus::Create | ( | const ON_Circle & | major__circle, |
double | minor__radius | ||
) |
bool ON_Torus::Create | ( | const ON_Plane & | major__plane, |
double | major__radius, | ||
double | minor__radius | ||
) |
int ON_Torus::GetNurbForm | ( | ON_NurbsSurface & | ) | const |
parameterization of NURBS surface does not match torus's transcendental parameterization
returns 0=failure, 2=success
bool ON_Torus::IsValid | ( | ON_TextLog * | text_log = nullptr | ) | const |
ON_Circle ON_Torus::MajorCircleDegrees | ( | double | minor_angle_degrees | ) | const |
Description: Get the circle that is the isocurve on the torus at a specified minor angle. Parameters: minor_angle_degrees - [in] Returns: A circle with normal major_circle.plane.zaxis that starts at PointAt( 0.0, minor_angle_degrees*ON_PI/180.0 ). See Also: ON_Torus::MajorCircleRadians ON_Torus::MajorCircleDegrees ON_Torus::MinorCircleRadians ON_Torus::MinorCircleDegrees
ON_Circle ON_Torus::MajorCircleRadians | ( | double | minor_angle_radians | ) | const |
Description: Get the circle that is the isocurve on the torus at a specified minor angle. Parameters: minor_angle_radians - [in] Returns: A circle with normal major_circle.plane.zaxis that starts at PointAt( 0.0, minor_angle_radians ). See Also: ON_Torus::MajorCircleRadians ON_Torus::MajorCircleDegrees ON_Torus::MinorCircleRadians ON_Torus::MinorCircleDegrees
double ON_Torus::MajorRadius | ( | ) | const |
ON_Circle ON_Torus::MinorCircleDegrees | ( | double | major_angle_degrees | ) | const |
Description: Get the minor circle that is the isocurve on the torus at a specified major angle. Parameters: major_angle_degrees - [in] Returns: A circle with radius = minor_radis, center = major_circle.PointAt(major_angle_degrees*ON_PI/180.0), and starting point PointAt( major_angle_degrees*ON_PI/180.0, 0.0 ). See Also: ON_Torus::MajorCircleRadians ON_Torus::MajorCircleDegrees ON_Torus::MinorCircleRadians ON_Torus::MinorCircleDegrees
ON_Circle ON_Torus::MinorCircleRadians | ( | double | major_angle_radians | ) | const |
Description: Get the minor circle that is the isocurve on the torus at a specified major angle. Parameters: major_angle_radians - [in] Returns: A circle with radius = minor_radis, center = major_circle.PointAt(major_angle_radians), and starting point PointAt( major_angle_radians, 0.0 ). See Also: ON_Torus::MajorCircleRadians ON_Torus::MajorCircleDegrees ON_Torus::MinorCircleRadians ON_Torus::MinorCircleDegrees
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 |
Description: Creates a surface of revolution definition of the torus. Parameters: 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 | angle_radians, |
const ON_3dVector & | axis_of_rotation | ||
) |
angle_radians | angle in radians |
axis_of_rotation | axis of rotation |
bool ON_Torus::Rotate | ( | double | angle_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
angle_radians | angle in radians |
axis_of_rotation | axis of rotation |
center_of_rotation | center of rotation |
bool ON_Torus::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation | ||
) |
rotate torus about its origin
sin_angle | sin(angle) |
cos_angle | cos(angle) |
axis_of_rotation | 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
sin_angle | sin(angle) |
cos_angle | cos(angle) |
axis_of_rotation | axis of rotation |
center_of_rotation | center of rotation |
bool ON_Torus::Transform | ( | const ON_Xform & | ) |
bool ON_Torus::Translate | ( | const ON_3dVector & | ) |
double ON_Torus::major_radius |
minor_radius
double ON_Torus::minor_radius |
0
ON_Plane ON_Torus::plane |
for expert users
major circle plane