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

#include <opennurbs_subd.h>

Public Types

enum  Type : unsigned char { Type::Unset = 0, Type::Vertex = 2, Type::Edge = 4, Type::Face = 6 }
 ON_SubDComponentPtr::Type identifies the type of subdivision component referenced by the ON_SubDComponentPtr. More...
 

Public Member Functions

const ON_BoundingBox BoundingBox (ON_SubDComponentLocation subd_appearance, const class ON_SubD &subd) const
 
const ON_3dPoint CenterPoint (ON_SubDComponentLocation subd_appearance) const
 
const ON_SubDComponentPtr ClearComponentDirection () const
 
bool ClearMark () const
 
ON__UINT8 ClearMarkBits () const
 
void ClearSavedSubdivisionPoints () const
 
void ClearSavedSubdivisionPoints (bool bClearNeighborhood) const
 
unsigned int ClearStates (ON_ComponentStatus states_to_clear)
 
class ON_SubDComponentBaseComponentBase () const
 
class ON_SubDComponentBaseComponentBase (ON_SubDComponentPtr::Type type_filter) const
 
ON__UINT_PTR ComponentDirection () const
 
unsigned int ComponentId () const
 
const ON_COMPONENT_INDEX ComponentIndex () const
 
ON_SubDComponentPtr::Type ComponentType () const
 
const ON_BoundingBox ControlNetBoundingBox () const
 
const ON_3dPoint ControlNetCenterPoint () const
 
const ON_3dPoint DoubleSubdivisionPoint () const
 Get the location of the component's double subdivision vertex. More...
 
class ON_SubDEdgeEdge () const
 
unsigned int EdgeId () const
 
const ON_SubDEdgePtr EdgePtr () const
 
const ON_SubDEdgeSharpness EdgeSharpness (bool bUseCreaseSharpness) const
 Used to get edge sharpness when the referenced component is an edge. More...
 
ON_SubDEdgeTag EdgeTag () const
 
class ON_SubDFaceFace () const
 
unsigned int FaceId () const
 
const ON_SubDFacePtr FacePtr () const
 
unsigned int GroupId (unsigned int null_component_value) const
 
ON__UINT16 Hash16FromTypeAndId () const
 
ON__UINT32 Hash32FromPointer () const
 
bool InSymmetrySet () const
 
bool IsActive () const
 
const bool IsEdge () const
 
const bool IsFace () const
 
bool IsNotNull () const
 
bool IsNull () const
 
bool IsSymmetrySetPrimaryMotif () const
 
const bool IsVertex () const
 
bool Mark () const
 
ON__UINT8 MarkBits () const
 
const ON_SubDComponentPtr NextComponent () const
 Depending on the type of this component, returns an ON_SubDComponentPtr to ON_SubDVertex::NextVertex(), ON_SubDEdge::NextEdge(), or ON_SubDFace::NextFace(). More...
 
const ON_SubDComponentPtr operator++ ()
 Prefix operator ++ sets this to ON_SubDComponentPtr::NextComponent() and returns the new value of this. More...
 
const ON_SubDComponentPtr operator++ (int)
 Postfix operator ++ sets this to ON_SubDComponentPtr::NextComponent() and returns the previous value of this. More...
 
const ON_SubDComponentPtr PrevComponent () const
 Depending on the type of this component, returns an ON_SubDComponentPtr to ON_SubDVertex::PrevVertex(), ON_SubDEdge::PrevEdge(), or ON_SubDFace::PrevFace(). More...
 
const ON_SubDComponentPtr Reversed () const
 
const ON_SubDComponentPtr SetComponentDirection () const
 
const ON_SubDComponentPtr SetComponentDirection (ON__UINT_PTR dir) const
 
bool SetGroupId (unsigned int group_id)
 
bool SetMark () const
 
bool SetMark (bool bMark) const
 
ON__UINT8 SetMarkBits (ON__UINT8 mark_bits) const
 
