Rhino C++ API
8.13
|
#include <opennurbs_point.h>
Public Member Functions | |
ON_3dPointArray () | |
see ON_SimpleArray class definition comments for constructor documentation More... | |
ON_3dPointArray (const ON_SimpleArray< ON_3dPoint > &) | |
ON_3dPointArray (const ON_SimpleArray< ON_3fPoint > &) | |
ON_3dPointArray (int) | |
ON_BoundingBox | BoundingBox () const |
ON_BoundingBox | BoundingBox (int from, int count) const |
bool | Create (int point_dimension, int bRational, int point_count, int point_stride, const double *points) |
bool | Create (int point_dimension, int bRational, int point_count, int point_stride, const float *points) |
bool | GetBBox (double boxmin[3], double boxmax[3], bool bGrowBox=false) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, int bGrowBox=false) const |
bool | GetClosestPoint (ON_3dPoint P, int *closest_point_index, double maximum_distance=0.0) const |
bool | GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const |
ON_3dPointArray & | operator= (const ON_3dPointArray &) |
ON_3dPointArray & | operator= (const ON_SimpleArray< ON_3fPoint > &) |
bool | PointMassProperties (class ON_MassProperties &mp, bool bFirstMoments=true, bool bSecondMoments=true, bool bProductMoments=true) const |
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) |
bool | SwapCoordinates (int i, int j) |
bool | Transform (const ON_Xform &xform) |
bool | Translate (const ON_3dVector &delta) |
Public Member Functions inherited from ON_SimpleArray< ON_3dPoint > | |
ON_SimpleArray () ON_NOEXCEPT | |
construction //////////////////////////////////////////////////////// More... | |
ON_SimpleArray (const ON_SimpleArray< ON_3dPoint > &) | |
Copy constructor. More... | |
ON_SimpleArray (size_t) | |
size_t parameter = initial capacity More... | |
virtual | ~ON_SimpleArray () |
void | Append (const ON_3dPoint &) |
void | Append (int, const ON_3dPoint *) |
Append copy of an array T[count]. More... | |
ON_3dPoint & | AppendNew () |
array operations //////////////////////////////////////////////////// More... | |
ON_3dPoint * | Array () |
The Array() function return the. More... | |
const ON_3dPoint * | Array () const |
m_a pointer value. More... | |
ON_3dPoint * | At (int) |
At(index) returns nullptr if index < 0 or index >= count. More... | |
const ON_3dPoint * | At (int) const |
ON_3dPoint * | At (ON__INT64) |
const ON_3dPoint * | At (ON__INT64) const |
ON_3dPoint * | At (ON__UINT64) |
const ON_3dPoint * | At (ON__UINT64) const |
ON_3dPoint * | At (unsigned int) |
const ON_3dPoint * | At (unsigned int) const |
int | BinarySearch (const ON_3dPoint *, int(*)(const ON_3dPoint *, const ON_3dPoint *)) const |
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T> More... | |
int | BinarySearch (const ON_3dPoint *, int(*)(const ON_3dPoint *, const ON_3dPoint *), int) const |
const ON_3dPoint * | BinarySearchPtr (const ON_3dPoint *, int(*)(const ON_3dPoint *, const ON_3dPoint *)) const |
const ON_3dPoint * | BinarySearchPtr (const ON_3dPoint *, int(*)(const ON_3dPoint *, const ON_3dPoint *), int) const |
int | Capacity () const |
capacity of array More... | |
int | Count () const |
query /////////////////////////////////////////////////////////////// More... | |
ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
void | Destroy () |
onfree any memory and set count and capacity to zero More... | |
void | EmergencyDestroy (void) |
emergency bailout /////////////////////////////////////////////////// More... | |
void | Empty () |
Sets count to 0, leaves capacity untouched. More... | |
ON_3dPoint * | First () |
const ON_3dPoint * | First () const |
returns nullptr if count = 0 More... | |
bool | HeapSort (int(*)(const ON_3dPoint *, const ON_3dPoint *)) |
void | Insert (int, const ON_3dPoint &) |
int | InsertInSortedList (const ON_3dPoint &, int(*)(const ON_3dPoint *, const ON_3dPoint *)) |
int | InsertInSortedList (const ON_3dPoint &, int(*)(const ON_3dPoint *, const ON_3dPoint *), int) |
ON_3dPoint * | KeepArray () |
ON_3dPoint * | Last () |
const ON_3dPoint * | Last () const |
returns nullptr if count = 0 More... | |
void | MemSet (unsigned char) |
int | NewCapacity () const |
operator const ON_3dPoint * () const | |
operator ON_3dPoint * () | |
The cast operators return a pointer. More... | |
ON_SimpleArray< ON_3dPoint > & | operator= (const ON_SimpleArray< ON_3dPoint > &) |
ON_3dPoint & | operator[] (int) |
const ON_3dPoint & | operator[] (int) const |
ON_3dPoint & | operator[] (ON__INT64) |
const ON_3dPoint & | operator[] (ON__INT64) const |
ON_3dPoint & | operator[] (ON__UINT64) |
const ON_3dPoint & | operator[] (ON__UINT64) const |
ON_3dPoint & | operator[] (unsigned int) |
const ON_3dPoint & | operator[] (unsigned int) const |
bool | Permute (const int *) |
void | Prepend (int, const ON_3dPoint *) |
Prepend copy of an array T[count]. More... | |
bool | QuickSort (int(*)(const ON_3dPoint *, const ON_3dPoint *)) |
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T> More... | |
bool | QuickSortAndRemoveDuplicates (int(*)(const ON_3dPoint *, const ON_3dPoint *)) |
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T> More... | |
virtual ON_3dPoint * | Realloc (ON_3dPoint *, int) |
low level memory management ////////////////////////////////////////// More... | |
void | Remove () |
virtual void | Remove (int) |
void | RemoveIf (bool predicate(const ON_3dPoint &key)) |
void | RemoveValue (const ON_3dPoint &) |
ON_3dPoint * | Reserve (size_t) |
memory management //////////////////////////////////////////////////// More... | |
void | Reverse () |
reverse order More... | |
int | Search (const ON_3dPoint &) const |
int | Search (const ON_3dPoint *, int(*)(const ON_3dPoint *, const ON_3dPoint *)) const |
See Also: ON_CompareIncreasing<T> and ON_CompareDeccreasing<T> More... | |
void | SetArray (ON_3dPoint *) |
void | SetArray (ON_3dPoint *, int, int) |
ON_3dPoint * | SetCapacity (size_t) |
void | SetCount (int) |
low level memory management ////////////////////////////////////////// More... | |
void | SetRange (int from, int count, ON_3dPoint) |
void | Shrink () |
remove unused capacity More... | |
unsigned int | SizeOfArray () const |
amount of memory in the m_a[] array More... | |
unsigned int | SizeOfElement () const |
amount of memory in an m_a[] array element More... | |
bool | Sort (ON::sort_algorithm sort_algorithm, int *, int(*)(const ON_3dPoint *, const ON_3dPoint *)) const |
bool | Sort (ON::sort_algorithm sort_algorithm, int *, int(*)(const ON_3dPoint *, const ON_3dPoint *, void *), void *) const |
void | Swap (int, int) |
swap elements i and j More... | |
unsigned int | UnsignedCount () const |
void | Zero () |
Additional Inherited Members | |
Protected Member Functions inherited from ON_SimpleArray< ON_3dPoint > | |
void | Move (int, int, int) |
implementation ////////////////////////////////////////////////////// More... | |
Protected Attributes inherited from ON_SimpleArray< ON_3dPoint > | |
ON_3dPoint * | m_a |
pointer to array memory More... | |
int | m_capacity |
actual length of m_a[] More... | |
int | m_count |
0 <= m_count <= m_capacity More... | |
ON_3dPointArray::ON_3dPointArray | ( | ) |
see ON_SimpleArray class definition comments for constructor documentation
ON_3dPointArray::ON_3dPointArray | ( | int | ) |
ON_3dPointArray::ON_3dPointArray | ( | const ON_SimpleArray< ON_3dPoint > & | ) |
ON_3dPointArray::ON_3dPointArray | ( | const ON_SimpleArray< ON_3fPoint > & | ) |
ON_BoundingBox ON_3dPointArray::BoundingBox | ( | ) | const |
Description: Get 3d axis aligned bounding box. Returns: 3d bounding box of point list.
ON_BoundingBox ON_3dPointArray::BoundingBox | ( | int | from, |
int | count | ||
) | const |
Description: Get 3d axis aligned bounding box of a subset of the points. Parameters: from - [in] start of the box calculation count - [in] number of items computed Returns: 3d bounding box of point list.
bool ON_3dPointArray::Create | ( | int | point_dimension, |
int | bRational, | ||
int | point_count, | ||
int | point_stride, | ||
const double * | points | ||
) |
Description: Create 3d point list Parameters: point_dimension - [in] dimension of input points (2 or 3) bRational - [in] true if points are in homogeneous rational form point_count - [in] number of points point_stride - [in] number of doubles to skip between points points - [in] array of point coordinates
bool ON_3dPointArray::Create | ( | int | point_dimension, |
int | bRational, | ||
int | point_count, | ||
int | point_stride, | ||
const float * | points | ||
) |
Description: Create 3d point list Parameters: point_dimension - [in] dimension of input points (2 or 3) bRational - [in] true if points are in homogeneous rational form point_count - [in] number of points point_stride - [in] number of doubles to skip between points points - [in] array of point coordinates
bool ON_3dPointArray::GetBBox | ( | double | boxmin[3], |
double | boxmax[3], | ||
bool | bGrowBox = false |
||
) | const |
Description: Get axis aligned bounding box. Parameters: boxmin - [in/out] array of 3 doubles boxmax - [in/out] array of 3 doubles bGrowBox - [in] (default=false) If true, then the union of the input bounding box and the object's bounding box is returned. If false, the object's bounding box is returned. Returns: true if object has bounding box and calculation was successful
bool ON_3dPointArray::GetBoundingBox | ( | ON_BoundingBox & | bbox, |
int | bGrowBox = false |
||
) | const |
Description: Get 3d axis aligned bounding box or the union of the input box with the point list'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 point list's bounding box is returned in bbox.
If false, the point list's bounding box is returned in bbox. Returns: true if successful.
bool ON_3dPointArray::GetClosestPoint | ( | ON_3dPoint | P, |
int * | closest_point_index, | ||
double | maximum_distance = 0.0 |
||
) | const |
Description: Get the index of the point in the array that is closest to P. Parameters: P - [in] closest_point_index - [out] maximum_distance - [in] optional distance constraint. If maximum_distance > 0, then only points Q with |P-Q| <= maximum_distance are returned. Returns: True if a point is found; in which case *closest_point_index is the index of the point. False if no point is found or the input is not valid. See Also: ON_GetClosestPointInPointList ON_PointCloud::GetClosestPoint
bool ON_3dPointArray::GetTightBoundingBox | ( | ON_BoundingBox & | tight_bbox, |
bool | bGrowBox = false , |
||
const ON_Xform * | xform = nullptr |
||
) | const |
Description: Get tight bounding box of the point list. 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 tight bounding box of the point list. xform -[in] (default=nullptr) If not nullptr, the tight bounding box of the transformed point list is calculated. The point list is not modified. Returns: True if the returned tight_bbox is set to a valid bounding box.
ON_3dPointArray& ON_3dPointArray::operator= | ( | const ON_3dPointArray & | ) |
ON_3dPointArray& ON_3dPointArray::operator= | ( | const ON_SimpleArray< ON_3fPoint > & | ) |
bool ON_3dPointArray::PointMassProperties | ( | class ON_MassProperties & | mp, |
bool | bFirstMoments = true , |
||
bool | bSecondMoments = true , |
||
bool | bProductMoments = true |
||
) | const |
Description: Calculate point mass properties of the point array. Parameters: mp - [out] bFirstMoments - [in] true to calculate first moments, mass, and point mass centroid. bSecondMoments - [in] true to calculate point mass second moments. bProductMoments - [in] true to calculate point mass product moments. Returns: True if successful.
bool ON_3dPointArray::Rotate | ( | double | angle_in_radians, |
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
Description: Rotate points about a center and axis. A positive angle results in a counter-clockwise rotation about the axis of rotation. Parameters: angle - [in] angle in radians. Polsine of rotation angle cos_angle - [in] cosine of rotation angle axis_of_rotation - [in] axis of rotation center_of_rotation - [in] center (fixed point) of rotation Returns: true if successful.
bool ON_3dPointArray::Rotate | ( | double | sin_angle, |
double | cos_angle, | ||
const ON_3dVector & | axis_of_rotation, | ||
const ON_3dPoint & | center_of_rotation | ||
) |
Description: Rotate points about a center and axis. A positive angle results in a counter-clockwise rotation about the axis of rotation. Parameters: sin_angle - [in] sine of rotation angle cos_angle - [in] cosine of rotation angle axis_of_rotation - [in] axis of rotation center_of_rotation - [in] center (fixed point) of rotation Returns: true if successful.
bool ON_3dPointArray::SwapCoordinates | ( | int | i, |
int | j | ||
) |
Description: Swaps point coordinate values with indices i and j. Parameters: i - [in] coordinate index j - [in] coordinate index Returns: true if successful. Example: The call SwapCoordinates(0,2) would swap the x and z coordinates of each point in the array.
bool ON_3dPointArray::Transform | ( | const ON_Xform & | xform | ) |
Description: Transform points by applying xform to each point. Parameters: xform - [in] transformation matrix Returns: true if successful.
bool ON_3dPointArray::Translate | ( | const ON_3dVector & | delta | ) |
Description: Translate a polyline Parameters: delta - [in] translation vectorsine of rotation angle Returns: true if successful.