Rhino C++ API  8.13
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
ON_SubDVertex Class Reference

#include <opennurbs_subd.h>

Inheritance diagram for ON_SubDVertex:
ON_SubDComponentBase

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_SubDEdgeEdge (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_SubDFaceFace (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_SubDVertexoperator= (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_SubDSectorSurfacePointSectorSurfacePointForExperts () 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_SubDComponentBaseoperator= (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_SubDEdgePtrm_edges = nullptr
 
unsigned short m_face_capacity = 0
 
unsigned short m_face_count = 0
 
const class ON_SubDFace ** m_faces = nullptr
 
const class ON_SubDVertexm_next_vertex = nullptr
 linked list of vertices on this level More...
 
double m_P [3]
 vertex control net location More...
 
const class ON_SubDVertexm_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_SubDVertexm_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...
 

Detailed Description

ON_SubDVertex

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int
Enumerator
MaximumEdgeCount 
MaximumFaceCount 

Constructor & Destructor Documentation

◆ ON_SubDVertex() [1/2]

ON_SubDVertex::ON_SubDVertex ( )
default

◆ ~ON_SubDVertex()

ON_SubDVertex::~ON_SubDVertex ( )
default

◆ ON_SubDVertex() [2/2]

ON_SubDVertex::ON_SubDVertex ( const ON_SubDVertex )
default

Member Function Documentation

◆ BoundaryEdgePair()

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.

◆ BoundingBox()

const ON_BoundingBox ON_SubDVertex::BoundingBox ( ON_SubDComponentLocation  subd_appearance,
const ON_SubD subd 
) const

◆ ClearEdgeMarks()

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.

◆ ClearFaceMarks()

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.

◆ ClearSavedSubdivisionPoints() [1/2]

void ON_SubDVertex::ClearSavedSubdivisionPoints ( ) const

Description: Clears saved subdivision and limit surface information for this vertex. Attached edges and faces are not modified.

◆ ClearSavedSubdivisionPoints() [2/2]

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.

◆ ClearSavedSurfacePoints()

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.

◆ CompareUnorderedEdges()

static int ON_SubDVertex::CompareUnorderedEdges ( const ON_SubDVertex a,
const ON_SubDVertex b 
)
static

◆ CompareUnorderedEdgesAndFaces()

static int ON_SubDVertex::CompareUnorderedEdgesAndFaces ( const ON_SubDVertex a,
const ON_SubDVertex b 
)
static

◆ CompareUnorderedFaces()

static int ON_SubDVertex::CompareUnorderedFaces ( const ON_SubDVertex a,
const ON_SubDVertex b 
)
static

◆ ComponentIndex()

const ON_COMPONENT_INDEX ON_SubDVertex::ComponentIndex ( ) const

◆ ComponentPtr()

const ON_SubDComponentPtr ON_SubDVertex::ComponentPtr ( ) const

◆ ControlNetBoundingBox()

ON_BoundingBox ON_SubDVertex::ControlNetBoundingBox ( ) const

◆ ControlNetPoint()

const ON_3dPoint ON_SubDVertex::ControlNetPoint ( ) const

◆ CreasedEdge()

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.

◆ CreasedEdgeCount() [1/2]

const unsigned int ON_SubDVertex::CreasedEdgeCount ( ) const

Returns: Number of creased edges.

◆ CreasedEdgeCount() [2/2]

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.

◆ CreasedEdgePair()

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.

◆ CreaseVertexSubdivisionPoint()

static const ON_3dPoint ON_SubDVertex::CreaseVertexSubdivisionPoint ( const ON_3dPoint P,
double  vertex_sharpness,
const ON_3dPoint A1,
const ON_3dPoint A2 
)
static

Calculate the Catmull-Clark subdivision point for a crease vertex.

Parameters
Pcrease vertex control net point.
vertex_sharpnessmaximum value of smooth edge sharpnesses at the crease vertex.
Parameters
A1control net point at the other end of one attached crease edge.
A2control net point at the other end of the other attached crease edge.
Returns

◆ DoubleSubdivisionPoint()

const ON_3dPoint ON_SubDVertex::DoubleSubdivisionPoint ( ) const

Get the location of the subdivision point of the vertex's subdivision vertex.

Returns
Catmull-Clark vertex double subdivision point.

◆ Edge()

const class ON_SubDEdge* ON_SubDVertex::Edge ( unsigned int  i) const

◆ EdgeArrayIndex()

unsigned int ON_SubDVertex::EdgeArrayIndex ( const ON_SubDEdge edge) const

◆ EdgeCount() [1/2]

unsigned int ON_SubDVertex::EdgeCount ( ) const

◆ EdgeCount() [2/2]

* unsigned int ON_SubDVertex::EdgeCount ( ON_SubDEdgeTag  edge_tag) const

◆ EdgeDirection()

ON__UINT_PTR ON_SubDVertex::EdgeDirection ( unsigned int  i) const

◆ EdgeProperties()

const ON_SubDVertexEdgeProperties ON_SubDVertex::EdgeProperties ( ) const

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDVertex::EdgePtr ( unsigned int  i) const

◆ EvaluateCatmullClarkSubdivisionPoint()

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.

◆ Face()

const class ON_SubDFace* ON_SubDVertex::Face ( unsigned int  i) const

◆ FaceArrayIndex()

unsigned int ON_SubDVertex::FaceArrayIndex ( const ON_SubDFace face) const

◆ FaceCount()

unsigned int ON_SubDVertex::FaceCount ( ) const

◆ GetBoundaryVertexEdgeIndices()

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.

◆ GetBoundaryVertexEdges()

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.

◆ GetSavedSurfacePoint()

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.

◆ GetSharpSubdivisionPoint() [1/2]

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.

Parameters
sharp_subdivision_pointIf 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.
Returns
If the vertex is smooth and and two or more attached edges have positive end sharpness at this vertex, then the maximum edge end sharpness at this vertex is returned. If the vertex is a dart or crease and and one or more attached edges have positive end sharpness at this vertex, then the maximum edge end sharpness at this vertex is returned. Otherwise 0.0 is returned. / returns>

◆ GetSharpSubdivisionPoint() [2/2]

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.

Parameters
countThe 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.
vOutput subdivision point vertices are returned here.
cOutput subdivision point sum coefficients are returned here.
Returns
The vertex sharpness is returned ( >= 0.0 ). If the returned value is > 0.0, then the sharp subdivision point = sum(0 <= i < count, c[i]*v[i]->ControlNetPoint())

◆ GetSubdivisionPoint()

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>

◆ GetSurfacePoint() [1/3]

bool ON_SubDVertex::GetSurfacePoint ( const ON_SubDFace sector_face,
bool  bUndefinedNormalIsPossible,
class ON_SubDSectorSurfacePoint limit_point 
) const

◆ GetSurfacePoint() [2/3]

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

◆ GetSurfacePoint() [3/3]

bool ON_SubDVertex::GetSurfacePoint ( double  surface_point[3]) const

◆ HasBoundaryVertexTopology()

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.

◆ HasInteriorVertexTopology()

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.

◆ IsCorner()

bool ON_SubDVertex::IsCorner ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Corner.

◆ IsCrease()

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.

◆ IsCreaseOrCorner()

bool ON_SubDVertex::IsCreaseOrCorner ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Crease or ON_SubDVertexTag::Corner.

◆ IsDart()

bool ON_SubDVertex::IsDart ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart.

◆ IsDartOrCorner()

bool ON_SubDVertex::IsDartOrCorner ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart or ON_SubDVertexTag::Corner

◆ IsDartOrCrease()

bool ON_SubDVertex::IsDartOrCrease ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Dart or ON_SubDVertexTag::Crease

◆ IsDartOrCreaseOrCorner()

bool ON_SubDVertex::IsDartOrCreaseOrCorner ( ) const

◆ IsManifoldBoundaryVertex()

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.

◆ IsOneSectorCrease()

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.

Returns
True if the vertex tag is ON_SubDVertexTag::Crease, EdgeCount() = 1+FaceCount(), and FaceCount() >= 1.

◆ IsSharp()

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.

Parameters
bEndCheckWhen 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.
Returns
True if this vertex is smooth, dart, or crease and is attached to at least one sharp edge. /returns>

◆ IsSingleSectorVertex()

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.

◆ IsSmooth()

bool ON_SubDVertex::IsSmooth ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth.

◆ IsSmoothOrCrease()

bool ON_SubDVertex::IsSmoothOrCrease ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Crease.

◆ IsSmoothOrDart()

bool ON_SubDVertex::IsSmoothOrDart ( ) const

Returns: True if m_vertex_tag is ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Dart.

◆ IsSmoothOrDartOrCrease()

bool ON_SubDVertex::IsSmoothOrDartOrCrease ( ) const

◆ IsStandard()

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.

◆ IsTwoSectorCrease()

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.

Returns
True if the vertex tag is ON_SubDVertexTag::Crease, EdgeCount() = FaceCount(), and FaceCount() >= 2.

◆ MarkedEdgeCount()

unsigned int ON_SubDVertex::MarkedEdgeCount ( ) const

Returns: Number of edges attached to this vertex with Edge().m_status.RuntimeMark() = true;

◆ MarkedFaceCount()

unsigned int ON_SubDVertex::MarkedFaceCount ( ) const

Returns: Number of faces attached to this vertex with Face().m_status.RuntimeMark() = true;

◆ MaximumEdgeFaceCount()

unsigned int ON_SubDVertex::MaximumEdgeFaceCount ( ) const

Returns: Maximum number of faces for any edge attached to this vertex.

◆ MaximumFaceEdgeCount()

unsigned int ON_SubDVertex::MaximumFaceEdgeCount ( ) const

Returns: Maximum number of edges for any face attached to this vertex.

◆ MinimumEdgeFaceCount()

unsigned int ON_SubDVertex::MinimumEdgeFaceCount ( ) const

Returns: Minimum number of faces for any edge attached to this vertex.

◆ MinimumFaceEdgeCount()

unsigned int ON_SubDVertex::MinimumFaceEdgeCount ( ) const

Returns: Minimum number of edges for any face attached to this vertex.

◆ NeighborhoodStatusLogicalOr()

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()

◆ operator=()

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

◆ Point()

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.

◆ Read()

static bool ON_SubDVertex::Read ( class ON_BinaryArchive archive,
class ON_SubD subd,
class ON_SubDVertex *&  vertex 
)
static

◆ RemoveEdgeFromArray()

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.

◆ RemoveFaceFromArray()

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.

◆ ReplaceEdgeInArray()

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.

◆ ReplaceFaceInArray()

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.

◆ SectorSurfacePointForExperts()

const ON_SubDSectorSurfacePoint& ON_SubDVertex::SectorSurfacePointForExperts ( ) const

◆ SetControlNetPoint()

bool ON_SubDVertex::SetControlNetPoint ( ON_3dPoint  control_net_point,
bool  bClearNeighborhoodCache 
)

◆ SetSavedSurfacePoint()

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.

◆ SharpEdgeCount() [1/2]

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.

Parameters
bUseCreaseSharpnessWhen bCountCreasesAsSharp is true, crease edges are counted.
bEndCheckWhen 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.
Returns
If bEndCheck is false, returns the number of sharp edges attached to this vertex. If bEndCheck is true, returns the number of edges with nonzero end sharpness at this vertex.

◆ SharpEdgeCount() [2/2]

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.

Parameters
bCountCreasesAsSharpWhen bCountCreasesAsSharp is true, creases are counted and ON_SubDEdgeSharpness::CreaseValue is used as a crease edge sharpness.
bEndCheckWhen 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_rangeThe 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.
Returns
If bEndCheck is false, returns the number of sharp edges attached to this vertex. If bEndCheck is true, returns the number of edges with nonzero end sharpness at this vertex.

◆ SortEdges()

* ON_SubD::VertexEdgeOrder ON_SubDVertex::SortEdges ( )

◆ SubdivisionPoint() [1/2]

const ON_3dPoint ON_SubDVertex::SubdivisionPoint ( ) const

◆ SubdivisionPoint() [2/2]

const ON_3dPoint ON_SubDVertex::SubdivisionPoint ( unsigned  subdivision_count) const

Get the location of the vertex's subdivision vertex.

Parameters
subdivision_countsubdivision_count >= 0 is the number of subdivisions to perform.
Returns
Catmull-Clark vertex subdivision point.

◆ SuggestedVertexTag()

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.

◆ SurfaceBoundingBox()

ON_BoundingBox ON_SubDVertex::SurfaceBoundingBox ( const ON_SubD subd) const

◆ SurfaceNormal()

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.

◆ SurfacePoint()

const ON_3dPoint ON_SubDVertex::SurfacePoint ( ) const

Returns: The SubD surface point.

◆ SurfacePointIsSet()

bool ON_SubDVertex::SurfacePointIsSet ( ) const

Returns: true The vertex limit point and at least one sector normal are saved for Catmull-Clark quad subdivision.

◆ TopologyCRC32()

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.

Parameters
bIncludeSubdivisionPropertiesPass 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.
Returns
A 32 bit CRC = this->TopologyHash(bIncludeSubdivisionProperties).CRC32(0).

◆ TopologyHash()

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.

Parameters
bIncludeSubdivisionPropertiesPass 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.
Returns
A SHA-1 hash of the vertex's id and the ids of the edges and faces attached to this vertex.

◆ ToString()

const ON_wString ON_SubDVertex::ToString ( bool  bIncludeControlNetPoint,
bool  bIncludeTopology 
) const

◆ Transform() [1/2]

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]

◆ Transform() [2/2]

bool ON_SubDVertex::Transform ( bool  bTransformationSavedSubdivisionPoint,
const class ON_Xform xform,
const class ON_Xform xformNormals 
)

◆ UnsetControlNetPoint()

void ON_SubDVertex::UnsetControlNetPoint ( )

Sets the control net point to ON_3dPoint::NanPoint and clears saved subdivision points.

◆ UnsetSectorCoefficientsForExperts()

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.

◆ VertexFrame()

const ON_Plane ON_SubDVertex::VertexFrame ( ON_SubDComponentLocation  subd_appearance) const

◆ VertexId()

unsigned int ON_SubDVertex::VertexId ( ) const

◆ VertexModifiedNofification()

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.

◆ VertexSharpness()

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.

Returns
If the vertex is smooth and and two or more attached edges have positive end sharpness at this vertex, then the maximum edge end sharpness at this vertex is returned. If the vertex is a dart or crease and and one or more attached edges have positive end sharpness at this vertex, then the maximum edge end sharpness at this vertex is returned. Otherwise 0.0 is returned.

◆ Write()

bool ON_SubDVertex::Write ( class ON_BinaryArchive archive) const

Friends And Related Function Documentation

◆ ON_SubDArchiveIdMap

friend class ON_SubDArchiveIdMap
friend

◆ ON_SubDEdge

friend class ON_SubDEdge
friend

◆ ON_SubDFace

friend class ON_SubDFace
friend

Member Data Documentation

◆ Empty

const ON_SubDVertex ON_SubDVertex::Empty
static

◆ m_edge_capacity

unsigned short ON_SubDVertex::m_edge_capacity = 0

◆ m_edge_count

unsigned short ON_SubDVertex::m_edge_count = 0

◆ m_edges

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[].

◆ m_face_capacity

unsigned short ON_SubDVertex::m_face_capacity = 0

◆ m_face_count

unsigned short ON_SubDVertex::m_face_count = 0

◆ m_faces

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[].

◆ m_next_vertex

const class ON_SubDVertex* ON_SubDVertex::m_next_vertex = nullptr

linked list of vertices on this level

◆ m_P

double ON_SubDVertex::m_P[3]

vertex control net location

summary> The SubD vertex control net point. /summary>

◆ m_prev_vertex

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

◆ m_vertex_tag

ON_SubDVertexTag ON_SubDVertex::m_vertex_tag = ON_SubDVertexTag::Unset