unsigned int SetStates (ON_ComponentStatus states_to_set)
 
unsigned int SetStatus (ON_ComponentStatus status)
 
const ON_ComponentStatus Status () const
 
const ON_3dPoint SubdivisionPoint () const
 Get the location of the component's subdivision vertex. More...
 
const ON_3dPoint SubdivisionPoint (unsigned subdivision_count) const
 Get the location of the component's subdivision vertex. More...
 
const ON_wString ToString () const
 
wchar_t * ToString (wchar_t *s, size_t s_capacity) const
 
class ON_SubDVertexVertex () const
 
unsigned int VertexId () const
 
const ON_SubDVertexPtr VertexPtr () const
 
double VertexSharpness () const
 
ON_SubDVertexTag VertexTag () const
 

Static Public Member Functions

static int CompareComponent (const ON_SubDComponentPtr *a, const ON_SubDComponentPtr *b)
 
static int CompareComponentAndDirection (const ON_SubDComponentPtr *a, const ON_SubDComponentPtr *b)
 
static int CompareComponentId (const ON_SubDComponentPtr *a, const ON_SubDComponentPtr *b)
 
static int CompareComponentPtrType (ON_SubDComponentPtr::Type a, ON_SubDComponentPtr::Type b)
 
static int CompareType (const ON_SubDComponentPtr *a, const ON_SubDComponentPtr *b)
 
static ON_SubDComponentPtr::Type ComponentPtrTypeFromUnsigned (unsigned int component_pointer_type_as_unsigned)
 
static const ON_SubDComponentPtr Create (const class ON_SubDEdge *edge)
 
static const ON_SubDComponentPtr Create (const class ON_SubDEdge *edge, ON__UINT_PTR edge_direction)
 
static const ON_SubDComponentPtr Create (const class ON_SubDFace *face)
 
static const ON_SubDComponentPtr Create (const class ON_SubDFace *face, ON__UINT_PTR face_direction)
 
static const ON_SubDComponentPtr Create (const class ON_SubDVertex *vertex)
 
static const ON_SubDComponentPtr Create (const class ON_SubDVertex *vertex, ON__UINT_PTR vertex_direction)
 
static const ON_SubDComponentPtr Create (ON_SubDEdgePtr edgeptr)
 
static const ON_SubDComponentPtr Create (ON_SubDFacePtr faceptr)
 
static const ON_SubDComponentPtr Create (ON_SubDVertexPtr vertexptr)
 
static const ON_SubDComponentPtr CreateNull (ON_SubDComponentPtr::Type component_type, ON__UINT_PTR component_direction)
 

Public Attributes

ON__UINT_PTR m_ptr
 

Static Public Attributes

static const ON_SubDComponentPtr Null
 nullptr, type = Unset, direction = 0 More...
 
static const ON_SubDComponentPtr NullEdge
 nullptr, type = Edge, direction = 0 More...
 
static const ON_SubDComponentPtr NullFace
 nullptr, type = Face, direction = 0 More...
 
static const ON_SubDComponentPtr NullVertex
 nullptr, type = Vertex, direction = 0 More...
 

Member Enumeration Documentation

◆ Type

enum ON_SubDComponentPtr::Type : unsigned char
strong

ON_SubDComponentPtr::Type identifies the type of subdivision component referenced by the ON_SubDComponentPtr.

Enumerator
Unset 
Vertex 
Edge 
Face 

Member Function Documentation

◆ BoundingBox()

const ON_BoundingBox ON_SubDComponentPtr::BoundingBox ( ON_SubDComponentLocation  subd_appearance,
const class ON_SubD subd 
) const

◆ CenterPoint()

const ON_3dPoint ON_SubDComponentPtr::CenterPoint ( ON_SubDComponentLocation  subd_appearance) const

◆ ClearComponentDirection()

