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

A ON_SubDFaceCornerDex is a value that identifies a subd face corner. More...

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDFaceCornerDex ()=default
 
 ON_SubDFaceCornerDex (const ON_SubDFaceCornerDex &)=default
 
 ON_SubDFaceCornerDex (unsigned face_corner_index, unsigned face_edge_count)
 
 ~ON_SubDFaceCornerDex ()=default
 
unsigned CornerIndex () const
 
const ON_SubDVertexCornerVertex (const class ON_SubDFace *face) const
 Get the vertex at the corner of the face identified by this. If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned. More...
 
unsigned EdgeCount () const
 
const ON_SubDEdgePtr EdgePtr (const class ON_SubDFace *face, unsigned corner_edge_dex) const
 Get the edge face->EdgePtr(this->CornerIndex()). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned. More...
 
bool IsNotSet () const
 
bool IsQuadFace () const
 
Returns
True if this is a corner of a quad face (IsSet() && 4 == EdgeCount()).
More...
 
bool IsSet () const
 
bool IsValid (const class ON_SubDFace *face) const
 
const ON_SubDEdgePtr LeftEdgePtr (const class ON_SubDFace *face) const
 Get the edge of face that goes from the the previous face corner to this face corner. The edge pointer is oriented from PreviousCornerVertex() to CornerVertex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned. More...
 
const ON_SubDFaceCornerDex NextCornerDex () const
 NextCornerDex() = (this->CornerDex() + 1) % this->EdgeCount(). If this is not set, then ON_SubDFaceCornerDex::Unset is returned. More...
 
const ON_SubDVertexNextCornerVertex (const class ON_SubDFace *face) const
 Get the vertex at the corner of the face identified by this->NextCornerDex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned. More...
 
ON_SubDFaceCornerDexoperator= (const ON_SubDFaceCornerDex &)=default
 
const ON_SubDFaceCornerDex PreviousCornerDex () const
 NextCornerDex() = (this->CornerDex() + this->EdgeCount() - 1) % this->EdgeCount(). If this is not set, then ON_SubDFaceCornerDex::Unset is returned. More...
 
const ON_SubDVertexPreviousCornerVertex (const class ON_SubDFace *face) const
 Get the vertex at the corner of the face identified by this->PreviousCornerDex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned. More...
 
const ON_SubDEdgePtr RightEdgePtr (const class ON_SubDFace *face) const
 Get the edge of face that goes from the this face corner to the next face corner. The edge pointer is oriented from CornerVertex() to NextCornerVertex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned. More...
 

Static Public Member Functions

static int Compare (const ON_SubDFaceCornerDex *lhs, const ON_SubDFaceCornerDex *rhs)
 Uses ON_SubDFaceCornerDex::CompareAll to dictionary sort nonnull inputs and safely sorts nullptr to the end. More...
 
static int CompareAll (const ON_SubDFaceCornerDex &lhs, const ON_SubDFaceCornerDex &rhs)
 Dictionary compares EdgeCount() then CornerIndex(). Any set value < any unset value. More...
 

Static Public Attributes

static const ON_SubDFaceCornerDex Unset
 ON_SubDFaceCorner::Unset has CornerIndex()=0 and EdgeCount()=0. More...
 

Detailed Description

A ON_SubDFaceCornerDex is a value that identifies a subd face corner.

Constructor & Destructor Documentation

◆ ON_SubDFaceCornerDex() [1/3]

ON_SubDFaceCornerDex::ON_SubDFaceCornerDex ( )
default

◆ ~ON_SubDFaceCornerDex()

ON_SubDFaceCornerDex::~ON_SubDFaceCornerDex ( )
default

◆ ON_SubDFaceCornerDex() [2/3]

ON_SubDFaceCornerDex::ON_SubDFaceCornerDex ( const ON_SubDFaceCornerDex )
default

◆ ON_SubDFaceCornerDex() [3/3]

ON_SubDFaceCornerDex::ON_SubDFaceCornerDex ( unsigned  face_corner_index,
unsigned  face_edge_count 
)

Member Function Documentation

◆ Compare()

static int ON_SubDFaceCornerDex::Compare ( const ON_SubDFaceCornerDex lhs,
const ON_SubDFaceCornerDex rhs 
)
static

Uses ON_SubDFaceCornerDex::CompareAll to dictionary sort nonnull inputs and safely sorts nullptr to the end.

Parameters
lhs
rhs
Returns

◆ CompareAll()

static int ON_SubDFaceCornerDex::CompareAll ( const ON_SubDFaceCornerDex lhs,
const ON_SubDFaceCornerDex rhs 
)
static

