Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_3dPointListRef Class Reference

#include <opennurbs_point.h>

Public Member Functions

 ON_3dPointListRef ()
 
 ON_3dPointListRef (const class ON_Mesh *mesh)
 
 ON_3dPointListRef (const class ON_SimpleArray< ON_3dPoint > &point_array)
 
 ON_3dPointListRef (const class ON_SimpleArray< ON_3fPoint > &point_array)
 
bool DoublePrecision () const
 
unsigned int GetMeshFacePoints (const class ON_MeshFace *mesh_face, ON_3dPoint face_points[4]) const
 
unsigned int GetMeshNgonPoints (const class ON_MeshNgon *mesh_ngon, ON_SimpleArray< ON_3dPoint > &ngon_points) const
 
unsigned int GetMeshNgonPoints (const class ON_MeshNgon *mesh_ngon, size_t ngon_points_capacity, class ON_3dPoint *ngon_points) const
 
const class ON_3dPointGetPoint (unsigned int point_index, double buffer[3]) const
 
unsigned int GetPoints (const ON_SimpleArray< int > &point_index_list, ON_SimpleArray< ON_3dPoint > &points) const
 
unsigned int GetPoints (int point_index_count, const int *point_index_list, class ON_3dPoint *points) const
 
unsigned int GetPoints (int point_index_count, const int *point_index_list, ON_SimpleArray< ON_3dPoint > &points) const
 
unsigned int GetPoints (unsigned int point_index_count, const unsigned int *point_index_list, class ON_3dPoint *points) const
 
unsigned int GetPoints (unsigned int point_index_count, const unsigned int *point_index_list, ON_SimpleArray< ON_3dPoint > &points) const
 
unsigned int GetQuadPoints (const int quad_point_indices[4], class ON_3dPoint quad_points[4]) const
 
unsigned int GetQuadPoints (const unsigned int quad_point_indices[4], class ON_3dPoint quad_points[4]) const
 
unsigned int GetTrianglePoints (const int triangle_point_indices[3], class ON_3dPoint triangle_points[3]) const
 
unsigned int GetTrianglePoints (const unsigned int triangle_point_indices[3], class ON_3dPoint triangle_points[3]) const
 
ON_3dPoint operator[] (int point_index) const
 
ON_3dPoint operator[] (ON__INT64 point_index) const
 
ON_3dPoint operator[] (ON__UINT64 point_index) const
 
ON_3dPoint operator[] (unsigned int point_index) const
 
ON_3dPoint Point (unsigned int point_index) const
 
unsigned int PointCount () const
 
const double * PointDoubleArray () const
 
const float * PointFloatArray () const
 
unsigned int PointStride () const
 
unsigned int Precision () const
 
unsigned int SetFromDoubleArray (size_t point_count, size_t point_stride, const double *point_array)
 
unsigned int SetFromFloatArray (size_t point_count, size_t point_stride, const float *point_array)
 
unsigned int SetFromMesh (const class ON_Mesh *mesh)
 
bool SinglePrecision () const
 
ON_SimpleArray< ON_3dPointTo3dPointArray () const
 
ON_SimpleArray< ON_3fPointTo3fPointArray () const
 

Static Public Member Functions

static ON_3dPointListRef FromDoubleArray (size_t point_count, size_t point_stride, const double *point_array)
 
static ON_3dPointListRef FromFloatArray (size_t point_count, size_t point_stride, const float *point_array)
 
static ON_3dPointListRef FromMesh (const class ON_Mesh *mesh)
 
static ON_3dPointListRef FromPointArray (const class ON_SimpleArray< ON_3dPoint > &point_array)
 
static ON_3dPointListRef FromPointArray (const class ON_SimpleArray< ON_3fPoint > &point_array)
 

Static Public Attributes

static const ON_3dPointListRef EmptyPointList
 

Constructor & Destructor Documentation

◆ ON_3dPointListRef() [1/4]

ON_3dPointListRef::ON_3dPointListRef ( )
inline

◆ ON_3dPointListRef() [2/4]

ON_3dPointListRef::ON_3dPointListRef ( const class ON_Mesh mesh)

Description: Construct a point list that references the mesh vertex list. Remarks: If the mesh has double precision vertices, then the point list will refer to them; otherwise, the point list will refer to the single precision vertices.

