|
Rhino C++ API
9.0
|
#include <opennurbs_subd.h>
Public Types | |
| enum | ExtraordinarySource : unsigned char { ExtraordinarySource::Unset = 0, ExtraordinarySource::None = 1, ExtraordinarySource::Level0ExtraordinaryVertex = 2, ExtraordinarySource::Level1NgonCenterVertex = 3 } |
| When a ON_SubDFaceRegion::Type is Extraordinary or ExtraordinaryAdjacent, the ExtraordinarySource enum indicates if the source of the extraordinary vertex was a level 0 extraordinary vertex or a level 1 extraordinary vertex at the center of a level 0 N-gon face. More... | |
| enum | Type : unsigned char { Type::Unset = 0, Type::Ordinary = 1, Type::Extraordinary = 2, Type::ExtraordinaryAdjacent = 3 } |
| ON_SubDFaceRegion::Type has meaning only for regions of a SubD face that result from two or more subdivisions. The Type is used in creating NURBS approximations of SubD near level 0 extraordinary vertices level 1 extraordinary vertices that result from subdividing level 0 faces that have 3 or 5 or more edges (also called N-gon faces). More... | |
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_SubDFace * | Level0Face () const |
| This is an expert user function that can return either Level0PersistentFace() or a transient face. Using this pointer depends on the constext. If you are not managing the entire creation process of the ON_SubDFaceRegion, you should be using Level0PersistentFace(). More... | |
| const ON_SubDFace * | Level0PersistentFace () const |
| An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face in an ON_SubD, it is called a persistent face. This function returns faces that have been set as persistent level 0 faces. More... | |
| unsigned | Level0PersistentFaceId () const |
| An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face in an ON_SubD, it is called a persistent face. This function returns faces that have been set as persistent level 0 faces. More... | |
| const ON_SubDVertex * | Level0PersistentVertex () const |
| An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face on from an ON_SubD, it is a persistent face and the level 1 quad has one corner at a face vertex. This vertex is returned by Level0PersistentVertex(). NOTE WELL: The caller must insure the parent ON_SubD exists before calling Level0PersistentVertex(). More... | |
| unsigned | Level0PersistentVertexId () const |
| An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face on from an ON_SubD, it is a persistent face and the level 1 quad has one corner at a face vertex. This vertex is returned by Level0PersistentVertex(). NOTE WELL: The caller must insure the parent ON_SubD exists before calling Level0PersistentVertex(). More... | |
| ON_SubDFaceRegion & | operator= (const ON_SubDFaceRegion &)=default |
| void | Push (unsigned int quadrant_index) |
| ON_SubDFaceRegion::ExtraordinarySource | RegionExtraordinarySource () const |
| RegionExtraordinarySource() applies only when RegionType() is Extraordinary or ExtraordinaryAdjacent and the region is a result of 2 or more subdivisions. More... | |
| unsigned | RegionExtraordinaryValence () const |
| When the region is near a leve 0 or leve 1 extraordinary vertex, this function returns the valence of the extraodinary vertex. When RegionExtraordinarySource() = Level0ExtraordinaryVertex, this is the number of faces and edges around the level 0 vertex. When RegionExtraordinarySource() = Level1NgonCenterVertex, this is the number edges around the level 0 ngon which is also the number of edges and faces around the level 1 extraordinary vertex at the center of the ngon. /// More... | |
| ON_SubDFaceRegion::Type | RegionType () const |
| RegionType() applys only when the regions is a result of 2 or more subdivisions. More... | |
| const ON_wString | ToString () const |
| wchar_t * | ToString (wchar_t *s, size_t s_capacity) const |
Static Public Member Functions | |
| static int | CompareSourceLevel0IdAndType (const ON_SubDFaceRegion *lhs, const ON_SubDFaceRegion *rhs) |
| CompareSourceLevel0IdAndType is used to sort regions from the same subdivision level around level 0 extraordinary vertices and level 1 extraordinary vertices at the center of ngons. This is typically done in the context of calculating NURBS approsimations for subdivision regions that an extraordinary vertex. The compare is done as follows. 1st compare is RegionExtraordinarySource(). Unset < None < Level0ExtraordinaryVertex < Level1NgonCenterVertex. If lhs and rhs have the same value of RegionExtraordinarySource(), the 2nd compare is the component id. If the common source is Level0ExtraordinaryVertex, the vertex ids of Level0PersistentVertex() are compared. Otherwise the face ids of Level0PersistentFace() are compared. If lhs and rhs have the same component id, the 3rd compare is RegionType(). Unset < Ordinary < Extraordinary < ExtraordinaryAdjacent. Typically, this sort is happing in the context where the Extraordinary regions are being replaced with NURBS approximations that are G2 with ExtraordinaryAdjacent regions. More... | |
Public Attributes | |
| ON_SubDComponentRegion | m_edge_region [4] |
| ON_SubDComponentRegion | m_face_region |
| Identifies a region of an ON_SubDFace. More... | |
| ON_SubDSectorId | m_sector_id [4] |
| unsigned int | m_vertex_id [4] = {} |
Static Public Attributes | |
| static const ON_SubDFaceRegion | Empty |
|
strong |
When a ON_SubDFaceRegion::Type is Extraordinary or ExtraordinaryAdjacent, the ExtraordinarySource enum indicates if the source of the extraordinary vertex was a level 0 extraordinary vertex or a level 1 extraordinary vertex at the center of a level 0 N-gon face.
|
strong |
ON_SubDFaceRegion::Type has meaning only for regions of a SubD face that result from two or more subdivisions. The Type is used in creating NURBS approximations of SubD near level 0 extraordinary vertices level 1 extraordinary vertices that result from subdividing level 0 faces that have 3 or 5 or more edges (also called N-gon faces).
|
default |
|
default |
|
default |
|
static |
CompareSourceLevel0IdAndType is used to sort regions from the same subdivision level around level 0 extraordinary vertices and level 1 extraordinary vertices at the center of ngons. This is typically done in the context of calculating NURBS approsimations for subdivision regions that an extraordinary vertex. The compare is done as follows. 1st compare is RegionExtraordinarySource(). Unset < None < Level0ExtraordinaryVertex < Level1NgonCenterVertex. If lhs and rhs have the same value of RegionExtraordinarySource(), the 2nd compare is the component id. If the common source is Level0ExtraordinaryVertex, the vertex ids of Level0PersistentVertex() are compared. Otherwise the face ids of Level0PersistentFace() are compared. If lhs and rhs have the same component id, the 3rd compare is RegionType(). Unset < Ordinary < Extraordinary < ExtraordinaryAdjacent. Typically, this sort is happing in the context where the Extraordinary regions are being replaced with NURBS approximations that are G2 with ExtraordinaryAdjacent regions.
| lhs | |
| rhs |
| 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.
| bool ON_SubDFaceRegion::IsValid | ( | bool | bSilentError | ) | const |
| const ON_SubDFace* ON_SubDFaceRegion::Level0Face | ( | ) | const |
This is an expert user function that can return either Level0PersistentFace() or a transient face. Using this pointer depends on the constext. If you are not managing the entire creation process of the ON_SubDFaceRegion, you should be using Level0PersistentFace().
| const ON_SubDFace* ON_SubDFaceRegion::Level0PersistentFace | ( | ) | const |
An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face in an ON_SubD, it is called a persistent face. This function returns faces that have been set as persistent level 0 faces.
| unsigned ON_SubDFaceRegion::Level0PersistentFaceId | ( | ) | const |
An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face in an ON_SubD, it is called a persistent face. This function returns faces that have been set as persistent level 0 faces.
| const ON_SubDVertex* ON_SubDFaceRegion::Level0PersistentVertex | ( | ) | const |
An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face on from an ON_SubD, it is a persistent face and the level 1 quad has one corner at a face vertex. This vertex is returned by Level0PersistentVertex(). NOTE WELL: The caller must insure the parent ON_SubD exists before calling Level0PersistentVertex().
| unsigned ON_SubDFaceRegion::Level0PersistentVertexId | ( | ) | const |
An ON_SubDFaceRegion is a subdivision quad of a face. When that face is a level 0 face on from an ON_SubD, it is a persistent face and the level 1 quad has one corner at a face vertex. This vertex is returned by Level0PersistentVertex(). NOTE WELL: The caller must insure the parent ON_SubD exists before calling Level0PersistentVertex().
|
default |
| void ON_SubDFaceRegion::Push | ( | unsigned int | quadrant_index | ) |
| ON_SubDFaceRegion::ExtraordinarySource ON_SubDFaceRegion::RegionExtraordinarySource | ( | ) | const |
RegionExtraordinarySource() applies only when RegionType() is Extraordinary or ExtraordinaryAdjacent and the region is a result of 2 or more subdivisions.
| unsigned ON_SubDFaceRegion::RegionExtraordinaryValence | ( | ) | const |
When the region is near a leve 0 or leve 1 extraordinary vertex, this function returns the valence of the extraodinary vertex. When RegionExtraordinarySource() = Level0ExtraordinaryVertex, this is the number of faces and edges around the level 0 vertex. When RegionExtraordinarySource() = Level1NgonCenterVertex, this is the number edges around the level 0 ngon which is also the number of edges and faces around the level 1 extraordinary vertex at the center of the ngon. ///
| ON_SubDFaceRegion::Type ON_SubDFaceRegion::RegionType | ( | ) | const |
RegionType() applys only when the regions is a result of 2 or more subdivisions.
| const ON_wString ON_SubDFaceRegion::ToString | ( | ) | const |
| wchar_t* ON_SubDFaceRegion::ToString | ( | wchar_t * | s, |
| size_t | s_capacity | ||
| ) | const |
|
static |
| 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.
| ON_SubDComponentRegion ON_SubDFaceRegion::m_face_region |
Identifies a region of an ON_SubDFace.
|
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.
|
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.
1.8.17