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

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDComponentId ()=default
 
 ON_SubDComponentId (const class ON_SubDEdge *e)
 
 ON_SubDComponentId (const class ON_SubDFace *f)
 
 ON_SubDComponentId (const class ON_SubDFace *f, unsigned face_corner_index)
 
 ON_SubDComponentId (const class ON_SubDVertex *v)
 
 ON_SubDComponentId (const ON_SubDComponentId &)=default
 
 ON_SubDComponentId (ON_SubDComponentPtr cptr)
 
 ON_SubDComponentId (ON_SubDComponentPtr::Type component_type, unsigned int component_id)
 
 ON_SubDComponentId (ON_SubDComponentPtr::Type component_type, unsigned int component_id, ON__UINT_PTR dir)
 
 ON_SubDComponentId (ON_SubDEdgePtr eptr)
 
 ON_SubDComponentId (ON_SubDFacePtr fptr)
 
 ON_SubDComponentId (ON_SubDFacePtr fptr, unsigned face_corner_index)
 
 ON_SubDComponentId (ON_SubDVertexPtr vptr)
 
 ON_SubDComponentId (unsigned face_id, ON__UINT_PTR face_dir, ON_SubDFaceCornerDex face_cdex)
 
 ~ON_SubDComponentId ()=default
 
unsigned int ComponentDirection () const
 
unsigned int ComponentId () const
 
const ON_SubDComponentPtr ComponentPtr (const class ON_SubD &subd) const
 Get the referenced SubD component from a component id. More...
 
const ON_SubDComponentPtr ComponentPtr (const class ON_SubD *subd) const
 Get the referenced SubD component from a component id. More...
 
ON_SubDComponentPtr::Type ComponentType () const
 
const ON_SubDEdgeEdge (const class ON_SubD &subd) const
 
const ON_SubDEdgeEdge (const class ON_SubD *subd) const
 
unsigned EdgeId () const
 
const ON_SubDEdgePtr EdgePtr (const class ON_SubD &subd) const
 
const ON_SubDEdgePtr EdgePtr (const class ON_SubD *subd) const
 
const ON_SubDFaceFace (const class ON_SubD &subd) const
 
const ON_SubDFaceFace (const class ON_SubD *subd) const
 
const ON_SubDFaceCornerDex FaceCornerDex () const
 
unsigned FaceId () const
 
const ON_SubDFacePtr FacePtr (const class ON_SubD &subd) const
 
const ON_SubDFacePtr FacePtr (const class ON_SubD *subd) const
 
bool IsEdgeId () const
 
bool IsFaceId () const
 
bool IsNotSet () const
 
bool IsSet () const
 
bool IsVertexId () const
 
ON_SubDComponentIdoperator= (const ON_SubDComponentId &)=default
 
const ON_SubDComponentId Reversed () const
 Create an ON_SubDComponentId that references the same SubD component but with the opposite value of this->ComponentDirection(). More...
 
const ON_wString ToString (bool bUnsetIsEmptyString, bool bDirectionPrefix) const
 Returns a string cN where N is ComponentId() and c is v, e or f for a vertex, edge or face component. Examples: If ComponentType is vertex and ComponentId() is 17, then the string will be "v17". If ComponentType is face, ComponentId() is 49, and FaceCornerDex is not set, the string will be "f49". If ComponentType is face, ComponentId() is 49, and FaceCornerDex() is ON_SubDFaceCornerDex(2,3), the string will be "f49.2". More...
 
const ON_SubDVertexVertex (const class ON_SubD &subd) const
 
const ON_SubDVertexVertex (const class ON_SubD *subd) const
 
unsigned VertexId () const
 
const ON_SubDVertexPtr VertexPtr (const class ON_SubD &subd) const
 
const ON_SubDVertexPtr VertexPtr (const class ON_SubD *subd) const
 

Static Public Member Functions

static int CompareTypeAndId (const ON_SubDComponentId &lhs, const ON_SubDComponentId &rhs)
 
static int CompareTypeAndIdAndDirection (const ON_SubDComponentId &lhs, const ON_SubDComponentId &rhs)
 
