Rhino C++ API
8.14
|
#include <opennurbs_subd.h>
Public Types | |
enum | : unsigned int { MaximumEdgeCount = 0xFFF0U, MaximumFaceCount = 0xFFF0U } |
Public Member Functions | |
ON_SubDVertex ()=default | |
ON_SubDVertex (const ON_SubDVertex &)=default | |
~ON_SubDVertex ()=default | |
const ON_SubDComponentPtrPair | BoundaryEdgePair () const |
const ON_BoundingBox | BoundingBox (ON_SubDComponentLocation subd_appearance, const ON_SubD &subd) const |
bool | ClearEdgeMarks () const |
bool | ClearFaceMarks () const |
void | ClearSavedSubdivisionPoints () const |
void | ClearSavedSubdivisionPoints (bool bClearNeighborhood) const |
void | ClearSavedSurfacePoints () const |
const ON_COMPONENT_INDEX | ComponentIndex () const |
const ON_SubDComponentPtr | ComponentPtr () const |
ON_BoundingBox | ControlNetBoundingBox () const |
const ON_3dPoint | ControlNetPoint () const |
const ON_SubDEdgePtr | CreasedEdge (bool bInteriorEdgesOnly) const |
const unsigned int | CreasedEdgeCount () const |
const unsigned int | CreasedEdgeCount (bool bCountInteriorCreases, bool bCountBoundaryCreases, bool bCountNonmanifoldCreases, bool bCountWireCreases) const |
const ON_SubDComponentPtrPair | CreasedEdgePair (bool bInteriorEdgesOnly) const |
const ON_3dPoint | DoubleSubdivisionPoint () const |
Get the location of the subdivision point of the vertex's subdivision vertex. More... | |
const class ON_SubDEdge * | Edge (unsigned int i) const |
unsigned int | EdgeArrayIndex (const ON_SubDEdge *edge) const |
unsigned int | EdgeCount () const |
*unsigned int | EdgeCount (ON_SubDEdgeTag edge_tag) const |
ON__UINT_PTR | EdgeDirection (unsigned int i) const |
const ON_SubDVertexEdgeProperties | EdgeProperties () const |
const ON_SubDEdgePtr | EdgePtr (unsigned int i) const |
bool | EvaluateCatmullClarkSubdivisionPoint (double subdivision_point[3]) const |
const class ON_SubDFace * | Face (unsigned int i) const |
unsigned int | FaceArrayIndex (const ON_SubDFace *face) const |
unsigned int | FaceCount () const |
bool | GetBoundaryVertexEdgeIndices (unsigned *vei0, unsigned *vei1) const |
bool | GetBoundaryVertexEdges (ON_SubDEdgePtr *eptr0, ON_SubDEdgePtr *eptr1) const |
bool | GetSavedSurfacePoint (double surface_point[3]) const |
double | GetSharpSubdivisionPoint (ON_3dPoint &sharp_subdivision_point) const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
double | GetSharpSubdivisionPoint (unsigned &count, const ON_SubDVertex *v[3], double c[3]) const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
bool | GetSubdivisionPoint (double subdivision_point[3]) const |
bool | GetSurfacePoint (const ON_SubDFace *sector_face, bool bUndefinedNormalIsPossible, class ON_SubDSectorSurfacePoint &limit_point) const |
bool | GetSurfacePoint (const ON_SubDFace *sector_face, class ON_SubDSectorSurfacePoint &limit_point) const |
bool | GetSurfacePoint (double surface_point[3]) const |
bool | HasBoundaryVertexTopology () const |
bool | HasInteriorVertexTopology () const |
bool | IsCorner () const |
bool | IsCrease () const |
bool | IsCreaseOrCorner () const |
bool | IsDart () const |
bool | IsDartOrCorner () const |
bool | IsDartOrCrease () const |
bool | IsDartOrCreaseOrCorner () const |
bool | IsManifoldBoundaryVertex () const |
bool | IsOneSectorCrease () const |
There are 2 configurations a valid crease vertex can have. More... | |
bool | IsSharp (bool bEndCheck) const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge. Note that when an edge has variable sharpness it can have zero sharpness at one end and nonzero shaprness at the other end. The bEndCheck parameter controls what type of sharpness query is performed. Note that the vertex subdivision point is affected by attached sharp edges when IsSharp(true) is is true (ON_Vertex::VertexSharpness() > 0). The vertex limit surface point is affected by edge sharpenss when IsSharp(false) is true. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
bool | IsSingleSectorVertex () const |
bool | IsSmooth () const |
bool | IsSmoothOrCrease () const |
bool | IsSmoothOrDart () const |
bool | IsSmoothOrDartOrCrease () const |
bool | IsStandard () const |
bool | IsTwoSectorCrease () const |
There are 2 configurations a valid crease vertex can have. More... | |
unsigned int | MarkedEdgeCount () const |
unsigned int | MarkedFaceCount () const |
unsigned int | MaximumEdgeFaceCount () const |
unsigned int | MaximumFaceEdgeCount () const |
unsigned int | MinimumEdgeFaceCount () const |
unsigned int | MinimumFaceEdgeCount () const |
const ON_ComponentStatus | NeighborhoodStatusLogicalOr (bool bIncludeEdges, bool bIncludeFaces) const |
ON_SubDVertex & | operator= (const ON_SubDVertex &)=default |
const ON_3dPoint | Point (ON_SubDComponentLocation subd_appearance) const |
bool | RemoveEdgeFromArray (const class ON_SubDEdge *f) |
bool | RemoveFaceFromArray (const class ON_SubDFace *f) |
unsigned int | ReplaceEdgeInArray (const ON_SubDEdge *old_edge, const ON_SubDEdgePtr new_edge) |
unsigned int | ReplaceFaceInArray (const ON_SubDFace *old_face, const ON_SubDFace *new_face) |
const ON_SubDSectorSurfacePoint & | SectorSurfacePointForExperts () const |
bool | SetControlNetPoint (ON_3dPoint control_net_point, bool bClearNeighborhoodCache) |
bool | SetSavedSurfacePoint (bool bUndefinedNormalIsPossible, const ON_SubDSectorSurfacePoint surface_point) const |
unsigned int | SharpEdgeCount (bool bCountCreasesAsSharp, bool bEndCheck) const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge. Note that the end sharpness at a vertex can be zero. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
unsigned int | SharpEdgeCount (bool bCountCreasesAsSharp, bool bEndCheck, ON_Interval &sharpness_range) const |
Get the range of sharpness values assigned to sharp edges and return the number of sharp edges. Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. Note that the end sharpness at a vertex can be zero. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
*ON_SubD::VertexEdgeOrder | SortEdges () |
const ON_3dPoint | SubdivisionPoint () const |
const ON_3dPoint | SubdivisionPoint (unsigned subdivision_count) const |
Get the location of the vertex's subdivision vertex. More... | |
ON_SubDVertexTag | SuggestedVertexTag (bool bApplyInputTagBias, bool bReturnBestGuessWhenInvalid) const |
ON_BoundingBox | SurfaceBoundingBox (const ON_SubD &subd) const |
const ON_3dVector | SurfaceNormal (const ON_SubDFace *sector_face, bool bUndefinedNormalPossible) const |
const ON_3dPoint | SurfacePoint () const |
bool | SurfacePointIsSet () const |
ON__UINT32 | TopologyCRC32 (bool bIncludeSubdivisionProperties) const |
Get a 32 bit CRC that is useful in detecting when a vertex's connections to attached edges or faces have been changed. More... | |
const ON_SHA1_Hash | TopologyHash (bool bIncludeSubdivisionProperties) const |
Get a SHA-1 hash that is useful in detecting when a vertex's connections to attached edges or faces have been changed. See also ON_SubDVertex::TopologyCRC32() which, in practice, is just as reliable as the hash. More... | |
const ON_wString | ToString (bool bIncludeControlNetPoint, bool bIncludeTopology) const |
bool | Transform (bool bTransformationSavedSubdivisionPoint, const class ON_Xform &xform) |
bool | Transform (bool bTransformationSavedSubdivisionPoint, const class ON_Xform &xform, const class ON_Xform &xformNormals) |
void | UnsetControlNetPoint () |
Sets the control net point to ON_3dPoint::NanPoint and clears saved subdivision points. More... | |
void | UnsetSectorCoefficientsForExperts (unsigned int relative_edge_end_dex) const |
const ON_Plane | VertexFrame (ON_SubDComponentLocation subd_appearance) const |
unsigned int | VertexId () const |
void | VertexModifiedNofification () const |
double | VertexSharpness () const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero end sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges. More... | |
bool | Write (class ON_BinaryArchive &archive) const |
Public Member Functions inherited from ON_SubDComponentBase | |
ON_SubDComponentBase ()=default | |
ON_SubDComponentBase (const ON_SubDComponentBase &)=default | |
~ON_SubDComponentBase ()=default | |
unsigned int | ArchiveId () const |
bool | ClearMark () const |
ON__UINT8 | ClearMarkBits () const |
void | ClearSavedSubdivisionPoint () const |
void | ClearSubdivisionDisplacement () const |
bool | GetSavedSubdivisionPoint (double subdivision_point[3]) const |
bool | GetSubdivisionDisplacement (double *) const |
bool | InSymmetrySet () const |
bool | IsActive () const |
bool | IsSymmetrySetPrimaryMotif () const |
bool | Mark () const |
ON__UINT8 | MarkBits () const |
ON_SubDComponentBase & | operator= (const ON_SubDComponentBase &)=default |
const ON_3dPoint | SavedSubdivisionPoint () const |
bool | SavedSubdivisionPointIsSet () const |
void | SetArchiveId (unsigned int archive_id) const |
bool | SetMark () const |
bool | SetMark (bool bMark) const |
ON__UINT8 | SetMarkBits (ON__UINT8 mark_bits) const |
bool | SetSavedSubdivisionPoint (const double subdivision_point[3]) const |
bool | SetSubdivisionDisplacement (const double *) |
void | SetSubdivisionLevel (unsigned level) |
const ON_ComponentStatus | Status () const |
const ON_3dVector | SubdivisionDisplacement () const |
bool | SubdivisionDisplacementIsNonzero () const |
const unsigned | SubdivisionLevel () const |
Static Public Member Functions | |
static int | CompareUnorderedEdges (const ON_SubDVertex *a, const ON_SubDVertex *b) |
static int | CompareUnorderedEdgesAndFaces (const ON_SubDVertex *a, const ON_SubDVertex *b) |
static int | CompareUnorderedFaces (const ON_SubDVertex *a, const ON_SubDVertex *b) |
static const ON_3dPoint | CreaseVertexSubdivisionPoint (const ON_3dPoint &P, double vertex_sharpness, const ON_3dPoint &A1, const ON_3dPoint &A2) |
Calculate the Catmull-Clark subdivision point for a crease vertex. More... | |
static bool | Read (class ON_BinaryArchive &archive, class ON_SubD &subd, class ON_SubDVertex *&vertex) |
Static Public Member Functions inherited from ON_SubDComponentBase | |
static int | CompareId (const ON_SubDComponentBase *lhs, const ON_SubDComponentBase *rhs) |
Public Attributes | |
unsigned short | m_edge_capacity = 0 |
unsigned short | m_edge_count = 0 |
class ON_SubDEdgePtr * | m_edges = nullptr |
unsigned short | m_face_capacity = 0 |
unsigned short | m_face_count = 0 |
const class ON_SubDFace ** | m_faces = nullptr |
const class ON_SubDVertex * | m_next_vertex = nullptr |
linked list of vertices on this level More... | |
double | m_P [3] |
vertex control net location More... | |
const class ON_SubDVertex * | m_prev_vertex = nullptr |
m_prev_vertex, m_next_vertex must be the first data members of ON_SubDVertex More... | |
ON_SubDVertexTag | m_vertex_tag = ON_SubDVertexTag::Unset |
Public Attributes inherited from ON_SubDComponentBase | |
unsigned int | m_group_id = 0U |
unsigned int | m_id = 0 |
ON_ComponentStatus | m_status = ON_ComponentStatus::NoneSet |
const class ON_SubDVertex * | m_subd_point1 = nullptr |
Static Public Attributes | |
static const ON_SubDVertex | Empty |
Static Public Attributes inherited from ON_SubDComponentBase | |
static const ON_SubDComponentBase | Unset |
Friends | |
class | ON_SubDArchiveIdMap |
class | ON_SubDEdge |
class | ON_SubDFace |
Additional Inherited Members | |
Protected Types inherited from ON_SubDComponentBase | |
enum | ModifiedFlags : unsigned char { Modified1Bit = 0x01, Modified2Bit = 0x02, ModifiedFlagsMask = 0x03 } |
enum | SavedPointsFlags : unsigned char { SubdivisionPointBit = 0x40, SurfacePointBit = 0x80, CachedPointMask = 0xC0 } |
Protected Member Functions inherited from ON_SubDComponentBase | |
void | CopyBaseFrom (const ON_SubDComponentBase *src, bool bCopySymmetrySetNext) |
void | Internal_ClearModifiedFlags () const |
void | Internal_ClearSubdivisionPointAndSurfacePointFlags () const |
void | Internal_ClearSubdivisionPointFlag () const |
void | Internal_ClearSurfacePointFlag () const |
bool | Internal_Modified1IsSet () const |
bool | Internal_Modified1or2IsSet () const |
void | Internal_SetModified1Flag () const |
void | Internal_SetModified2Flag () const |
void | Internal_SetSavedSurfacePointFlag (bool bSavedSurfacePointFlag) const |
bool | Internal_SubdivisionPointFlag () const |
bool | Internal_SurfacePointFlag () const |
void | Internal_TransformComponentBase (bool bTransformationSavedSubdivisionPoint, const class ON_Xform &xform) |
Protected Attributes inherited from ON_SubDComponentBase | |
unsigned char | m_level = 0U |
unsigned char | m_saved_points_flags = 0U |
double | m_saved_subd_point1 [3] |
GetSubdivisionPoint( bUseSavedSubdivisionPoint=true ) can change the value of m_cache_subd_P. More... | |
|
default |
|
default |
|
default |
const ON_SubDComponentPtrPair ON_SubDVertex::BoundaryEdgePair | ( | ) | const |
Returns: If this vertex has two boundary edges, they are returned in the pair with BoundaryEdgePair().First().EdgePtr().RelativeVetex(0) and BoundaryEdgePair().Second().EdgePtr().RelativeVetex(0) equal to this vertex. Otherwise ON_SubDComponentPtrPair::Null is returned.
const ON_BoundingBox ON_SubDVertex::BoundingBox | ( | ON_SubDComponentLocation | subd_appearance, |
const ON_SubD & | subd | ||
) | const |
bool ON_SubDVertex::ClearEdgeMarks | ( | ) | const |
Description: Clears all marks on edges. Returns: true if all edges are not null. false if any edges are null.
bool ON_SubDVertex::ClearFaceMarks | ( | ) | const |
Description: Clears all marks on faces. Returns: true if all faces are not null. false if any faces are null.
void ON_SubDVertex::ClearSavedSubdivisionPoints | ( | ) | const |
Description: Clears saved subdivision and limit surface information for this vertex. Attached edges and faces are not modified.
void ON_SubDVertex::ClearSavedSubdivisionPoints | ( | bool | bClearNeighborhood | ) | const |
Description: Clears saved subdivision and limit surface information for this vertex. Parameters: bClearNeighborhood - [in] If true, all edges and faces attached to this vertex are also cleared.
void ON_SubDVertex::ClearSavedSurfacePoints | ( | ) | const |
Description: In general, after you modify a vertex you should call VertexModifiedNotification().
This is an expert user function that clears any saved limit point evaluations for this vertex. No saved subdivision points are cleared. No modifications are made to attached edges or faces. Remarks: In general, you should call VertexModifiedNotification() after you modify a vertex. Compare with ClearSavedSubdivisionPoints() which clears any subdivision point limit point evaluations saved on this vertex.
|
static |
|
static |
|
static |
const ON_COMPONENT_INDEX ON_SubDVertex::ComponentIndex | ( | ) | const |
const ON_SubDComponentPtr ON_SubDVertex::ComponentPtr | ( | ) | const |
ON_BoundingBox ON_SubDVertex::ControlNetBoundingBox | ( | ) | const |
const ON_3dPoint ON_SubDVertex::ControlNetPoint | ( | ) | const |
const ON_SubDEdgePtr ON_SubDVertex::CreasedEdge | ( | bool | bInteriorEdgesOnly | ) | const |
Returns: If this vertex has one creased edge, it is returned. Otherwise ON_SubDEdgePtr::Null is returned.
const unsigned int ON_SubDVertex::CreasedEdgeCount | ( | ) | const |
Returns: Number of creased edges.
const unsigned int ON_SubDVertex::CreasedEdgeCount | ( | bool | bCountInteriorCreases, |
bool | bCountBoundaryCreases, | ||
bool | bCountNonmanifoldCreases, | ||
bool | bCountWireCreases | ||
) | const |
Description: Count creases with specified topology. Parameters: bCountInteriorCreases - [in] Count includes crease edges with 2 faces. bCountBoundaryCreases - [in] Count includes crease edges with 1 face. bCountNonmanifoldCreases - [in] Count includes crease edges with 3 or more faces. bCountWireCreases - [in] Count includes crease edges with 0 faces. Returns: Number of creased edges with the specified topology.
const ON_SubDComponentPtrPair ON_SubDVertex::CreasedEdgePair | ( | bool | bInteriorEdgesOnly | ) | const |
Returns: If this vertex has two creased edges, they are returned in the pair. Otherwise ON_SubDComponentPtrPair::Null is returned.
|
static |
Calculate the Catmull-Clark subdivision point for a crease vertex.
P | crease vertex control net point. | ||||
vertex_sharpness | maximum value of smooth edge sharpnesses at the crease vertex.
|
const ON_3dPoint ON_SubDVertex::DoubleSubdivisionPoint | ( | ) | const |
Get the location of the subdivision point of the vertex's subdivision vertex.
const class ON_SubDEdge* ON_SubDVertex::Edge | ( | unsigned int | i | ) | const |
unsigned int ON_SubDVertex::EdgeArrayIndex | ( | const ON_SubDEdge * | edge | ) | const |
unsigned int ON_SubDVertex::EdgeCount | ( | ) | const |
* unsigned int ON_SubDVertex::EdgeCount | ( | ON_SubDEdgeTag | edge_tag | ) | const |
ON__UINT_PTR ON_SubDVertex::EdgeDirection | ( | unsigned int | i | ) | const |
const ON_SubDVertexEdgeProperties ON_SubDVertex::EdgeProperties | ( | ) | const |
const ON_SubDEdgePtr ON_SubDVertex::EdgePtr | ( | unsigned int | i | ) | const |
bool ON_SubDVertex::EvaluateCatmullClarkSubdivisionPoint | ( | double | subdivision_point[3] | ) | const |
Description: Evaluates the Catmull-Clark subdivision point ignoring all cached information. This function is typically used in testing and debugging code and in ordinary cases, it is faster and better to call SubdivisionPoint() or GetSubdivisionPoint(). Parameters: subdivision_point - [out] The vertex Catmull-Clark subdivision point is returned here.
const class ON_SubDFace* ON_SubDVertex::Face | ( | unsigned int | i | ) | const |
unsigned int ON_SubDVertex::FaceArrayIndex | ( | const ON_SubDFace * | face | ) | const |
unsigned int ON_SubDVertex::FaceCount | ( | ) | const |
bool ON_SubDVertex::GetBoundaryVertexEdgeIndices | ( | unsigned * | vei0, |
unsigned * | vei1 | ||
) | const |
Parameters: vei0 - [out] vei1 - [out] If a vertex has exactly two attached edges, each of which has a single attached face, then the indices of those edges in the vertex's edge list are returned. Otherwise ON_UNSET_UINT_INDEX is returned. Returns: True if the vertex has exactly two attached edges, each of which has a single attached face. False otherwise.
bool ON_SubDVertex::GetBoundaryVertexEdges | ( | ON_SubDEdgePtr * | eptr0, |
ON_SubDEdgePtr * | eptr1 | ||
) | const |
Parameters: eptr0 - [out] eptr1 - [out] If a vertex has exactly two attached edges, each of which has a single attached face, then these edges are returned in the order the appear in the vertex's edge list. (RelativeVertex(0) = this vertex). Otherwise the parameters are set to null. Returns: True if the vertex has exactly two attached edges, each of which has a single attached face. False otherwise.
bool ON_SubDVertex::GetSavedSurfacePoint | ( | double | surface_point[3] | ) | const |
Description: If there is a saved limit surface point, then its location is returned in surface_point[]. Parameters: surface_point - [out] Returns: True if a saved limit surface point is returned. False if there is no saved limit surface point. The input value of surface_point[] is not changed.
double ON_SubDVertex::GetSharpSubdivisionPoint | ( | ON_3dPoint & | sharp_subdivision_point | ) | const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges.
sharp_subdivision_point | If the returned sharpness is > 0, then the sharp subdivision point is returned. When the returned sharpness is > 0 and < 1, the final subdivision point is a weighted average of sharp_subdivision_point and the ordinary subdivision point. When the returned sharpness is >= 1, the sharp subdivision point is used in place of the ordinary subdivision point. |
double ON_SubDVertex::GetSharpSubdivisionPoint | ( | unsigned & | count, |
const ON_SubDVertex * | v[3], | ||
double | c[3] | ||
) | const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges.
count | The returned value is 0 to 3 and is the number of output values vertices in v[] and c[]. If 1 <= count <=3, then sharp_subdivision_point = sum(0 <= i < count, c[i]*v[i]->ControlNetPoint()). Otherwise the vertex is not sharp. |
v | Output subdivision point vertices are returned here. |
c | Output subdivision point sum coefficients are returned here. |
bool ON_SubDVertex::GetSubdivisionPoint | ( | double | subdivision_point[3] | ) | const |
Parameters: bUseSavedSubdivisionPoint - [in] If there is a saved subdivision point and bUseSavedSubdivisionPoint is true, then the saved value is returned. subdivision_point - [out] The SubD vertex Catmull-Clark subdivision point is returned here. Returns: true if successful summary> The SubD vertex Catmull-Clark subdivision point. /summary>
bool ON_SubDVertex::GetSurfacePoint | ( | const ON_SubDFace * | sector_face, |
bool | bUndefinedNormalIsPossible, | ||
class ON_SubDSectorSurfacePoint & | limit_point | ||
) | const |
bool ON_SubDVertex::GetSurfacePoint | ( | const ON_SubDFace * | sector_face, |
class ON_SubDSectorSurfacePoint & | limit_point | ||
) | const |
Parameters: sector_face - [in] A face in the sector of interest limit_point - [out] Returns: true if successful
bool ON_SubDVertex::GetSurfacePoint | ( | double | surface_point[3] | ) | const |
bool ON_SubDVertex::HasBoundaryVertexTopology | ( | ) | const |
Description: A vertex has boundary vertex topology if EdgeCount() >= 2, EdgeCount() == 1+FaceCount(), two attached edges are attached to one face, the remaining edges are attached to two faces. Returns: True if the vertex has boundary vertex toplology. Remarks: Tags are ignored. This property is often used during construction and modification when tags are not set.
bool ON_SubDVertex::HasInteriorVertexTopology | ( | ) | const |
Description: A vertex has interior vertex topology if EdgeCount() >= 2, EdgeCount() == FaceCount(), and every attached edge has two attached faces. Returns: True if the vertex has interior vertex toplology. Remarks: Tags are ignored. This property is often used during construction and modification when tags are not set.
bool ON_SubDVertex::IsCorner | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Corner.
bool ON_SubDVertex::IsCrease | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Crease. If the vertex is a boundary crease, there will be one sector. If the vertex is an interior crease, there will be two sectors.
bool ON_SubDVertex::IsCreaseOrCorner | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Crease or ON_SubDVertexTag::Corner.
bool ON_SubDVertex::IsDart | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart.
bool ON_SubDVertex::IsDartOrCorner | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart or ON_SubDVertexTag::Corner
bool ON_SubDVertex::IsDartOrCrease | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart or ON_SubDVertexTag::Crease
bool ON_SubDVertex::IsDartOrCreaseOrCorner | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart, ON_SubDVertexTag::Crease or ON_SubDVertexTag::Corner.
bool ON_SubDVertex::IsManifoldBoundaryVertex | ( | ) | const |
Description: A manifold boundary vertex is a crease or corner vertex with 2 creased edges, each attached to a single face, and all other edges are smooth edges attached to two faces. There is a single sector at a manifold boundary vertex. Returns: True if the vertex has a single sector and, consequently, a single limit surface normal.
bool ON_SubDVertex::IsOneSectorCrease | ( | ) | const |
There are 2 configurations a valid crease vertex can have.
1) A crease vertex with one sector has EdgeCount() = 1+FaceCount(), two crease edges that are attached to a single face, and the other edges are smooth and are attached to two faces.
2) A crease vertex with two sectors has EdgeCount() = FaceCount(), two crease edges, and all edges are attached to two faces.
In a complete SubD (not a subset), a 1 sector crease vertex is always on the boundary of the SubD. In all cases a 2 sector crease vertex is an interior vertex.
bool ON_SubDVertex::IsSharp | ( | bool | bEndCheck | ) | const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge. Note that when an edge has variable sharpness it can have zero sharpness at one end and nonzero shaprness at the other end. The bEndCheck parameter controls what type of sharpness query is performed. Note that the vertex subdivision point is affected by attached sharp edges when IsSharp(true) is is true (ON_Vertex::VertexSharpness() > 0). The vertex limit surface point is affected by edge sharpenss when IsSharp(false) is true. See ON_SubDEdge::IsSharp() for more information about sharp edges.
bEndCheck | When bEndCheck is false, the check looks for edges with any nonzero sharpness. When bEndCheck is true, the check looks for edges with nonzero sharpness at this vertex. |
bool ON_SubDVertex::IsSingleSectorVertex | ( | ) | const |
Description: A single sector vertex is a smooth vertex, a dart vertex, or a manifold boundary vertex. Returns: True if the vertex has a single sector and, consequently, a single limit surface normal.
bool ON_SubDVertex::IsSmooth | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth.
bool ON_SubDVertex::IsSmoothOrCrease | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Crease.
bool ON_SubDVertex::IsSmoothOrDart | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Dart.
bool ON_SubDVertex::IsSmoothOrDartOrCrease | ( | ) | const |
Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Dart or ON_SubDVertexTag::Crease.
bool ON_SubDVertex::IsStandard | ( | ) | const |
Description: A "standard" vertex is one where the standard subdivsion matrix for that vertex can be used to calculate the subdivision point. This function is designed to be useful for testing and debugging code when a certain situation is expected to exist. It is not used for evaluation because it is too slow.
Returns: True if the subdivison point of the vertex can be calculated using the standard subdivion matrix for the vertex type and face count.
Remarks: If the vertex is tagged and has multiple sectors, like an interior crease or corner vertex, then this function will return false. In this situation, it is possible that the vertex, as the center of a sector, is standard.
bool ON_SubDVertex::IsTwoSectorCrease | ( | ) | const |
There are 2 configurations a valid crease vertex can have.
1) A crease vertex with one sector has EdgeCount() = 1+FaceCount(), two crease edges that are attached to a single face, and the other edges are smooth and are attached to two faces.
2) A crease vertex with two sectors has EdgeCount() = FaceCount(), two crease edges, and all edges are attached to two faces.
In a complete SubD (not a subset), a 1 sector crease vertex is always on the boundary of the SubD. In all cases a 2 sector crease vertex is an interior vertex.
unsigned int ON_SubDVertex::MarkedEdgeCount | ( | ) | const |
Returns: Number of edges attached to this vertex with Edge().m_status.RuntimeMark() = true;
unsigned int ON_SubDVertex::MarkedFaceCount | ( | ) | const |
Returns: Number of faces attached to this vertex with Face().m_status.RuntimeMark() = true;
unsigned int ON_SubDVertex::MaximumEdgeFaceCount | ( | ) | const |
Returns: Maximum number of faces for any edge attached to this vertex.
unsigned int ON_SubDVertex::MaximumFaceEdgeCount | ( | ) | const |
Returns: Maximum number of edges for any face attached to this vertex.
unsigned int ON_SubDVertex::MinimumEdgeFaceCount | ( | ) | const |
Returns: Minimum number of faces for any edge attached to this vertex.
unsigned int ON_SubDVertex::MinimumFaceEdgeCount | ( | ) | const |
Returns: Minimum number of edges for any face attached to this vertex.
const ON_ComponentStatus ON_SubDVertex::NeighborhoodStatusLogicalOr | ( | bool | bIncludeEdges, |
bool | bIncludeFaces | ||
) | const |
Parameters: bIncludeEdges - [in] If true, then attached edges are included. bIncludeFaces - [in] If true, then attached faces are included. Returns: A ON_ComponentStatusLogicalOr() of this vertex's status and the specified attached components. See Also: ON_SubDComponentBase::Status()
|
default |
const ON_3dPoint ON_SubDVertex::Point | ( | ON_SubDComponentLocation | subd_appearance | ) | const |
Parameters: subd_appearance - [in] If ON_SubDComponentLocation::ControlNet, then this->ControlNetPoint() is returned. If ON_SubDComponentLocation::Surface, then this->SurfacePoint() is returned. Otherwise ON_3dPoint::NanPoint is returned.
|
static |
bool ON_SubDVertex::RemoveEdgeFromArray | ( | const class ON_SubDEdge * | f | ) |
Description: Expert user tool to remove an edge from the vertex's m_edges[] array. Remarks: Does not modify the edge. If the vertex is referenced by the edge, then the vertex must be removed from edge's m_vertex[] array.
bool ON_SubDVertex::RemoveFaceFromArray | ( | const class ON_SubDFace * | f | ) |
Description: Expert user tool to remove a face from the vertex's m_faces[] array. Remarks: Does not modify the face or any edges. The faces edges must be updated accordingly.
unsigned int ON_SubDVertex::ReplaceEdgeInArray | ( | const ON_SubDEdge * | old_edge, |
const ON_SubDEdgePtr | new_edge | ||
) |
Description: Expert user tool to replace reference to old_edge with a reference to new_edge. Parameters: old_edge = [in]
Cannot be nullptr. new_edge = [in] If new_edge is Null, old_edge is simply removed. Returns: If the replacement was successful, then the m_edges[] array index where old_edge/new_edge replacement occurred is returned. Otherwise ON_UNSET_UINT_INDEX is returned. Remarks: No modifications are made to old_edge or new_edge.
unsigned int ON_SubDVertex::ReplaceFaceInArray | ( | const ON_SubDFace * | old_face, |
const ON_SubDFace * | new_face | ||
) |
Description: Expert user tool to replace reference to old_face with a reference to new_face. Parameters: old_face = [in]
Cannot be nullptr. new_face = [in] If new_face is nullptr, old_face is simply removed. Returns: If the replacement was successful, then the m_faces[] array index where old_face/new_face replacement occurred is returned. Otherwise ON_UNSET_UINT_INDEX is returned. Remarks: No modifications are made to old_face or new_face.
const ON_SubDSectorSurfacePoint& ON_SubDVertex::SectorSurfacePointForExperts | ( | ) | const |
bool ON_SubDVertex::SetControlNetPoint | ( | ON_3dPoint | control_net_point, |
bool | bClearNeighborhoodCache | ||
) |
bool ON_SubDVertex::SetSavedSurfacePoint | ( | bool | bUndefinedNormalIsPossible, |
const ON_SubDSectorSurfacePoint | surface_point | ||
) | const |
Description: Save limit surface point and limit normal for future use. Parameters: bUndefinedNormalIsPossible - [in] true if an undefined normal might occur surface_point - [in] Returns: true if successful Remarks: ClearSavedSubdivisionPoints() clears any saved limit points.
unsigned int ON_SubDVertex::SharpEdgeCount | ( | bool | bCountCreasesAsSharp, |
bool | bEndCheck | ||
) | const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge. Note that the end sharpness at a vertex can be zero. See ON_SubDEdge::IsSharp() for more information about sharp edges.
bUseCreaseSharpness | When bCountCreasesAsSharp is true, crease edges are counted. |
bEndCheck | When bEndCheck is false, the check looks for edges with any nonzero sharpness. When bEndCheck is true, the check looks for edges with nonzero sharpness at this vertex. |
unsigned int ON_SubDVertex::SharpEdgeCount | ( | bool | bCountCreasesAsSharp, |
bool | bEndCheck, | ||
ON_Interval & | sharpness_range | ||
) | const |
Get the range of sharpness values assigned to sharp edges and return the number of sharp edges. Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero sharpness at the vertex. Note that the end sharpness at a vertex can be zero. See ON_SubDEdge::IsSharp() for more information about sharp edges.
bCountCreasesAsSharp | When bCountCreasesAsSharp is true, creases are counted and ON_SubDEdgeSharpness::CreaseValue is used as a crease edge sharpness. |
bEndCheck | When bEndCheck is false, the check looks for edges with any nonzero sharpness. When bEndCheck is true, the check looks for edges with nonzero sharpness at this vertex. |
sharpness_range | The range of sharpness values is returned here. If bEndCheck is false, sharpness_range is the minimum and maximum of attached_edge->MaximumEndSharpness() for any attached sharp edge. If bEndCheck is false, sharpness_range is the minimum and maximum of nonzero attached_edge->MaximumEndSharpness() for any attached sharp edge. If no sharp edges are attached, then (0,0) is returned. |
* ON_SubD::VertexEdgeOrder ON_SubDVertex::SortEdges | ( | ) |
const ON_3dPoint ON_SubDVertex::SubdivisionPoint | ( | ) | const |
const ON_3dPoint ON_SubDVertex::SubdivisionPoint | ( | unsigned | subdivision_count | ) | const |
Get the location of the vertex's subdivision vertex.
subdivision_count | subdivision_count >= 0 is the number of subdivisions to perform. |
ON_SubDVertexTag ON_SubDVertex::SuggestedVertexTag | ( | bool | bApplyInputTagBias, |
bool | bReturnBestGuessWhenInvalid | ||
) | const |
Parameters: bApplyInputTagBias - [in] If bApplyInputTagBias is true, the current tag value is used to choose between possible output results. When in doubt, pass false. bReturnBestGuessWhenInvalid If bReturnBestGuessWhenInvalid is true and the topology and current edges tags do not meet the conditions for a valid vertex, then a best guess for a vertex tag is returned. Otherwise ON_SubDVertexTag::Unset is returned. When in doubt pass false and check for unset before using. Returns: The suggested value for this vertices tag based on its current tag value and its current edges. Assumes the vertex and edge topology are correct and the edge tags are correctly set.
ON_BoundingBox ON_SubDVertex::SurfaceBoundingBox | ( | const ON_SubD & | subd | ) | const |
const ON_3dVector ON_SubDVertex::SurfaceNormal | ( | const ON_SubDFace * | sector_face, |
bool | bUndefinedNormalPossible | ||
) | const |
Parameters: sector_face - [in] When the vertex is a crease or corner vertex, different sectors typically have different normals and you must specify a face to determine the sector. bUndefinedNormalPossible - [in] If the SubD control net is degenerate around the vertex, the normal may be zero. Pass true if you will accept a zero normal vector. Otherwise ON_3dVector::NanVector is returned when a non-zero normal cannot be calculated. Returns: The SubD surface normal.
const ON_3dPoint ON_SubDVertex::SurfacePoint | ( | ) | const |
Returns: The SubD surface point.
bool ON_SubDVertex::SurfacePointIsSet | ( | ) | const |
Returns: true The vertex limit point and at least one sector normal are saved for Catmull-Clark quad subdivision.
ON__UINT32 ON_SubDVertex::TopologyCRC32 | ( | bool | bIncludeSubdivisionProperties | ) | const |
Get a 32 bit CRC that is useful in detecting when a vertex's connections to attached edges or faces have been changed.
bIncludeSubdivisionProperties | Pass true if you want to include nontopological subdivision properties (tags, sharpnesses, control net point) that help determine the vertex's subdivision point in the CRC. |
const ON_SHA1_Hash ON_SubDVertex::TopologyHash | ( | bool | bIncludeSubdivisionProperties | ) | const |
Get a SHA-1 hash that is useful in detecting when a vertex's connections to attached edges or faces have been changed. See also ON_SubDVertex::TopologyCRC32() which, in practice, is just as reliable as the hash.
bIncludeSubdivisionProperties | Pass true if you want to include nontopological subdivision properties (tags, sharpnesses, control net point) that help determine the vertex's subdivision point in the hash. |
const ON_wString ON_SubDVertex::ToString | ( | bool | bIncludeControlNetPoint, |
bool | bIncludeTopology | ||
) | const |
bool ON_SubDVertex::Transform | ( | bool | bTransformationSavedSubdivisionPoint, |
const class ON_Xform & | xform | ||
) |
Description: Apply a transformation matrix to vertex geometry information. Parameters: bTransformationSavedSubdivisionPoint - [in] If the transformation is being applied to every vertex, edge and face in every level of a subdivision object, and the transformation is an orientation preserving isometry (rotation, translation, ...), then set bTransformationSavedSubdivisionPoint = true to apply the transformation to saved subdivision and saved limit point information. In all other cases, set bTransformationSavedSubdivisionPoint = false and any saved subdivision points or saved limit points will be deleted. When in doubt, pass false.
xform - [in]
bool ON_SubDVertex::Transform | ( | bool | bTransformationSavedSubdivisionPoint, |
const class ON_Xform & | xform, | ||
const class ON_Xform & | xformNormals | ||
) |
void ON_SubDVertex::UnsetControlNetPoint | ( | ) |
Sets the control net point to ON_3dPoint::NanPoint and clears saved subdivision points.
void ON_SubDVertex::UnsetSectorCoefficientsForExperts | ( | unsigned int | relative_edge_end_dex | ) | const |
Description: Expert user tool to unset ON_SubEdge.m_sector_coefficent[] values for edges attached to this vertex. Parameters: relative_edge_end_dex - [in] 0: unset vertex edge sector coefficient at the end where the edges attaches to this vertex. 1: unset vertex edge sector coefficient at the end where the edges attaches to the other vertex. 2: unset vertex edge sector coefficients at both ends of the edge.
const ON_Plane ON_SubDVertex::VertexFrame | ( | ON_SubDComponentLocation | subd_appearance | ) | const |
unsigned int ON_SubDVertex::VertexId | ( | ) | const |
void ON_SubDVertex::VertexModifiedNofification | ( | ) | const |
Description: Call this function if the vertex is modified. It will clear saved subdivision information on the vertex and neighboring faces and edges that needs to be recalculated.
double ON_SubDVertex::VertexSharpness | ( | ) | const |
Sharp vertices are smooth, crease or dart vertices attached to at least one sharp edge with nonzero end sharpness at the vertex. See ON_SubDEdge::IsSharp() for more information about sharp edges.
bool ON_SubDVertex::Write | ( | class ON_BinaryArchive & | archive | ) | const |
|
friend |
|
friend |
|
friend |
|
static |
unsigned short ON_SubDVertex::m_edge_capacity = 0 |
unsigned short ON_SubDVertex::m_edge_count = 0 |
class ON_SubDEdgePtr* ON_SubDVertex::m_edges = nullptr |
Array of m_edge_count edges. m_edge[i].EdgeDirection() indicates which edge end is located at this vertex If m_edge_capacity > 0, m_edge_capacity is the number of elements that may be used in m_edges[].
unsigned short ON_SubDVertex::m_face_capacity = 0 |
unsigned short ON_SubDVertex::m_face_count = 0 |
const class ON_SubDFace** ON_SubDVertex::m_faces = nullptr |
Array of m_face_count faces. If m_face_capacity > 0, m_face_capacity is the number of elements that may be used in m_faces[].
const class ON_SubDVertex* ON_SubDVertex::m_next_vertex = nullptr |
linked list of vertices on this level
double ON_SubDVertex::m_P[3] |
vertex control net location
summary> The SubD vertex control net point. /summary>
const class ON_SubDVertex* ON_SubDVertex::m_prev_vertex = nullptr |
m_prev_vertex, m_next_vertex must be the first data members of ON_SubDVertex
linked list of vertices on this level
ON_SubDVertexTag ON_SubDVertex::m_vertex_tag = ON_SubDVertexTag::Unset |