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

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDSectorId ()=default
 
 ON_SubDSectorId (const ON_SubDSectorId &)=default
 
 ~ON_SubDSectorId ()=default
 
bool IsSet () const
 
bool IsZero () const
 
const unsigned int MinimumFaceId () const
 
ON_SubDSectorIdoperator= (const ON_SubDSectorId &)=default
 
const unsigned int SectorFaceCount () const
 
const ON_wString ToString (bool bVerbose) const
 
wchar_t * ToString (wchar_t *s, size_t s_capacity) const
 
const unsigned int VertexId () const
 

Static Public Member Functions

static int Compare (ON_SubDSectorId lhs, ON_SubDSectorId rhs)
 
static int CompareFromPointers (const ON_SubDSectorId *lhs, const ON_SubDSectorId *rhs)
 
static int CompareMinimumFaceId (ON_SubDSectorId lhs, ON_SubDSectorId rhs)
 
static int CompareMinimumFaceIdFromPointers (const ON_SubDSectorId *lhs, const ON_SubDSectorId *rhs)
 
static int CompareVertexId (ON_SubDSectorId lhs, ON_SubDSectorId rhs)
 
static int CompareVertexIdAndMinimumFaceId (ON_SubDSectorId lhs, ON_SubDSectorId rhs)
 
static int CompareVertexIdAndMinimumFaceIdFromPointers (const ON_SubDSectorId *lhs, const ON_SubDSectorId *rhs)
 
static int CompareVertexIdFromPointers (const ON_SubDSectorId *lhs, const ON_SubDSectorId *rhs)
 
static const ON_SubDSectorId Create (const class ON_SubDVertex *vertex, const class ON_SubDFace *face)
 
static const ON_SubDSectorId CreateFromIds (unsigned int vertex_id, unsigned int minimum_face_id)
 

Static Public Attributes

static const ON_SubDSectorId Invalid
 VertexId() and MinimumFaceId() are zero. SectorFaceCount() = 0xFFFFFFFF;. More...
 
static const ON_SubDSectorId Zero
 VertexId(), MinimumFaceId(), and SectorFaceCount() are all zero. More...
 

Detailed Description

ON_SubDSectorId

Constructor & Destructor Documentation

◆ ON_SubDSectorId() [1/2]

ON_SubDSectorId::ON_SubDSectorId ( )
default

◆ ~ON_SubDSectorId()

ON_SubDSectorId::~ON_SubDSectorId ( )
default

◆ ON_SubDSectorId() [2/2]

ON_SubDSectorId::ON_SubDSectorId ( const ON_SubDSectorId )
default

Member Function Documentation

◆ Compare()

static int ON_SubDSectorId::Compare ( ON_SubDSectorId  lhs,
ON_SubDSectorId  rhs 
)
static

Description: Dictionary compare of VertexId(), MinimumFaceId(), and SectorFaceCount() in that order.

◆ CompareFromPointers()

static int ON_SubDSectorId::CompareFromPointers ( const ON_SubDSectorId lhs,
const ON_SubDSectorId rhs 
)
static

Description: Dictionary compare of VertexId(), MinimumFaceId(), and SectorFaceCount() in that order.

◆ CompareMinimumFaceId()

static int ON_SubDSectorId::CompareMinimumFaceId ( ON_SubDSectorId  lhs,
ON_SubDSectorId  rhs 
)
static

◆ CompareMinimumFaceIdFromPointers()

static int ON_SubDSectorId::CompareMinimumFaceIdFromPointers ( const ON_SubDSectorId lhs,
const ON_SubDSectorId rhs 
)
static

◆ CompareVertexId()

static int ON_SubDSectorId::CompareVertexId ( ON_SubDSectorId  lhs,
ON_SubDSectorId  rhs 
)
static

◆ CompareVertexIdAndMinimumFaceId()

static int ON_SubDSectorId::CompareVertexIdAndMinimumFaceId ( ON_SubDSectorId  lhs,
ON_SubDSectorId  rhs 
)
static