static int CompareTypeAndIdFromPointer (const ON_SubDComponentId *lhs, const ON_SubDComponentId *rhs)
 

Static Public Attributes

static const ON_SubDComponentId Unset
 type = unset and id = 0; More...
 

Constructor & Destructor Documentation

◆ ON_SubDComponentId() [1/14]

ON_SubDComponentId::ON_SubDComponentId ( )
default

◆ ~ON_SubDComponentId()

ON_SubDComponentId::~ON_SubDComponentId ( )
default

◆ ON_SubDComponentId() [2/14]

ON_SubDComponentId::ON_SubDComponentId ( const ON_SubDComponentId )
default

◆ ON_SubDComponentId() [3/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDComponentPtr::Type  component_type,
unsigned int  component_id 
)

◆ ON_SubDComponentId() [4/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDComponentPtr::Type  component_type,
unsigned int  component_id,
ON__UINT_PTR  dir 
)

◆ ON_SubDComponentId() [5/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDComponentPtr  cptr)

◆ ON_SubDComponentId() [6/14]

ON_SubDComponentId::ON_SubDComponentId ( const class ON_SubDVertex v)

◆ ON_SubDComponentId() [7/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDVertexPtr  vptr)

◆ ON_SubDComponentId() [8/14]

ON_SubDComponentId::ON_SubDComponentId ( const class ON_SubDEdge e)

◆ ON_SubDComponentId() [9/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDEdgePtr  eptr)

◆ ON_SubDComponentId() [10/14]

ON_SubDComponentId::ON_SubDComponentId ( const class ON_SubDFace f)

◆ ON_SubDComponentId() [11/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDFacePtr  fptr)

◆ ON_SubDComponentId() [12/14]

ON_SubDComponentId::ON_SubDComponentId ( const class ON_SubDFace f,
unsigned  face_corner_index 
)

◆ ON_SubDComponentId() [13/14]

ON_SubDComponentId::ON_SubDComponentId ( ON_SubDFacePtr  fptr,
unsigned  face_corner_index 
)

◆ ON_SubDComponentId() [14/14]

ON_SubDComponentId::ON_SubDComponentId ( unsigned  face_id,
ON__UINT_PTR  face_dir,
ON_SubDFaceCornerDex  face_cdex 
)

Member Function Documentation

◆ CompareTypeAndId()

static int ON_SubDComponentId::CompareTypeAndId ( const ON_SubDComponentId lhs,
const ON_SubDComponentId rhs 
)
static

◆ CompareTypeAndIdAndDirection()

static int ON_SubDComponentId::CompareTypeAndIdAndDirection ( const ON_SubDComponentId lhs,
const ON_SubDComponentId rhs 
)
static

◆ CompareTypeAndIdFromPointer()

static int ON_SubDComponentId::CompareTypeAndIdFromPointer ( const ON_SubDComponentId lhs,
const ON_SubDComponentId rhs 
)
static

◆ ComponentDirection()

unsigned int ON_SubDComponentId::ComponentDirection ( ) const
Returns
0 or 1. 1 indicates the orientation or direction of the referenced components is opposite its intrinsic orientation or direction.

◆ ComponentId()

unsigned int ON_SubDComponentId::ComponentId ( ) const
Returns
The id of the reference component. 0 means the id is not set.

◆ ComponentPtr() [1/2]

const ON_SubDComponentPtr ON_SubDComponentId::ComponentPtr ( const class ON_SubD subd) const

Get the referenced SubD component from a component id.

Parameters
subdThe subd containing the referenced component.
Returns
The referenced SubD component from subd.

◆ ComponentPtr() [2/2]

const ON_SubDComponentPtr ON_SubDComponentId::ComponentPtr ( const class ON_SubD subd) const

Get the referenced SubD component from a component id.

Parameters
subdThe subd containing the referenced component.
Returns
The referenced SubD component from subd.

◆ ComponentType()

ON_SubDComponentPtr::Type ON_SubDComponentId::ComponentType ( ) const
Returns
The type of the referenced component.

◆ Edge() [1/2]

