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

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDFaceRegion ()=default
 
 ON_SubDFaceRegion (const ON_SubDFaceRegion &)=default
 
 ~ON_SubDFaceRegion ()=default
 
unsigned int CornerIndexFromVertexId (unsigned int vertex_id) const
 
bool IsValid (bool bSilentError) const
 
const ON_SubDFaceLevel0Face () const
 
ON_SubDFaceRegionoperator= (const ON_SubDFaceRegion &)=default
 
void Push (unsigned int quadrant_index)
 
const ON_wString ToString () const
 
wchar_t * ToString (wchar_t *s, size_t s_capacity) const
 

Public Attributes

ON_SubDComponentRegion m_edge_region [4]
 
ON_SubDComponentRegion m_face_region
 Identifies a region of an ON_SubDFace. More...
 
unsigned int m_level0_edge_count = 0
 
ON_SubDSectorId m_sector_id [4]
 
unsigned int m_vertex_id [4] = {}
 

Static Public Attributes

static const ON_SubDFaceRegion Empty
 

Constructor & Destructor Documentation

◆ ON_SubDFaceRegion() [1/2]

ON_SubDFaceRegion::ON_SubDFaceRegion ( )
default

◆ ~ON_SubDFaceRegion()

ON_SubDFaceRegion::~ON_SubDFaceRegion ( )
default

◆ ON_SubDFaceRegion() [2/2]

ON_SubDFaceRegion::ON_SubDFaceRegion ( const ON_SubDFaceRegion )
default

Member Function Documentation

◆ CornerIndexFromVertexId()

unsigned int ON_SubDFaceRegion::CornerIndexFromVertexId ( unsigned int  vertex_id) const

Returns: If vertex_id > 0 and there is a unique element of m_vertex_id[] with the same value, the index of that element is returned (0,1,2 or 3). Otherwise ON_UNSET_UNINT_INDEX is returned.

◆ IsValid()

bool ON_SubDFaceRegion::IsValid ( bool  bSilentError) const

◆ Level0Face()

const ON_SubDFace* ON_SubDFaceRegion::Level0Face ( ) const

◆ operator=()

ON_SubDFaceRegion& ON_SubDFaceRegion::operator= ( const ON_SubDFaceRegion )
default

◆ Push()

void ON_SubDFaceRegion::Push ( unsigned int  quadrant_index)

◆ ToString() [1/2]

const ON_wString ON_SubDFaceRegion::ToString ( ) const

◆ ToString() [2/2]

wchar_t* ON_SubDFaceRegion::ToString ( wchar_t *  s,
size_t  s_capacity 
) const

Member Data Documentation

◆ Empty

const ON_SubDFaceRegion ON_SubDFaceRegion::Empty
static

◆ m_edge_region

ON_SubDComponentRegion ON_SubDFaceRegion::m_edge_region[4]

When the face region is a quad, m_edge_region[4] identifies regions of ON_SubDEdge elements. When the face region is a sub-quad, these edges may be null or have null ON_SubDEdge pointers and the ids will be zero or ON_SubDComponentRegion::IsTransientId() will be true. When ON_SubDComponentRegion::IsTransientId() is true, the id does not identify a persistent edge in the ON_SubD.

◆ m_face_region

ON_SubDComponentRegion ON_SubDFaceRegion::m_face_region

Identifies a region of an ON_SubDFace.

◆ m_level0_edge_count

unsigned int ON_SubDFaceRegion::m_level0_edge_count = 0

◆ m_sector_id

ON_SubDSectorId ON_SubDFaceRegion::m_sector_id[4]
mutable

When a vertex is exceptional, a NURBS conversion is typically an approximation of the SubD around the exceptional vertex. There are a variety of post processes that can be applied in this case and the processes need to be applied sector by sector. Note well that when a level zero face is an N-gon with N != 4, the face subdivision point is an exceptional smooth vertex with valence = N. In this case the corresponding m_vertex_id[] value will be zero.

◆ m_vertex_id

unsigned int ON_SubDFaceRegion::m_vertex_id[4] = {}
mutable

If set, these are the vertice ids at the region's limit surface corners. m_vertex_id[] is mutable because these values appear during recursive calculations. When the face region is a sub-quad, these ids will be zero or ON_SubDComponentRegion::IsTransientId() will be true. When ON_SubDComponentRegion::IsTransientId() is true, the id does not identify a persistent vertex in the ON_SubD.