◆ ON_3dPointListRef() [3/4]

ON_3dPointListRef::ON_3dPointListRef ( const class ON_SimpleArray< ON_3dPoint > &  point_array)

Description: Construct a point list that references the points in a simple array of ON_3dPoint objects.

◆ ON_3dPointListRef() [4/4]

ON_3dPointListRef::ON_3dPointListRef ( const class ON_SimpleArray< ON_3fPoint > &  point_array)

Description: Construct a point list that references the points in a simple array of ON_3fPoint objects.

Member Function Documentation

◆ DoublePrecision()

bool ON_3dPointListRef::DoublePrecision ( ) const

Returns: true if the points are double precision

◆ FromDoubleArray()

static ON_3dPointListRef ON_3dPointListRef::FromDoubleArray ( size_t  point_count,
size_t  point_stride,
const double *  point_array 
)
static

◆ FromFloatArray()

static ON_3dPointListRef ON_3dPointListRef::FromFloatArray ( size_t  point_count,
size_t  point_stride,
const float *  point_array 
)
static

◆ FromMesh()

static ON_3dPointListRef ON_3dPointListRef::FromMesh ( const class ON_Mesh mesh)
static

◆ FromPointArray() [1/2]

static ON_3dPointListRef ON_3dPointListRef::FromPointArray ( const class ON_SimpleArray< ON_3dPoint > &  point_array)
static

◆ FromPointArray() [2/2]

static ON_3dPointListRef ON_3dPointListRef::FromPointArray ( const class ON_SimpleArray< ON_3fPoint > &  point_array)
static

◆ GetMeshFacePoints()

unsigned int ON_3dPointListRef::GetMeshFacePoints ( const class ON_MeshFace mesh_face,
ON_3dPoint  face_points[4] 
) const

Returns: Number of points copied to face_points[] array.

◆ GetMeshNgonPoints() [1/2]

unsigned int ON_3dPointListRef::GetMeshNgonPoints ( const class ON_MeshNgon mesh_ngon,
ON_SimpleArray< ON_3dPoint > &  ngon_points 
) const

Returns: Number of points copied to ngon_points[] array.

◆ GetMeshNgonPoints() [2/2]

unsigned int ON_3dPointListRef::GetMeshNgonPoints ( const class ON_MeshNgon mesh_ngon,
size_t  ngon_points_capacity,
class ON_3dPoint ngon_points 
) const

Returns: Number of points copied to ngon_points[] array.

◆ GetPoint()

const class ON_3dPoint& ON_3dPointListRef::GetPoint ( unsigned int  point_index,
double  buffer[3] 
) const
inline

Description: Copy point location into buffer and return it as an ON_3dPoint. Parameters: point_index - [in] buffer - [out] If point_index is a valid index, the point coordinates are copied to buffer[]; otherwise the buffer coordinates are set to ON_UNSET_VALUE. You must insure buffer is not null, has proper alignment for storing doubles, and is large enough to store three doubles. Returns: A reference to an ON_3dPoint which is a cast of buffer. Remarks: This is the fastest and most efficient way to get a the location of a point into memory you are managing.

◆ GetPoints() [1/5]

unsigned int ON_3dPointListRef::GetPoints ( const ON_SimpleArray< int > &  point_index_list,
ON_SimpleArray< ON_3dPoint > &  points 
) const

Returns: Number of points copied to points[] array.

◆ GetPoints() [2/5]

unsigned int ON_3dPointListRef::GetPoints ( int  point_index_count,
const int *  point_index_list,
class ON_3dPoint points 
) const

Returns: Number of points copied to points[] array.

◆ GetPoints() [3/5]

unsigned int ON_3dPointListRef::GetPoints ( int  point_index_count,
const int *  point_index_list,
ON_SimpleArray< ON_3dPoint > &  points 
) const

Returns: Number of points copied to points[] array.

◆ GetPoints() [4/5]

unsigned int ON_3dPointListRef::GetPoints ( unsigned int  point_index_count,
const unsigned int *  point_index_list,
class ON_3dPoint points 
) const

Returns: Number of points copied to points[] array.

◆ GetPoints() [5/5]

unsigned int ON_3dPointListRef::GetPoints ( unsigned int  point_index_count,
const unsigned int *  point_index_list,
ON_SimpleArray< ON_3dPoint > &  points 
) const