Dictionary compares EdgeCount() then CornerIndex(). Any set value < any unset value.

Parameters
lhs
rhs
Returns
-1 if lsh < rhs. 0 if lhs = rhs. +1 if lhs > rhs.

◆ CornerIndex()

unsigned ON_SubDFaceCornerDex::CornerIndex ( ) const
Returns
Zero based index identifying the corner of a subd face.

◆ CornerVertex()

const ON_SubDVertex* ON_SubDFaceCornerDex::CornerVertex ( const class ON_SubDFace face) const

Get the vertex at the corner of the face identified by this. If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned.

Parameters
face
Returns
The vertex at the face corner

◆ EdgeCount()

unsigned ON_SubDFaceCornerDex::EdgeCount ( ) const
Returns
The number of edges in the subd face. /returns>

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDFaceCornerDex::EdgePtr ( const class ON_SubDFace face,
unsigned  corner_edge_dex 
) const

Get the edge face->EdgePtr(this->CornerIndex()). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned.

Parameters
face
corner_edge_dex0=edge entering the corner = this->LeftEdgePtr(face); 1=edge leaving the corner
Returns

◆ IsNotSet()

bool ON_SubDFaceCornerDex::IsNotSet ( ) const
Returns
True if EdgeCount() < 3 or CornerIndex() >= EdgeCount(). False otherwise.


◆ IsQuadFace()

bool ON_SubDFaceCornerDex::IsQuadFace ( ) const

Returns
True if this is a corner of a quad face (IsSet() && 4 == EdgeCount()).

◆ IsSet()

bool ON_SubDFaceCornerDex::IsSet ( ) const
Returns
True if EdgeCount() >= 3 and 0< =CornerIndex() < EdgeCount(). False otherwise.

◆ IsValid()

bool ON_SubDFaceCornerDex::IsValid ( const class ON_SubDFace face) const
Parameters
face
Returns
True if IsSet() is true, nullptr != face, and EdgeCount() = face->EdgeCount().

◆ LeftEdgePtr()

const ON_SubDEdgePtr ON_SubDFaceCornerDex::LeftEdgePtr ( const class ON_SubDFace face) const

Get the edge of face that goes from the the previous face corner to this face corner. The edge pointer is oriented from PreviousCornerVertex() to CornerVertex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned.

Parameters
face
Returns
face->EdgePtr(this->PreviousCornerDex().CornerIndex())

◆ NextCornerDex()

const ON_SubDFaceCornerDex ON_SubDFaceCornerDex::NextCornerDex ( ) const

NextCornerDex() = (this->CornerDex() + 1) % this->EdgeCount(). If this is not set, then ON_SubDFaceCornerDex::Unset is returned.

Returns
The next face coner in the counter-clocwise sense.

◆ NextCornerVertex()

const ON_SubDVertex* ON_SubDFaceCornerDex::NextCornerVertex ( const class ON_SubDFace face) const

Get the vertex at the corner of the face identified by this->NextCornerDex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned.

Parameters
face
Returns
The vertex at the next corner of the face

◆ operator=()

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

◆ PreviousCornerDex()

const ON_SubDFaceCornerDex ON_SubDFaceCornerDex::PreviousCornerDex ( ) const

NextCornerDex() = (this->CornerDex() + this->EdgeCount() - 1) % this->EdgeCount(). If this is not set, then ON_SubDFaceCornerDex::Unset is returned.

Returns
The previous face coner in the counter-clocwise sense.

◆ PreviousCornerVertex()

const ON_SubDVertex* ON_SubDFaceCornerDex::PreviousCornerVertex ( const class ON_SubDFace face) const

Get the vertex at the corner of the face identified by this->PreviousCornerDex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then nullptr is returned.

Parameters
face
Returns
The vertex at the previous corner of the face

◆ RightEdgePtr()

const ON_SubDEdgePtr ON_SubDFaceCornerDex::RightEdgePtr ( const class ON_SubDFace face) const

Get the edge of face that goes from the this face corner to the next face corner. The edge pointer is oriented from CornerVertex() to NextCornerVertex(). If this is not set, face is nullptr, or face->EdgeCount() != this->EdgeCount(), then ON_SubDEdgePtr::Null is returned.

Parameters
face
Returns
face->EdgePtr(this->CornerIndex())

Member Data Documentation

◆ Unset

const ON_SubDFaceCornerDex ON_SubDFaceCornerDex::Unset
static

ON_SubDFaceCorner::Unset has CornerIndex()=0 and EdgeCount()=0.