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

Simple arrays of ON_SubD_ComponentIdTypeAndTag elements are used to save original tag values so the can be retrieved after complex editing operations. More...

#include <opennurbs_subd.h>

Public Member Functions

ON_SubDComponentPtr::Type ComponentType () const
 
unsigned EdgeId () const
 
ON_SubDEdgeTag EdgeTag () const
 
unsigned FaceId () const
 
unsigned char FaceTag () const
 
const ON_wString ToString () const
 
unsigned VertexId () const
 
ON_SubDVertexTag VertexTag () const
 

Static Public Member Functions

static int CompareTypeAndId (const ON_SubD_ComponentIdTypeAndTag *lhs, const ON_SubD_ComponentIdTypeAndTag *rhs)
 
static int CompareTypeAndIdAndTag (const ON_SubD_ComponentIdTypeAndTag *lhs, const ON_SubD_ComponentIdTypeAndTag *rhs)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromEdge (const class ON_SubDEdge *e)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromEdgeId (unsigned edge_id, ON_SubDEdgeTag etag)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromFace (const class ON_SubDFace *f, unsigned char ftag)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromFaceId (unsigned face_id, unsigned char ftag)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromVertex (const class ON_SubDVertex *v)
 
static const ON_SubD_ComponentIdTypeAndTag CreateFromVertexId (unsigned vertex_id, ON_SubDVertexTag vtag)
 