Returns: Number of points copied to points[] array.

◆ GetQuadPoints() [1/2]

unsigned int ON_3dPointListRef::GetQuadPoints ( const int  quad_point_indices[4],
class ON_3dPoint  quad_points[4] 
) const

Returns: Number of points copied to quad_points[] array.

◆ GetQuadPoints() [2/2]

unsigned int ON_3dPointListRef::GetQuadPoints ( const unsigned int  quad_point_indices[4],
class ON_3dPoint  quad_points[4] 
) const

Returns: Number of points copied to quad_points[] array.

◆ GetTrianglePoints() [1/2]

unsigned int ON_3dPointListRef::GetTrianglePoints ( const int  triangle_point_indices[3],
class ON_3dPoint  triangle_points[3] 
) const

Returns: Number of points copied to triangle_points[] array.

◆ GetTrianglePoints() [2/2]

unsigned int ON_3dPointListRef::GetTrianglePoints ( const unsigned int  triangle_point_indices[3],
class ON_3dPoint  triangle_points[3] 
) const

Returns: Number of points copied to triangle_points[] array.

◆ operator[]() [1/4]

ON_3dPoint ON_3dPointListRef::operator[] ( int  point_index) const
inline

◆ operator[]() [2/4]

ON_3dPoint ON_3dPointListRef::operator[] ( ON__INT64  point_index) const
inline

◆ operator[]() [3/4]

ON_3dPoint ON_3dPointListRef::operator[] ( ON__UINT64  point_index) const
inline

◆ operator[]() [4/4]

ON_3dPoint ON_3dPointListRef::operator[] ( unsigned int  point_index) const
inline

◆ Point()

ON_3dPoint ON_3dPointListRef::Point ( unsigned int  point_index) const
inline

Parameters: point_index - [in] Returns: If point_index is a valid index, the point location is returned. Otherwise ON_3dPoint::UnsetPoint is returned.

◆ PointCount()

unsigned int ON_3dPointListRef::PointCount ( ) const
inline

◆ PointDoubleArray()

const double* ON_3dPointListRef::PointDoubleArray ( ) const
inline

◆ PointFloatArray()

const float* ON_3dPointListRef::PointFloatArray ( ) const
inline

◆ PointStride()

unsigned int ON_3dPointListRef::PointStride ( ) const
inline

◆ Precision()

unsigned int ON_3dPointListRef::Precision ( ) const

Returns: 0: no points 1: single precision points (float coordinates) 2: double precision points (double coordinates)

◆ SetFromDoubleArray()

unsigned int ON_3dPointListRef::SetFromDoubleArray ( size_t  point_count,
size_t  point_stride,
const double *  point_array 
)

Description: Set this point list to reference points with double coordinates. Parameters: point_count - [in] number of points point_stride - [in] (>= 3) number of doubles between points. point_array - [in] pointer to the first coordinate of the first point. Returns: Number of points in the list.

◆ SetFromFloatArray()

unsigned int ON_3dPointListRef::SetFromFloatArray ( size_t  point_count,
size_t  point_stride,
const float *  point_array 
)

Description: Set this point list to reference points with float coordinates. Parameters: point_count - [in] number of points point_stride - [in] (>= 3) number of floats between points. point_array - [in] pointer to the first coordinate of the first point. Returns: Number of points in the list.

◆ SetFromMesh()

unsigned int ON_3dPointListRef::SetFromMesh ( const class ON_Mesh mesh)

Description: Set this point list to reference a mesh vertex list. Parameters: mesh - [in] Returns: Number of points in the list.

◆ SinglePrecision()

bool ON_3dPointListRef::SinglePrecision ( ) const

Returns: true if the points are single precision

◆ To3dPointArray()

ON_SimpleArray<ON_3dPoint> ON_3dPointListRef::To3dPointArray ( ) const

Returns: A copy of the referenced points in an ON_SimpleArray<ON_3dPoint>.

◆ To3fPointArray()

ON_SimpleArray<ON_3fPoint> ON_3dPointListRef::To3fPointArray ( ) const

Returns: A copy of the referenced points in an ON_SimpleArray<ON_3fPoint>.

Member Data Documentation

◆ EmptyPointList

const ON_3dPointListRef ON_3dPointListRef::EmptyPointList
static