const ON_SubDComponentPtr ON_SubDComponentPtr::ClearComponentDirection ( ) const

◆ ClearMark()

bool ON_SubDComponentPtr::ClearMark ( ) const

Description: Clears (sets to false) the value of the component mark. Remarks: SubD components have a mutable runtime mark that can be used in any context where a single thread cares about the marks. It is widely used in many calculations to keep track of sets of components that are in a certain context specific state. Returns: Input value of Mark().

◆ ClearMarkBits()

ON__UINT8 ON_SubDComponentPtr::ClearMarkBits ( ) const

◆ ClearSavedSubdivisionPoints() [1/2]

void ON_SubDComponentPtr::ClearSavedSubdivisionPoints ( ) const

◆ ClearSavedSubdivisionPoints() [2/2]

void ON_SubDComponentPtr::ClearSavedSubdivisionPoints ( bool  bClearNeighborhood) const

Description: Clears saved subdivision and limit surface information for this component. Parameters: bClearNeighborhood - [in] If true, all components attached to this component are also cleared.

◆ ClearStates()

unsigned int ON_SubDComponentPtr::ClearStates ( ON_ComponentStatus  states_to_clear)

Returns: 1: status changed. 0: status not changed.

◆ CompareComponent()

static int ON_SubDComponentPtr::CompareComponent ( const ON_SubDComponentPtr a,
const ON_SubDComponentPtr b 
)
static

Description: Dictionary compares type and ComponentBase() pointer as an unsigned.

◆ CompareComponentAndDirection()

static int ON_SubDComponentPtr::CompareComponentAndDirection ( const ON_SubDComponentPtr a,
const ON_SubDComponentPtr b 
)
static

Description: Dictionary compares type, ComponentBase() pointer as an unsigned, and ComponentDirection().

◆ CompareComponentId()

static int ON_SubDComponentPtr::CompareComponentId ( const ON_SubDComponentPtr a,
const ON_SubDComponentPtr b 
)
static

Description: Dictionary compares type and ComponentBase() id.

◆ CompareComponentPtrType()

static int ON_SubDComponentPtr::CompareComponentPtrType ( ON_SubDComponentPtr::Type  a,
ON_SubDComponentPtr::Type  b 
)
static

◆ CompareType()

static int ON_SubDComponentPtr::CompareType ( const ON_SubDComponentPtr a,
const ON_SubDComponentPtr b 
)
static

◆ ComponentBase() [1/2]

class ON_SubDComponentBase* ON_SubDComponentPtr::ComponentBase ( ) const

◆ ComponentBase() [2/2]

class ON_SubDComponentBase* ON_SubDComponentPtr::ComponentBase ( ON_SubDComponentPtr::Type  type_filter) const

type_filter - [in] If is ON_SubDComponentPtr::Type::Unset, then any type of component will be returned. Otherwise only a component of the specified type will be returned.

◆ ComponentDirection()

ON__UINT_PTR ON_SubDComponentPtr::ComponentDirection ( ) const

Returns: 0 or 1. A runtime bit property on this ON_SubDComponentPtr. The use of this value varies depending on the context. Frequently, 0 means the referenced component is being used with its natural orientation and 1 means the referenced component is being used with the reverse of its natural oreientation.

◆ ComponentId()

unsigned int ON_SubDComponentPtr::ComponentId ( ) const

◆ ComponentIndex()

const ON_COMPONENT_INDEX ON_SubDComponentPtr::ComponentIndex ( ) const

◆ ComponentPtrTypeFromUnsigned()

static ON_SubDComponentPtr::Type ON_SubDComponentPtr::ComponentPtrTypeFromUnsigned ( unsigned int  component_pointer_type_as_unsigned)
static

◆ ComponentType()

ON_SubDComponentPtr::Type ON_SubDComponentPtr::ComponentType ( ) const

◆ ControlNetBoundingBox()

const ON_BoundingBox ON_SubDComponentPtr::ControlNetBoundingBox ( ) const

