Rhino C++ API  8.13
Public Member Functions | Public Attributes | List of all members
ON_MeshTopologyFace Struct Reference

#include <opennurbs_mesh.h>

Public Member Functions

bool IsQuad () const
 
bool IsTriangle () const
 
bool IsValid () const
 

Public Attributes

char m_reve [4]
 
int m_topei [4]
 

Member Function Documentation

◆ IsQuad()

bool ON_MeshTopologyFace::IsQuad ( ) const

Description: A topological mesh face is a valid quad if m_topei[0], m_topei[1], m_topei[2], and m_topei[3] are distinct edges. Returns: True if face is a quad.

◆ IsTriangle()

bool ON_MeshTopologyFace::IsTriangle ( ) const

Description: A topological mesh face is a valid triangle if m_topei[0], m_topei[1], m_topei[2] are distinct edges and m_topei[3]=m_topei[2]. Returns: True if face is a triangle.

◆ IsValid()

bool ON_MeshTopologyFace::IsValid ( ) const

Description: A topological mesh face is valid if m_topei[0], m_topei[1], and m_topei[2] are mutually distinct, and m_topei[3] is either equal to m_topei[2] or mutually distinct from the first three indices. Returns: True if face is valid.

Member Data Documentation

◆ m_reve

char ON_MeshTopologyFace::m_reve[4]

If m_reve[i] is 0, then the orientation of the edge matches the orientation of the face. If m_reve[i] is 1, then the orientation of the edge is opposite that of the face.

◆ m_topei

int ON_MeshTopologyFace::m_topei[4]

m_topei[] = indices of the topological edges that bound the face. If m_topei[2] = m_topei[3], then the face is a triangle, otherwise the face is a quad.

NOTE WELL: The topological edge with index m_topei[k] ENDS at the vertex corresponding to ON_MeshFace.vi[k]. So, ...

If the face is a quad, (ON_MeshFace.vi[2]!=ON_MeshFace.vi[3]), the topological edge with index m_topei[0] STARTS at ON_MeshFace.vi[3] and ENDS at ON_MeshFace.vi[0], the topological edge with index m_topei[1] STARTS at ON_MeshFace.vi[0] and ENDS at ON_MeshFace.vi[1], the topological edge with index m_topei[2] STARTS at ON_MeshFace.vi[1] and ENDS at ON_MeshFace.vi[2], and the topological edge with index m_topei[3] STARTS at ON_MeshFace.vi[2] and ENDS at ON_MeshFace.vi[3],

If the face is a triangle, (ON_MeshFace.vi[2]==ON_MeshFace.vi[3]), the topological edge with index m_topei[0] STARTS at ON_MeshFace.vi[2] and ENDS at ON_MeshFace.vi[0], the topological edge with index m_topei[1] STARTS at ON_MeshFace.vi[0] and ENDS at ON_MeshFace.vi[1], the topological edge with index m_topei[2] STARTS at ON_MeshFace.vi[1] and ENDS at ON_MeshFace.vi[2].