#include <opennurbs_mesh.h>
Public Member Functions | |
void | AppendToString (class ON_String &s) const |
void | AppendToString (class ON_wString &s) const |
unsigned int | BoundaryEdgeCount (const ON_MeshFaceList &mesh_face_list) const |
unsigned int | BoundaryEdgeCount (const ON_Mesh *mesh) const |
unsigned int | Capacity () const |
ON_SHA1_Hash | ContentHash () const |
ON__UINT32 | CRC32 () const |
void | Dump (class ON_TextLog &text_log) const |
unsigned int | GetBoundarySides (const class ON_MeshFaceList &mesh_face_list, ON_SimpleArray< unsigned int > &ngon_boundary_sides) const |
Use the ngon m_fi[] array to get a list of ngon boundary sides. More... | |
unsigned int | GetOuterBoundaryPoints (const class ON_3dPointListRef &mesh_vertex_list, bool bAppendStartPoint, ON_SimpleArray< ON_3dPoint > &ngon_boundary_points) const |
Use the ngon m_vi[] array to get a list of 3d points from mesh_vertex_list. More... | |
unsigned int | GetOuterBoundaryPoints (const class ON_3dPointListRef &mesh_vertex_list, bool bAppendStartPoint, ON_3dPoint *ngon_boundary_points) const |
Use the ngon m_vi[] array to get a list of 3d points from mesh_vertex_list. More... | |
int | Orientation (const ON_MeshFaceList &mesh_face_list, bool bPermitHoles) const |
Determine if the ngon's boundary orientation matches that of the set of faces it is made from. More... | |
int | Orientation (const ON_Mesh *mesh, bool bPermitHoles) const |
Determine if the ngon's boundary orientation matches that of the set of faces it is made from. More... | |
unsigned int | OuterBoundaryEdgeCount () const |
void | ReverseOuterBoundary () |
Reverse the order of the m_vi[] array. More... | |
ON_String | ToString () const |
ON_wString | ToWideString () const |
Static Public Member Functions | |
static int | Compare (const ON_MeshNgon *A, const ON_MeshNgon *B) |
static unsigned int | FindNgonOuterBoundary (const class ON_3dPointListRef &mesh_vertex_list, const class ON_MeshFaceList &mesh_face_list, const unsigned int *const *vertex_face_map, size_t ngon_fi_count, const unsigned int *ngon_fi, ON_SimpleArray< unsigned int > &ngon_vi) |
Get a list of vertices that form the boundary of a set of faces. More... | |
static unsigned int | FindPlanarNgons (const class ON_3dPointListRef &vertex_list, const class ON_MeshFaceList &face_list, const unsigned int *const *vertex_face_map, double planar_tolerance, unsigned int minimum_ngon_vertex_count, unsigned int minimum_ngon_face_count, bool bAllowHoles, class ON_MeshNgonAllocator &NgonAllocator, ON_SimpleArray< unsigned int > &NgonMap, ON_SimpleArray< ON_MeshNgon *> &Ngons) |
static unsigned int | IsValid (const ON_MeshNgon *ngon, unsigned int ngon_index, ON_TextLog *text_log, unsigned int mesh_vertex_count, unsigned int mesh_face_count, const ON_MeshFace *mesh_F) |
Test ngon to see if the vertex and face references are valid and pass partial boundary validity checks, More... | |
static unsigned int | IsValid (const ON_MeshNgon *ngon, unsigned int ngon_index, ON_TextLog *text_log, unsigned int mesh_vertex_count, unsigned int mesh_face_count, const ON_MeshFace *mesh_F, ON_SimpleArray< unsigned int > &workspace_buffer) |
static class ON_MeshNgon * | NgonFromMeshFace (class ON_MeshNgonBuffer &ngon_buffer, unsigned int mesh_face_index, const unsigned int *fvi) |
Create an ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons. More... | |
static class ON_MeshNgon ** | NgonListFromMeshFace (class ON_MeshNgonBuffer &ngon_buffer, unsigned int mesh_face_index, const unsigned int *fvi) |
Create an array of a single ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons. More... | |
static unsigned int | NgonListFromMeshFaceOrNgonComponent (class ON_MeshNgonBuffer &ngon_buffer, ON_COMPONENT_INDEX ci, const class ON_Mesh *mesh, const class ON_MeshNgon *const *&ngon_list) |
If a component index identifies a face or ngon, Get an array Create an array of a single ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons. More... | |
Public Attributes | |
unsigned int | m_Fcount |
unsigned int * | m_fi |
unsigned int | m_Vcount |
Number of N-gon corners (N >= 3) More... | |
unsigned int * | m_vi |
void ON_MeshNgon::AppendToString | ( | class ON_String & | s | ) | const |
void ON_MeshNgon::AppendToString | ( | class ON_wString & | s | ) | const |
unsigned int ON_MeshNgon::BoundaryEdgeCount | ( | const ON_MeshFaceList & | mesh_face_list | ) | const |
mesh_face_list | [in] faces referenced by this n-gon. |
unsigned int ON_MeshNgon::BoundaryEdgeCount | ( | const ON_Mesh * | mesh | ) | const |
mesh | [in] mesh referenced by this n-gon. |
unsigned int ON_MeshNgon::Capacity | ( | ) | const |
|
static |
ON_SHA1_Hash ON_MeshNgon::ContentHash | ( | ) | const |
ON__UINT32 ON_MeshNgon::CRC32 | ( | ) | const |
void ON_MeshNgon::Dump | ( | class ON_TextLog & | text_log | ) | const |
|
static |
Get a list of vertices that form the boundary of a set of faces.
mesh_vertex_list | [in] |
mesh_face_list | [in] |
vertex_face_map | [in] null or a vertex map made from the information in mesh_vertex_list and mesh_face_list. |
ngon_fi_count | [in] length of ngon_fi[] array |
ngon_fi | [in] An array of length ngon_fi_count that contains the indices of the faces that form the ngon. |
ngon_vi | [out] An array of vertex indices that make the ngon boundary. |
|
static |
unsigned int ON_MeshNgon::GetBoundarySides | ( | const class ON_MeshFaceList & | mesh_face_list, |
ON_SimpleArray< unsigned int > & | ngon_boundary_sides | ||
) | const |
Use the ngon m_fi[] array to get a list of ngon boundary sides.
mesh_face_list | [in] |
ngon_boundary_sides | [out] ngon_boundary_sides[i]/8 = ON_MeshNon.m_fi[] array index ngon_boundary_sides[i]%4 = side index side index 0 identifies the side that runs from the first face vertex to the second face vertex. ngon_boundary_sides[i]&4 != 0 means the face side is reversed when used as an ngon boundary segment. |
unsigned int ON_MeshNgon::GetOuterBoundaryPoints | ( | const class ON_3dPointListRef & | mesh_vertex_list, |
bool | bAppendStartPoint, | ||
ON_SimpleArray< ON_3dPoint > & | ngon_boundary_points | ||
) | const |
Use the ngon m_vi[] array to get a list of 3d points from mesh_vertex_list.
mesh_vertex_list | [in] |
bAppendStartPoint | [in] If true, the initial point in the boundary will be added as the first point of ngon_boundary_points[] and then added again as the last point of ngon_boundary_points[]. This is useful when you need a closed polyline. |
ngon_boundary_points | [out] An array of ngon->m_Vcount + (bAppendStartPoint ? 1 : 0) points. |
unsigned int ON_MeshNgon::GetOuterBoundaryPoints | ( | const class ON_3dPointListRef & | mesh_vertex_list, |
bool | bAppendStartPoint, | ||
ON_3dPoint * | ngon_boundary_points | ||
) | const |
Use the ngon m_vi[] array to get a list of 3d points from mesh_vertex_list.
mesh_vertex_list | [in] |
bAppendStartPoint | [in] If true, the initial point in the boundary will be added as the first point of ngon_boundary_points[] and then added again as the last point of ngon_boundary_points[]. This is useful when you need a closed polyline. |
ngon_boundary_points | [out] An array of ngon->m_Vcount + (bAppendStartPoint ? 1 : 0) points is returned in ngon_boundary_points[]. The caller must insure that ngon_boundary_points[] has room for this many elements. |
|
static |
Test ngon to see if the vertex and face references are valid and pass partial boundary validity checks,
ngon | [in] ngon to test |
ngon_index | [in] This index is used in messages sent to text_log |
text_log | [in] nullptr or a place to send information about problems. |
mesh_vertex_count | [in] Number of vertices in the mesh |
mesh_face_count | [in] Number of face in the mesh |
mesh_F | [in] nullptr of mesh faces - required for boundary checks |
workspace_buffer | [in] If you are passing in mesh_F and you are testing testing multple ngons, then consider providing a workspace_buffer that will be automatically reused for successive ngons. |
|
static |
|
static |
Create an ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons.
buffer | [in] an array with a capacity for at least 9 ON__UINT_PTR elements. The returned ngon information will be stored in this memory. |
mesh_face_index | [in] |
fvi | [in] mesh face vertex indices. If "f" is an ON_MeshFace, then pass (const unsigned int*)f.vi. |
|
static |
Create an array of a single ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons.
ngon_buffer | [in] memory used to create ngon classan array with a capacity for at least 10 ON__UINT_PTR elements. |
mesh_face_index | [in] |
fvi | [in] mesh face vertex indices. If "f" is an ON_MeshFace, then pass (const unsigned int*)f.vi. |
|
static |
If a component index identifies a face or ngon, Get an array Create an array of a single ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face. This is handy when your code needs to handle both ngons and faces because it lets you convert a face to its ngon format and the rest of the code can work exclusively with ngons.
ngon_buffer | [in] memory used to create ON_MeshNgon class |
ci | [in] |
mesh | [in] |
ngon_list | [out] An array of ngon pointers. Some pointers may be null. |
int ON_MeshNgon::Orientation | ( | const ON_MeshFaceList & | mesh_face_list, |
bool | bPermitHoles | ||
) | const |
Determine if the ngon's boundary orientation matches that of the set of faces it is made from.
int ON_MeshNgon::Orientation | ( | const ON_Mesh * | mesh, |
bool | bPermitHoles | ||
) | const |
Determine if the ngon's boundary orientation matches that of the set of faces it is made from.
unsigned int ON_MeshNgon::OuterBoundaryEdgeCount | ( | ) | const |
void ON_MeshNgon::ReverseOuterBoundary | ( | ) |
Reverse the order of the m_vi[] array.
ON_String ON_MeshNgon::ToString | ( | ) | const |
ON_wString ON_MeshNgon::ToWideString | ( | ) | const |
unsigned int ON_MeshNgon::m_Fcount |
unsigned int* ON_MeshNgon::m_fi |
unsigned int ON_MeshNgon::m_Vcount |
Number of N-gon corners (N >= 3)
unsigned int* ON_MeshNgon::m_vi |