const ON_SubDEdge* ON_SubDComponentId::Edge ( const class ON_SubD subd) const

◆ Edge() [2/2]

const ON_SubDEdge* ON_SubDComponentId::Edge ( const class ON_SubD subd) const

◆ EdgeId()

unsigned ON_SubDComponentId::EdgeId ( ) const

◆ EdgePtr() [1/2]

const ON_SubDEdgePtr ON_SubDComponentId::EdgePtr ( const class ON_SubD subd) const

◆ EdgePtr() [2/2]

const ON_SubDEdgePtr ON_SubDComponentId::EdgePtr ( const class ON_SubD subd) const

◆ Face() [1/2]

const ON_SubDFace* ON_SubDComponentId::Face ( const class ON_SubD subd) const

◆ Face() [2/2]

const ON_SubDFace* ON_SubDComponentId::Face ( const class ON_SubD subd) const

◆ FaceCornerDex()

const ON_SubDFaceCornerDex ON_SubDComponentId::FaceCornerDex ( ) const

◆ FaceId()

unsigned ON_SubDComponentId::FaceId ( ) const

◆ FacePtr() [1/2]

const ON_SubDFacePtr ON_SubDComponentId::FacePtr ( const class ON_SubD subd) const

◆ FacePtr() [2/2]

const ON_SubDFacePtr ON_SubDComponentId::FacePtr ( const class ON_SubD subd) const

◆ IsEdgeId()

bool ON_SubDComponentId::IsEdgeId ( ) const
Returns
True if id > 0 and type = edge.

◆ IsFaceId()

bool ON_SubDComponentId::IsFaceId ( ) const
Returns
True if id > 0 and type = face.

◆ IsNotSet()

bool ON_SubDComponentId::IsNotSet ( ) const

Returns: true if type is unset or id is 0.

◆ IsSet()

bool ON_SubDComponentId::IsSet ( ) const

Returns: true if id > 0 and type is set to vertex, edge or face.

◆ IsVertexId()

bool ON_SubDComponentId::IsVertexId ( ) const
Returns
True if id > 0 and type = vertex.

◆ operator=()

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

◆ Reversed()

const ON_SubDComponentId ON_SubDComponentId::Reversed ( ) const

Create an ON_SubDComponentId that references the same SubD component but with the opposite value of this->ComponentDirection().

Returns
A ON_SubDComponentId with the same type, same id, and opposite direction.

◆ ToString()

const ON_wString ON_SubDComponentId::ToString ( bool  bUnsetIsEmptyString,
bool  bDirectionPrefix 
) const

Returns a string cN where N is ComponentId() and c is v, e or f for a vertex, edge or face component. Examples: If ComponentType is vertex and ComponentId() is 17, then the string will be "v17". If ComponentType is face, ComponentId() is 49, and FaceCornerDex is not set, the string will be "f49". If ComponentType is face, ComponentId() is 49, and FaceCornerDex() is ON_SubDFaceCornerDex(2,3), the string will be "f49.2".

Parameters
bUnsetIsEmptyStringIf bUnsetIsEmptyString is truen, then an unset component id returns the empty string. Otherwise and unset component id returns "unset".
bOrientationPrefixIf bDirectionPrefix is true, then the string begins with "+" when ComponentDirection() is 0 and "-" when ComponentDirection() is 1.
Returns

◆ Vertex() [1/2]

const ON_SubDVertex* ON_SubDComponentId::Vertex ( const class ON_SubD subd) const

◆ Vertex() [2/2]

const ON_SubDVertex* ON_SubDComponentId::Vertex ( const class ON_SubD subd) const

◆ VertexId()

unsigned ON_SubDComponentId::VertexId ( ) const

◆ VertexPtr() [1/2]

const ON_SubDVertexPtr ON_SubDComponentId::VertexPtr ( const class ON_SubD subd) const

◆ VertexPtr() [2/2]

const ON_SubDVertexPtr ON_SubDComponentId::VertexPtr ( const class ON_SubD subd) const

Member Data Documentation

◆ Unset

const ON_SubDComponentId ON_SubDComponentId::Unset
static

type = unset and id = 0;