static ON_SubDEdgeTag OriginalEdgeTag (const class ON_SubDEdge *e, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 
static ON_SubDEdgeTag OriginalEdgeTag (unsigned edge_id, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 
static unsigned char OriginalFaceTag (const class ON_SubDFace *f, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 
static unsigned char OriginalFaceTag (unsigned face_id, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 
static ON_SubDVertexTag OriginalVertexTag (const class ON_SubDVertex *v, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 
static ON_SubDVertexTag OriginalVertexTag (unsigned vertex_id, const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &sorted_tags)
 

Static Public Attributes

static const ON_SubD_ComponentIdTypeAndTag Unset
 

Detailed Description

Simple arrays of ON_SubD_ComponentIdTypeAndTag elements are used to save original tag values so the can be retrieved after complex editing operations.

Member Function Documentation

◆ CompareTypeAndId()

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

Description: Dictionary compare on ComponentType() and ComponentId() in that order.

◆ CompareTypeAndIdAndTag()

static int ON_SubD_ComponentIdTypeAndTag::CompareTypeAndIdAndTag ( const ON_SubD_ComponentIdTypeAndTag lhs,
const ON_SubD_ComponentIdTypeAndTag rhs 
)
static

Description: Dictionary compare on ComponentType(), ComponentId(), and tag in that order.

◆ ComponentType()

ON_SubDComponentPtr::Type ON_SubD_ComponentIdTypeAndTag::ComponentType ( ) const

◆ CreateFromEdge()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromEdge ( const class ON_SubDEdge e)
static

Parameters: e - [in] If e->m_edge_tag is ON_SubDEdgeTag::SmoothX, the ON_SubD_ComponentIdTypeAndTag EdgeTag() will be ON_SubDEdgeTag::Smoooth. Returns: If e is not nullptr and e->m_id > 0, a ON_SubD_ComponentIdTypeAndTag with EdgeTag() = e->m_edge_tag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned.

◆ CreateFromEdgeId()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromEdgeId ( unsigned  edge_id,
ON_SubDEdgeTag  etag 
)
static

Parameters: edge_id - [in] etag - [in] If etag is ON_SubDEdgeTag::SmoothX, the ON_SubD_ComponentIdTypeAndTag EdgeTag() will be ON_SubDEdgeTag::Smoooth. Returns: If edge_id > 0, a ON_SubD_ComponentIdTypeAndTag with EdgeTag() = etag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned.

◆ CreateFromFace()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromFace ( const class ON_SubDFace f,
unsigned char  ftag 
)
static

Parameters: f - [in] ftag - [in] Any value and the interpretation is up to the context using the ON_SubD_ComponentIdTypeAndTag. Returns: If f is no nullptr and f->m_id > 0, a ON_SubD_ComponentIdTypeAndTag with FaceTag() = ftag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned. Remarks: SubD faces do not have a tag in the sense that vertices and edges do, but in complex editing tasks it is sometimes useful to include faces in an array of ON_SubD_ComponentIdTypeAndTag elements.

◆ CreateFromFaceId()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromFaceId ( unsigned  face_id,
unsigned char  ftag 
)
static

Parameters: face_id - [in] ftag - [in] Any value and the interpretation is up to the context using the ON_SubD_ComponentIdTypeAndTag. Returns: If face_id > 0, a ON_SubD_ComponentIdTypeAndTag with FaceTag() = vtag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned. Remarks: SubD faces do not have a tag in the sense that vertices and edges do, but in complex editing tasks it is sometimes useful to include faces in an array of ON_SubD_ComponentIdTypeAndTag elements.

◆ CreateFromVertex()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromVertex ( const class ON_SubDVertex v)
static

Returns: If v is no nullptr and v->m_id > 0, a ON_SubD_ComponentIdTypeAndTag with VertexTag() = v->m_vertex_tag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned.

◆ CreateFromVertexId()

static const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::CreateFromVertexId ( unsigned  vertex_id,
ON_SubDVertexTag  vtag 
)
static

Returns: If vertex_id > 0, a ON_SubD_ComponentIdTypeAndTag with VertexTag() = vtag is returned. Otherwise ON_SubD_ComponentIdTypeAndTag::Unset is returned.

◆ EdgeId()

unsigned ON_SubD_ComponentIdTypeAndTag::EdgeId ( ) const

◆ EdgeTag()

ON_SubDEdgeTag ON_SubD_ComponentIdTypeAndTag::EdgeTag ( ) const

◆ FaceId()

unsigned ON_SubD_ComponentIdTypeAndTag::FaceId ( ) const

◆ FaceTag()

unsigned char ON_SubD_ComponentIdTypeAndTag::FaceTag ( ) const

◆ OriginalEdgeTag() [1/2]

static ON_SubDEdgeTag ON_SubD_ComponentIdTypeAndTag::OriginalEdgeTag ( const class ON_SubDEdge e,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: e - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If e is in sorted_tags[], the EdgeTag() from from sorted_tags[] is returned. Otherwise e->m_edge_tag is returned.

◆ OriginalEdgeTag() [2/2]

static ON_SubDEdgeTag ON_SubD_ComponentIdTypeAndTag::OriginalEdgeTag ( unsigned  edge_id,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: edge_id - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If edge_id is in sorted_tags[], the EdgeTag() from from sorted_tags[] is returned. Otherwise ON_SubDEdgeTag::Unset is returned.

◆ OriginalFaceTag() [1/2]

static unsigned char ON_SubD_ComponentIdTypeAndTag::OriginalFaceTag ( const class ON_SubDFace f,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: f - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If f is in sorted_tags[], the FaceTag() from from sorted_tags[] is returned. Otherwise 0 is returned.

◆ OriginalFaceTag() [2/2]

static unsigned char ON_SubD_ComponentIdTypeAndTag::OriginalFaceTag ( unsigned  face_id,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: face_id - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If face_id is in sorted_tags[], the FaceTag() from from sorted_tags[] is returned. Otherwise ON_SubDFaceTag::Unset is returned.

◆ OriginalVertexTag() [1/2]

static ON_SubDVertexTag ON_SubD_ComponentIdTypeAndTag::OriginalVertexTag ( const class ON_SubDVertex v,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: v - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If v is in sorted_tags[], the VertexTag() from from sorted_tags[] is returned. Otherwise v->m_vertex_tag is returned.

◆ OriginalVertexTag() [2/2]

static ON_SubDVertexTag ON_SubD_ComponentIdTypeAndTag::OriginalVertexTag ( unsigned  vertex_id,
const ON_SimpleArray< ON_SubD_ComponentIdTypeAndTag > &  sorted_tags 
)
static

Parameters: vertex_id - [in] sorted_tags[] - [in] Array sorted by ON_SubD_ComponentIdTypeAndTag::CompareTypeAndId(). Returns: If vertex_id is in sorted_tags[], the VertexTag() from from sorted_tags[] is returned. Otherwise ON_SubDVertexTag::Unset is returned.

◆ ToString()

const ON_wString ON_SubD_ComponentIdTypeAndTag::ToString ( ) const

◆ VertexId()

unsigned ON_SubD_ComponentIdTypeAndTag::VertexId ( ) const

◆ VertexTag()

ON_SubDVertexTag ON_SubD_ComponentIdTypeAndTag::VertexTag ( ) const

Member Data Documentation

◆ Unset

const ON_SubD_ComponentIdTypeAndTag ON_SubD_ComponentIdTypeAndTag::Unset
static