◆ ControlNetCenterPoint()

const ON_3dPoint ON_SubDComponentPtr::ControlNetCenterPoint ( ) const

◆ Create() [1/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDEdge edge)
static

◆ Create() [2/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDEdge edge,
ON__UINT_PTR  edge_direction 
)
static

◆ Create() [3/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDFace face)
static

◆ Create() [4/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDFace face,
ON__UINT_PTR  face_direction 
)
static

◆ Create() [5/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDVertex vertex)
static

◆ Create() [6/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( const class ON_SubDVertex vertex,
ON__UINT_PTR  vertex_direction 
)
static

◆ Create() [7/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( ON_SubDEdgePtr  edgeptr)
static

◆ Create() [8/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( ON_SubDFacePtr  faceptr)
static

◆ Create() [9/9]

static const ON_SubDComponentPtr ON_SubDComponentPtr::Create ( ON_SubDVertexPtr  vertexptr)
static

◆ CreateNull()

static const ON_SubDComponentPtr ON_SubDComponentPtr::CreateNull ( ON_SubDComponentPtr::Type  component_type,
ON__UINT_PTR  component_direction 
)
static

◆ DoubleSubdivisionPoint()

const ON_3dPoint ON_SubDComponentPtr::DoubleSubdivisionPoint ( ) const

Get the location of the component's double subdivision vertex.

Returns
Catmull-Clark component double subdivision point.

◆ Edge()

class ON_SubDEdge* ON_SubDComponentPtr::Edge ( ) const

◆ EdgeId()

unsigned int ON_SubDComponentPtr::EdgeId ( ) const
Returns
If Edge() is not nullptr, Edge()->m_id is returned. Otherwise, 0 is returned.

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDComponentPtr::EdgePtr ( ) const

◆ EdgeSharpness()

const ON_SubDEdgeSharpness ON_SubDComponentPtr::EdgeSharpness ( bool  bUseCreaseSharpness) const

Used to get edge sharpness when the referenced component is an edge.

Parameters
bUseCreaseSharpness
Returns
If Edge() is not nullptr, Edge()->Sharpness(bUseCreaseSharpness) is returned. Otherwise, ON_SubDEdgeTag::Nan is returned.

◆ EdgeTag()

ON_SubDEdgeTag ON_SubDComponentPtr::EdgeTag ( ) const
Returns
If Edge() is not nullptr, Edge()->m_edge_tag is returned. Otherwise, ON_SubDEdgeTag::Unset is returned.

◆ Face()

class ON_SubDFace* ON_SubDComponentPtr::Face ( ) const

◆ FaceId()

unsigned int ON_SubDComponentPtr::FaceId ( ) const
Returns
If Face() is not nullptr, Face()->m_id is returned. Otherwise, 0 is returned.

◆ FacePtr()

const ON_SubDFacePtr ON_SubDComponentPtr::FacePtr ( ) const

◆ GroupId()

unsigned int ON_SubDComponentPtr::GroupId ( unsigned int  null_component_value) const

Parameters: null_component_value - [in] Value to return if the component is null. Returns: If this is not null, the group id of the component is returned. Otherwise null_component_value is returned.

◆ Hash16FromTypeAndId()

ON__UINT16 ON_SubDComponentPtr::Hash16FromTypeAndId ( ) const

Returns: A value suitable for hash table used based on the component type and id.

◆ Hash32FromPointer()

ON__UINT32 ON_SubDComponentPtr::Hash32FromPointer ( ) const

Returns: A value suitable for hash table used based on the value of ComponentBase().

◆ InSymmetrySet()

bool ON_SubDComponentPtr::InSymmetrySet ( ) const

Returns: True if this component is marked being in a symmetry set. Remarks: You must use ON_SubD SymmetrySet member functions to get symmetry set contents.

◆ IsActive()

bool ON_SubDComponentPtr::IsActive ( ) const

Returns: True if this component is active in its parent subd or other relevant context. Remarks: When a component is in use, IsActive() = true. If was used and then deleted, IsActive() is false.

◆ IsEdge()

const bool ON_SubDComponentPtr::IsEdge ( ) const

◆ IsFace()

const bool ON_SubDComponentPtr::IsFace ( ) const

◆ IsNotNull()

bool ON_SubDComponentPtr::IsNotNull ( ) const

Returns: True if type is set and ComponentBase() pointer is not nullptr. Note that mark may be set as well.

◆ IsNull()

bool ON_SubDComponentPtr::IsNull ( ) const

Returns: True if the ComponentBase() pointer is nullptr. Note that type and mark may be set.

◆ IsSymmetrySetPrimaryMotif()

bool ON_SubDComponentPtr::IsSymmetrySetPrimaryMotif ( ) const

Returns: True if this component is marked as a primary motif component. Remarks: You must use ON_SubD SymmetrySet member functions to get symmetry set contents.

◆ IsVertex()

const bool ON_SubDComponentPtr::IsVertex ( ) const

◆ Mark()

bool ON_SubDComponentPtr::Mark ( ) const

Returns: The current value of the component mark ( m_status->RuntimeMark() ). Remarks: SubD components have a mutable runtime mark that can be used in any context where a single thread cares about the marks. It is widely used in many calculations to keep track of sets of components that are in a certain context specific state.

◆ MarkBits()

ON__UINT8 ON_SubDComponentPtr::MarkBits ( ) const

◆ NextComponent()

const ON_SubDComponentPtr ON_SubDComponentPtr::NextComponent ( ) const

Depending on the type of this component, returns an ON_SubDComponentPtr to ON_SubDVertex::NextVertex(), ON_SubDEdge::NextEdge(), or ON_SubDFace::NextFace().

Returns
An ON_SubDComponentPtr to the next active component of the same type in the SubD or ON_SubDComponentPtr::Null if there is no next active component.

◆ operator++() [1/2]

const ON_SubDComponentPtr ON_SubDComponentPtr::operator++ ( )

Prefix operator ++ sets this to ON_SubDComponentPtr::NextComponent() and returns the new value of this.

Returns
ON_SubDComponentPtr::NextComponent()

◆ operator++() [2/2]

const ON_SubDComponentPtr ON_SubDComponentPtr::operator++ ( int  )

Postfix operator ++ sets this to ON_SubDComponentPtr::NextComponent() and returns the previous value of this.

Returns
ON_SubDComponentPtr::NextComponent()

◆ PrevComponent()

const ON_SubDComponentPtr ON_SubDComponentPtr::PrevComponent ( ) const

Depending on the type of this component, returns an ON_SubDComponentPtr to ON_SubDVertex::PrevVertex(), ON_SubDEdge::PrevEdge(), or ON_SubDFace::PrevFace().

Returns
An ON_SubDComponentPtr to the previous active component of the same type in the SubD or ON_SubDComponentPtr::Null if there is no previous active component.

◆ Reversed()

const ON_SubDComponentPtr ON_SubDComponentPtr::Reversed ( ) const

Returns: An ON_SubDComponentPtr referencing the same ON_SubDComponentBase with ComponentDirection() = 1 - this->ComponentDirection().

◆ SetComponentDirection() [1/2]

const ON_SubDComponentPtr ON_SubDComponentPtr::SetComponentDirection ( ) const

◆ SetComponentDirection() [2/2]

const ON_SubDComponentPtr ON_SubDComponentPtr::SetComponentDirection ( ON__UINT_PTR  dir) const

◆ SetGroupId()

bool ON_SubDComponentPtr::SetGroupId ( unsigned int  group_id)

Description: Sets ON_SubDComponentBase.m_group_id. Parameters: group_id - [in] Value to return if the component is null. Returns: True if the component is not null and the group id was set. False if the component is null.

◆ SetMark() [1/2]

bool ON_SubDComponentPtr::SetMark ( ) const

Description: Sets (sets to true) the value of the component mark. Remarks: SubD components have a mutable runtime mark that can be used in any context where a single thread cares about the marks. It is widely used in many calculations to keep track of sets of components that are in a certain context specific state. Returns: Input value of Mark().

◆ SetMark() [2/2]

bool ON_SubDComponentPtr::SetMark ( bool  bMark) const

Description: Sets the value of the component mark to bMark. Parameter: bMark - [in] Remarks: SubD components have a mutable runtime mark that can be used in any context where a single thread cares about the marks. It is widely used in many calculations to keep track of sets of components that are in a certain context specific state. Returns: Input value of Mark().

◆ SetMarkBits()

ON__UINT8 ON_SubDComponentPtr::SetMarkBits ( ON__UINT8  mark_bits) const

◆ SetStates()

unsigned int ON_SubDComponentPtr::SetStates ( ON_ComponentStatus  states_to_set)

Returns: 1: status changed. 0: status not changed.

◆ SetStatus()

unsigned int ON_SubDComponentPtr::SetStatus ( ON_ComponentStatus  status)

Description: Makes "this" an exact copy of status. Parameters: status - [in] Returns: 1: status changed. 0: status not changed.

◆ Status()

const ON_ComponentStatus ON_SubDComponentPtr::Status ( ) const

◆ SubdivisionPoint() [1/2]

const ON_3dPoint ON_SubDComponentPtr::SubdivisionPoint ( ) const

Get the location of the component's subdivision vertex.

Returns
Catmull-Clark component subdivision point.

◆ SubdivisionPoint() [2/2]

const ON_3dPoint ON_SubDComponentPtr::SubdivisionPoint ( unsigned  subdivision_count) const

Get the location of the component's subdivision vertex.

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

◆ ToString() [1/2]

const ON_wString ON_SubDComponentPtr::ToString ( ) const

◆ ToString() [2/2]

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

◆ Vertex()

class ON_SubDVertex* ON_SubDComponentPtr::Vertex ( ) const

◆ VertexId()

unsigned int ON_SubDComponentPtr::VertexId ( ) const
Returns
If Vertex() is not nullptr, Vertex()->m_id is returned. Otherwise, 0 is returned.

◆ VertexPtr()

const ON_SubDVertexPtr ON_SubDComponentPtr::VertexPtr ( ) const

◆ VertexSharpness()

double ON_SubDComponentPtr::VertexSharpness ( ) const
Returns
If Vertex() is not nullptr, Vertex()->m_vertex_tag is returned. Otherwise, ON_DBL_NAN is returned.

◆ VertexTag()

ON_SubDVertexTag ON_SubDComponentPtr::VertexTag ( ) const
Returns
If Vertex() is not nullptr, Vertex()->m_vertex_tag is returned. Otherwise, ON_SubDVertexTag::Unset is returned.

Member Data Documentation

◆ m_ptr

ON__UINT_PTR ON_SubDComponentPtr::m_ptr

For performance reasons, m_ptr is not initialized and no constructors are declared or implemented. If you require initialization, then use x = ON_SubDComponentPtr::Null or x = ON_SubDComponentPtr::Create(...).

◆ Null

const ON_SubDComponentPtr ON_SubDComponentPtr::Null
static

nullptr, type = Unset, direction = 0

◆ NullEdge

const ON_SubDComponentPtr ON_SubDComponentPtr::NullEdge
static

nullptr, type = Edge, direction = 0

◆ NullFace

const ON_SubDComponentPtr ON_SubDComponentPtr::NullFace
static

nullptr, type = Face, direction = 0

◆ NullVertex

const ON_SubDComponentPtr ON_SubDComponentPtr::NullVertex
static

nullptr, type = Vertex, direction = 0