Rhino C++ API
8.14
|
A Simplex in 3d. More...
#include <opennurbs_convex_poly.h>
Public Member Functions | |
ON_3dSimplex () | |
An empty simplex. More... | |
ON_3dSimplex (const ON_3dPoint &a) | |
0-simplex in 3d More... | |
ON_3dSimplex (const ON_3dPoint &a, const ON_3dPoint &b) | |
1-simplex More... | |
ON_3dSimplex (const ON_3dPoint &a, const ON_3dPoint &b, const ON_3dPoint &c) | |
2-simplex More... | |
ON_3dSimplex (const ON_3dPoint &a, const ON_3dPoint &b, const ON_3dPoint &c, const ON_3dPoint &d) | |
3-simplex More... | |
ON_3dSimplex (const ON_3dSimplex &rhs)=default | |
~ON_3dSimplex ()=default | |
bool | AddVertex (const ON_3dPoint &) |
ON_BoundingBox | BoundingBox () const |
int | Count () const |
Number of Vertices <=4. More... | |
ON_3dVector | Edge (int e0, int e1) const |
ON_3dPoint | Evaluate (const double *b) const |
ON_3dPoint | Evaluate (const ON_4dPoint &b) const |
ON_3dVector | FaceNormal (int noti=0) const |
ON_3dVector | FaceUnitNormal (int noti=0) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, int bGrowBox=false) const |
bool | GetClosestPoint (const ON_3dPoint &P0, ON_4dPoint &Bary, double maximum_distance=ON_DBL_MAX) const |
bool | GetClosestPointToOrigin (ON_4dPoint &Bary) const |
bool | GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const |
bool | IsValid (double eps) const |
true if the Vertices are affinely independent More... | |
double | MaximumCoordinate () const |
ON_3dSimplex & | operator= (const ON_3dSimplex &rhs)=default |
const ON_3dPoint & | operator[] (int i) const |
ON_3dPoint & | operator[] (int) |
Returns a Vertex or a reference to one when 0<=i<Count() More... | |
bool | RemoveVertex (int i) |
bool | Rotate (double angle_in_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, const ON_3dPoint ¢er_of_rotation) |
rotate line about a point and axis More... | |
bool | SetVertex (int i, ON_3dPoint P) |
double | SignedVolume () const |
returns ON_UNSET_VALUE if Count()<4 else the signed volume More... | |
bool | Transform (const ON_Xform &xform) |
bool | Translate (const ON_3dVector &delta) |
ON_3dPoint & | Vertex (int i) |
ON_3dPoint | Vertex (int i) const |
double | Volume () const |
A Simplex in 3d.
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org.
ON_3dSimplex::ON_3dSimplex | ( | ) |
An empty simplex.
|
explicit |
0-simplex in 3d
ON_3dSimplex::ON_3dSimplex | ( | const ON_3dPoint & | a, |
const ON_3dPoint & | b | ||
) |
1-simplex
ON_3dSimplex::ON_3dSimplex | ( | const ON_3dPoint & | a, |
const ON_3dPoint & | b, | ||
const ON_3dPoint & | c | ||
) |
2-simplex
ON_3dSimplex::ON_3dSimplex | ( | const ON_3dPoint & | a, |
const ON_3dPoint & | b, | ||
const ON_3dPoint & | c, | ||
const ON_3dPoint & | d | ||
) |
3-simplex
|
default |
|
default |
bool ON_3dSimplex::AddVertex | ( | const ON_3dPoint & | ) |
append new vertex at end
ON_BoundingBox ON_3dSimplex::BoundingBox | ( | ) | const |
Description: Get Simplex's 3d axis aligned bounding box. Returns: 3d bounding box.
int ON_3dSimplex::Count | ( | ) | const |
Number of Vertices <=4.
ON_3dVector ON_3dSimplex::Edge | ( | int | e0, |
int | e1 | ||
) | const |
Edge vector from Vertex(e0) to Vertex(e1)
ON_3dPoint ON_3dSimplex::Evaluate | ( | const double * | b | ) | const |
ON_3dPoint ON_3dSimplex::Evaluate | ( | const ON_4dPoint & | b | ) | const |
ON_3dVector ON_3dSimplex::FaceNormal | ( | int | noti = 0 | ) | const |
ON_3dVector ON_3dSimplex::FaceUnitNormal | ( | int | noti = 0 | ) | const |
bool ON_3dSimplex::GetBoundingBox | ( | ON_BoundingBox & | bbox, |
int | bGrowBox = false |
||
) | const |
Description: Get simplexes 3d axis aligned bounding box or the union of the input box with the object's bounding box. Parameters: 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. Returns: true if object has bounding box and calculation was successful.
bool ON_3dSimplex::GetClosestPoint | ( | const ON_3dPoint & | P0, |
ON_4dPoint & | Bary, | ||
double | maximum_distance = ON_DBL_MAX |
||
) | const |
Description: Find Closest Point to this simplex from a base point P0 or the Origin. If true is returned then Evaluate(Bary) is the closest point on the Simplex. maximum_distance - optional upperbound on closest point. If maximum_distance>=0 is specified and Dist(P0, Simplex)>maximum_distance then false is returned.
bool ON_3dSimplex::GetClosestPointToOrigin | ( | ON_4dPoint & | Bary | ) | const |
bool ON_3dSimplex::GetTightBoundingBox | ( | ON_BoundingBox & | tight_bbox, |
bool | bGrowBox = false , |
||
const ON_Xform * | xform = nullptr |
||
) | const |
Description: Get tight bounding box with respect to a given frame Parameters: 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. Returns: True if a valid tight_bbox is returned.
bool ON_3dSimplex::IsValid | ( | double | eps | ) | const |
true if the Vertices are affinely independent
double ON_3dSimplex::MaximumCoordinate | ( | ) | const |
Maximum absolute value of vertex coordinates
|
default |
const ON_3dPoint& ON_3dSimplex::operator[] | ( | int | i | ) | const |
ON_3dPoint& ON_3dSimplex::operator[] | ( | int | ) |
Returns a Vertex or a reference to one when 0<=i<Count()
bool ON_3dSimplex::RemoveVertex | ( | int | i | ) |
bool ON_3dSimplex::Rotate | ( | double | angle_in_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
bool ON_3dSimplex::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_3dSimplex::SetVertex | ( | int | i, |
ON_3dPoint | P | ||
) |
Modify a vertex. i<Count()
double ON_3dSimplex::SignedVolume | ( | ) | const |
returns ON_UNSET_VALUE if Count()<4 else the signed volume
bool ON_3dSimplex::Transform | ( | const ON_Xform & | xform | ) |
bool ON_3dSimplex::Translate | ( | const ON_3dVector & | delta | ) |
ON_3dPoint& ON_3dSimplex::Vertex | ( | int | i | ) |
ON_3dPoint ON_3dSimplex::Vertex | ( | int | i | ) | const |