Description: Dictionary compare of VertexId() and MinimumFaceId() in that order.

◆ CompareVertexIdAndMinimumFaceIdFromPointers()

static int ON_SubDSectorId::CompareVertexIdAndMinimumFaceIdFromPointers ( const ON_SubDSectorId lhs,
const ON_SubDSectorId rhs 
)
static

Description: Dictionary compare of VertexId() and MinimumFaceId() in that order.

◆ CompareVertexIdFromPointers()

static int ON_SubDSectorId::CompareVertexIdFromPointers ( const ON_SubDSectorId lhs,
const ON_SubDSectorId rhs 
)
static

◆ Create()

static const ON_SubDSectorId ON_SubDSectorId::Create ( const class ON_SubDVertex vertex,
const class ON_SubDFace face 
)
static

No initialized construction for performance reasons. If initialization is required, then use sector_id = ON_SubDSectorId::Zero or sector_id = ON_SubDSectorId::Create(...). Description: Create a sector id from a vertex and face in the sector. A sector id uniquely identifies a sector in the context of a single ON_SubD. Parameters: vertex - [in] face - [in] A face in the sector. If vertex->IsSingleSectorVertex() is true, then face can be nullptr. Returns: If the vertex and face are not nullptr and the face is in a sector of the vertex, a nonzero zector id is returned. Otherwise ON_SubDSectorId::Invalid is returned.

◆ CreateFromIds()

static const ON_SubDSectorId ON_SubDSectorId::CreateFromIds ( unsigned int  vertex_id,
unsigned int  minimum_face_id 
)
static

Description: This function is used to create ON_SubDSectorId values for searching or comparing to values from ON_SubDSectorId::Create(). Use ON_SubDSectorId::Create() for all other uses. Parameters: vertex - [in] face - [in] A face in the sector. Returns: A ON_SubDSectorId with the specified values for vertex_id and minimum_face_id. The sector face count will be zero.

◆ IsSet()

bool ON_SubDSectorId::IsSet ( ) const

Returns: True if VertexId(), MinimumFaceId(), and SectorFaceCount() are all not zero.

◆ IsZero()

bool ON_SubDSectorId::IsZero ( ) const

Returns: True if this sector id is zero.

◆ MinimumFaceId()

const unsigned int ON_SubDSectorId::MinimumFaceId ( ) const

Returns: The sector's minimum face id.

◆ operator=()

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

◆ SectorFaceCount()

const unsigned int ON_SubDSectorId::SectorFaceCount ( ) const

Returns: Number of faces in the sector.

◆ ToString() [1/2]

const ON_wString ON_SubDSectorId::ToString ( bool  bVerbose) const

Parameters: bVerbose - [in] If true, the returned string begins with ON_SubDSectorId. Returns: "Zero", "Invalid", or "vX.fYxN" where X is VertexId(), Y is MinimumFaceId(), and N is the SectorFaceCount().

◆ ToString() [2/2]

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

Parameters: s - [in] beginning of string buffer s_capacity wchar_t element capacity of the string buffer Returns: nullptr if ther is not enough room in the buffer. Otherwise a pointer to the null terminator of the returned string. Remarks The returned string will be "0" for a zero sector id, "X" for an invalid sector id, or "vX.fYxN" where X is VertexId(), Y is MinimumFaceId(), and N is the SectorFaceCount().

◆ VertexId()

const unsigned int ON_SubDSectorId::VertexId ( ) const

Returns: The sector's center vertex id. Remarks: Either SectorId(), VertexId(), and MinimumFaceId() are all zero or are all nonzero.

Member Data Documentation

◆ Invalid

const ON_SubDSectorId ON_SubDSectorId::Invalid
static

VertexId() and MinimumFaceId() are zero. SectorFaceCount() = 0xFFFFFFFF;.

◆ Zero

const ON_SubDSectorId ON_SubDSectorId::Zero
static