#include <opennurbs_line.h>
Public Member Functions | |
ON_Triangle ()=default | |
ON_Triangle (const ON_3dPoint vertices[3]) | |
ON_Triangle (const ON_3dPoint &a, const ON_3dPoint &b, const ON_3dPoint &c) | |
ON_Triangle (double x) | |
ON_Triangle (const ON_Triangle &tri)=default | |
~ON_Triangle ()=default | |
double | Area () const |
ON_BoundingBox | BoundingBox () const |
Get Triangles 3d axis aligned bounding box. More... | |
bool | ClosestPointTo (const ON_3dPoint &test_point, double *s1, double *s2) const |
Find the point on the triangle that is closest to the test_point. More... | |
ON_3dPoint | ClosestPointTo (const ON_3dPoint &test_point) const |
Find the point on the triangle that is closest to the test_point. More... | |
void | Create (const ON_3dPoint vertices[3]) |
Create a Triangle from three points. More... | |
void | Create (const ON_3dPoint &a, const ON_3dPoint &b, const ON_3dPoint &c) |
Create a Triangle from three points. More... | |
double | DistanceTo (const ON_3dPoint &test_point) const |
Find the point on the triangle that is closest to the test_point. More... | |
ON_Line | Edge (int i) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, int bGrowBox=false) const |
Get line's 3d axis aligned bounding box or the union of the input box with the object's bounding box. More... | |
bool | GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const |
Get tight bounding box with respect to a given frame More... | |
bool | IsDegenerate (double tol=ON_ZERO_TOLERANCE) const |
bool | IsValid () const |
ON_3dVector | Normal () const |
operator const ON_3dPoint * () const | |
operator ON_3dPoint * () | |
ON_Triangle & | operator= (const ON_Triangle &tri)=default |
ON_3dPoint & | operator[] (int) |
Triangle[i] = Triangle.m_V[i]. More... | |
const ON_3dPoint & | operator[] (int) const |
ON_PlaneEquation | PlaneEquation () const |
ON_3dPoint | PointAt (double s1, double s2) const |
Evaluate point on triangle. More... | |
void | Reverse (int i) |
Reverse endpoints of Edge[i]. More... | |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
rotate line about a point and axis More... | |
bool | Rotate (double angle_in_radians, const ON_3dVector &axis_of_rotation, const ON_3dPoint ¢er_of_rotation) |
bool | Transform (const ON_Xform &xform) |
bool | Translate (const ON_3dVector &delta) |
ON_3dVector | UnitNormal () const |
Public Attributes | |
ON_3dPoint | m_V [3] |
Static Public Attributes | |
static const ON_Triangle | NanTriangle |
static const ON_Triangle | UnsetTriangle |
static const ON_Triangle | ZeroTriangle |
|
default |
ON_Triangle::ON_Triangle | ( | const ON_3dPoint | vertices[3] | ) |
ON_Triangle::ON_Triangle | ( | const ON_3dPoint & | a, |
const ON_3dPoint & | b, | ||
const ON_3dPoint & | c | ||
) |
ON_Triangle::ON_Triangle | ( | double | x | ) |
|
default |
|
default |
double ON_Triangle::Area | ( | ) | const |
ON_BoundingBox ON_Triangle::BoundingBox | ( | ) | const |
Get Triangles 3d axis aligned bounding box.
bool ON_Triangle::ClosestPointTo | ( | const ON_3dPoint & | test_point, |
double * | s1, | ||
double * | s2 | ||
) | const |
Find the point on the triangle that is closest to the test_point.
test_point | [in] s1, s2 - [out] PointAt( *s1, *s2) is the point on the triangle closest to test_point. |
ON_3dPoint ON_Triangle::ClosestPointTo | ( | const ON_3dPoint & | test_point | ) | const |
Find the point on the triangle that is closest to the test_point.
test_point | [in] |
void ON_Triangle::Create | ( | const ON_3dPoint | vertices[3] | ) |
Create a Triangle from three points.
vertices | [in] vertices |
void ON_Triangle::Create | ( | const ON_3dPoint & | a, |
const ON_3dPoint & | b, | ||
const ON_3dPoint & | c | ||
) |
Create a Triangle from three points.
TODODOC: a,b,c - [in] vertices
double ON_Triangle::DistanceTo | ( | const ON_3dPoint & | test_point | ) | const |
Find the point on the triangle that is closest to the test_point.
test_point | [in] |
ON_Line ON_Triangle::Edge | ( | int | i | ) | const |
bool ON_Triangle::GetBoundingBox | ( | ON_BoundingBox & | bbox, |
int | bGrowBox = false |
||
) | const |
Get line's 3d axis aligned bounding box or the union of the input box with the object's bounding box.
bbox | [in/out] 3d axis aligned bounding box |
bGrowBox | [in] (default=false) If true, then the union of the input bbox and the object's bounding box is returned in bbox. If false, the object's bounding box is returned in bbox. |
bool ON_Triangle::GetTightBoundingBox | ( | ON_BoundingBox & | tight_bbox, |
bool | bGrowBox = false , |
||
const ON_Xform * | xform = nullptr |
||
) | const |
Get tight bounding box with respect to a given frame
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 line's tight bounding box. |
xform | [in] (default=nullptr) If not nullptr, the tight bounding box of the transformed triangle is calculated. The triangle is not modified. |
bool ON_Triangle::IsDegenerate | ( | double | tol = ON_ZERO_TOLERANCE | ) | const |
bool ON_Triangle::IsValid | ( | ) | const |
ON_3dVector ON_Triangle::Normal | ( | ) | const |
ON_Triangle::operator const ON_3dPoint * | ( | ) | const |
ON_Triangle::operator ON_3dPoint * | ( | ) |
|
default |
ON_3dPoint& ON_Triangle::operator[] | ( | int | ) |
Triangle[i] = Triangle.m_V[i].
const ON_3dPoint& ON_Triangle::operator[] | ( | int | ) | const |
ON_PlaneEquation ON_Triangle::PlaneEquation | ( | ) | const |
ON_3dPoint ON_Triangle::PointAt | ( | double | s1, |
double | s2 | ||
) | const |
Evaluate point on triangle.
TODODOC: s1, s2 - [in] evaluation parameter.
void ON_Triangle::Reverse | ( | int | i | ) |
Reverse endpoints of Edge[i].
bool ON_Triangle::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
rotate line about a point and axis
bool ON_Triangle::Rotate | ( | double | angle_in_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
bool ON_Triangle::Transform | ( | const ON_Xform & | xform | ) |
bool ON_Triangle::Translate | ( | const ON_3dVector & | delta | ) |
ON_3dVector ON_Triangle::UnitNormal | ( | ) | const |
ON_3dPoint ON_Triangle::m_V[3] |
|
static |
|
static |
|
static |