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

#include <opennurbs_subd.h>

Public Types

enum  : unsigned { SeedCapacity = 8 }
 

Public Member Functions

const ON_SubDEdgeEdge () const
 
unsigned EdgeDex () const
 
unsigned EdgeId () const
 
bool EdgeMark (bool bNullEdgeResult) const
 
const ON_SubDEdgePtr EdgePtr () const
 
const ON_SubDFaceFace () const
 
unsigned FaceId () const
 
bool FaceMark (bool bNullFaceResult) const
 
bool IsNotNull () const
 
bool IsNull () const
 
bool IsPackable () const
 
const ON_SubDQuadFacePackSide LeftFace (bool bStopAtCrease) const
 
bool Mark () const
 
const ON_SubDQuadFacePackSide NeigborFace (bool bStopAtCrease) const
 
const ON_SubDQuadFacePackSide NeigborFace (unsigned relative_side_dex, bool bStopAtCrease) const
 
const ON_SubDQuadFacePackSide NextFace (bool bStopAtCrease) const
 
unsigned PackId () const
 
const ON_SubDQuadFacePackSide PrevFace (bool bStopAtCrease) const
 
const ON_SubDEdgeRelativeEdge (unsigned relative_side_dex) const
 
unsigned int RelativeEdgeId (unsigned relative_side_dex) const
 
const ON_SubDEdgePtr RelativeEdgePtr (unsigned relative_side_dex) const
 
const ON_SubDQuadFacePackSide RelativeSide (unsigned relative_side_dex) const
 
const ON_SubDQuadFacePackSide RightFace (bool bStopAtCrease) const
 
bool SetEdgeMark (bool bEdgeMark) const
 
bool SetFaceMark (bool bFaceMark) const
 
void SetMark (bool bFaceMark) const
 
void SetPackId (unsigned int pack_id)
 

Static Public Member Functions

static bool CheckStrip (const ON_SimpleArray< ON_SubDQuadFacePackSide > &strip)
 
static bool CheckStrip (const ON_SubDQuadFacePackSide *strip, unsigned strip_count)
 
static const ON_SubDQuadFacePackSide Create (const ON_SubDFace *face, unsigned int edge_dex)
 
static bool GetPackSeed (const ON_SubDFace *face, unsigned count, ON_SubDQuadFacePackSide group[ON_SubDQuadFacePackSide::SeedCapacity][ON_SubDQuadFacePackSide::SeedCapacity])
 
static unsigned GetStrip (ON_SubDQuadFacePackSide f, bool bStopAtCrease, bool bStopAtExtraordinaryHop, ON_SimpleArray< ON_SubDQuadFacePackSide > &strip, unsigned strip_capacity)
 
static unsigned GetStrip (ON_SubDQuadFacePackSide f, bool bStopAtCrease, bool bStopAtExtraordinaryHop, ON_SubDQuadFacePackSide *strip, unsigned strip_capacity)
 
static unsigned GetStrip (ON_SubDQuadFacePackSide f, ON_SimpleArray< ON_SubDQuadFacePackSide > &strip, unsigned strip_capacity)
 
static unsigned GetStrip (ON_SubDQuadFacePackSide f, ON_SubDQuadFacePackSide *strip, unsigned strip_capacity)
 
static bool IsOrdinaryHop (ON_SubDQuadFacePackSide f0, ON_SubDQuadFacePackSide f1)
 
static bool IsPackableFace (const ON_SubDFace *face)
 
static const ON_2udex QuadPackIsValid (const ON_SubDQuadFacePackSide seed, bool bInQuadPackMark)
 
static void ReverseStrip (ON_SubDQuadFacePackSide *strip, unsigned strip_count)
 
static void SetStripMark (bool bMark, const ON_SubDQuadFacePackSide *strip, unsigned count)
 
static bool StripsAreNeighbors (const ON_SubDQuadFacePackSide *strip0, unsigned strip0_side_dex, const ON_SubDQuadFacePackSide *strip1, unsigned strip1_side_dex, unsigned count)
 

Static Public Attributes

static const ON_SubDQuadFacePackSide Null
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned

no construction for efficiency ON_SubDQuadFacePackSide() = default; ~ON_SubDQuadFacePackSide() = default; ON_SubDQuadFacePackSide(const ON_SubDQuadFacePackSide&) = default; ON_SubDQuadFacePackSide& operator=(const ON_SubDQuadFacePackSide&) = default;

Enumerator
SeedCapacity 

Member Function Documentation

◆ CheckStrip() [1/2]

static bool ON_SubDQuadFacePackSide::CheckStrip ( const ON_SimpleArray< ON_SubDQuadFacePackSide > &  strip)
static

◆ CheckStrip() [2/2]

static bool ON_SubDQuadFacePackSide::CheckStrip ( const ON_SubDQuadFacePackSide strip,
unsigned  strip_count 
)
static

◆ Create()

static const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::Create ( const ON_SubDFace face,
unsigned int  edge_dex 
)
static

◆ Edge()

const ON_SubDEdge* ON_SubDQuadFacePackSide::Edge ( ) const

◆ EdgeDex()

unsigned ON_SubDQuadFacePackSide::EdgeDex ( ) const

◆ EdgeId()

unsigned ON_SubDQuadFacePackSide::EdgeId ( ) const

◆ EdgeMark()

bool ON_SubDQuadFacePackSide::EdgeMark ( bool  bNullEdgeResult) const

Returns: If this->Edge() is not nullptr, this->Edge()->Mark() is returned. Otherwise, bNullEdgeResult is returned.

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDQuadFacePackSide::EdgePtr ( ) const

◆ Face()

const ON_SubDFace* ON_SubDQuadFacePackSide::Face ( ) const

◆ FaceId()

unsigned ON_SubDQuadFacePackSide::FaceId ( ) const

◆ FaceMark()

bool ON_SubDQuadFacePackSide::FaceMark ( bool  bNullFaceResult) const

Returns: If this->Face() is not nullptr, this->Face()->Mark() is returned. Otherwise, bNullFaceResult is returned.

◆ GetPackSeed()

static bool ON_SubDQuadFacePackSide::GetPackSeed ( const ON_SubDFace face,
unsigned  count,
ON_SubDQuadFacePackSide  group[ON_SubDQuadFacePackSide::SeedCapacity][ON_SubDQuadFacePackSide::SeedCapacity] 
)
static

◆ GetStrip() [1/4]

static unsigned ON_SubDQuadFacePackSide::GetStrip ( ON_SubDQuadFacePackSide  f,
bool  bStopAtCrease,
bool  bStopAtExtraordinaryHop,
ON_SimpleArray< ON_SubDQuadFacePackSide > &  strip,
unsigned  strip_capacity 
)
static

◆ GetStrip() [2/4]

static unsigned ON_SubDQuadFacePackSide::GetStrip ( ON_SubDQuadFacePackSide  f,
bool  bStopAtCrease,
bool  bStopAtExtraordinaryHop,
ON_SubDQuadFacePackSide strip,
unsigned  strip_capacity 
)
static

◆ GetStrip() [3/4]

static unsigned ON_SubDQuadFacePackSide::GetStrip ( ON_SubDQuadFacePackSide  f,
ON_SimpleArray< ON_SubDQuadFacePackSide > &  strip,
unsigned  strip_capacity 
)
static

◆ GetStrip() [4/4]

static unsigned ON_SubDQuadFacePackSide::GetStrip ( ON_SubDQuadFacePackSide  f,
ON_SubDQuadFacePackSide strip,
unsigned  strip_capacity 
)
static

◆ IsNotNull()

bool ON_SubDQuadFacePackSide::IsNotNull ( ) const

◆ IsNull()

bool ON_SubDQuadFacePackSide::IsNull ( ) const

◆ IsOrdinaryHop()

static bool ON_SubDQuadFacePackSide::IsOrdinaryHop ( ON_SubDQuadFacePackSide  f0,
ON_SubDQuadFacePackSide  f1 
)
static

Parameters: f0 - [in] f1 - [in] Returns: If all of the following conditions are true, then true is returned. Otherwise false is returned.

  1. f0 and f1 reference distinct non null faces.
  2. f0.RelativeEdge(0) and f1.RelativeEdge(0) is the same smooth edge.
  3. f0 and f1 have compatible orientations across the shared edge.
  4. At each end of the shared edge, the vertices is either 4.1 smooth with 4 edges and 4 faces OR 4.2 a crease and the associated sides of f0 and f1 are also creases.

◆ IsPackable()

bool ON_SubDQuadFacePackSide::IsPackable ( ) const
Deprecated:
Incorrectly implemented. Do not use.

◆ IsPackableFace()

static bool ON_SubDQuadFacePackSide::IsPackableFace ( const ON_SubDFace face)
static

Returns: If face is is a quad, face->Mark() is false, and 0 == face->PackId(), then face is not modified and true is returned. Otherwise, face->Mark is set to true and false is returned.

◆ LeftFace()

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::LeftFace ( bool  bStopAtCrease) const

Description: Use LeftFace() to turn left when traversing a rectangular grid of quads. The active edge of the returned ON_SubDQuadFacePackSide is opposite from this ON_SubDQuadFacePackSide.

◆ Mark()

bool ON_SubDQuadFacePackSide::Mark ( ) const

◆ NeigborFace() [1/2]

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::NeigborFace ( bool  bStopAtCrease) const

Description: Most of the time, you want to use NextFace() or PrevFace() instead of this function. In particular, to interatate forward along a strip of quads, use NextFace(). To iterate backwards along a strip of quads use PrevFace(). This function gets a ON_SubDQuadFacePackSide that references a neighboring face and shares the referenced edge with this. (Think of neighbors talking across a fence). Parameters: bStopAtCrease - [in] If true, a crease edge will not be traversed. Returns: If this->Edge() is attached to 2 quad faces and the faces have compatible orientations, then a ON_SubDQuadFacePackSide referencing the neighboring quad and this->Edge() is returned. Otherwise ON_SubDQuadFacePackSide::Null is returned.

◆ NeigborFace() [2/2]

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::NeigborFace ( unsigned  relative_side_dex,
bool  bStopAtCrease 
) const

Description: Most of the time, you want to use NextFace() or PrevFace() instead of this function. In particular, to interatate forward along a strip of quads, use NextFace(). To iterate backwards along a strip of quads use PrevFace(). This function gets a ON_SubDQuadFacePackSide that references a neighboring face and shares the referenced edge with this. (Think of neighbors talking across a fence). Parameters: relative_side_dex - [in] 0 <= relative_side_dex < 4 0 references this->Edge(). bStopAtCrease - [in] If true, a crease edge will not be traversed. Returns: If this->RelativeEdge(relative_side_dex) is attached to 2 quad faces and the faces have compatible orientations, then a ON_SubDQuadFacePackSide referencing the neighboring quad and this->RelativeEdge(relative_side_dex) is returned. Otherwise ON_SubDQuadFacePackSide::Null is returned.

◆ NextFace()

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::NextFace ( bool  bStopAtCrease) const

Description: Use NextFace() to iterate forwards along a strip of quads. The active edge of the returned ON_SubDQuadFacePackSide is opposite from this ON_SubDQuadFacePackSide. Parameters: bStopAtCrease - [in] If true, a crease edge will not be traversed. Returns: Gets ON_SubDQuadFacePackSide that references the neighboring quad and sets the reference edge to be oppisite the edge between this->Face() and this->NextFace(...).Face(). If there is not a neighboring quad or the quad orientations are not compatible or bStopAtCrease is true and the separating edge is a crease, then ON_SubDQuadFacePackSide::Null is returned.

◆ PackId()

unsigned ON_SubDQuadFacePackSide::PackId ( ) const

◆ PrevFace()

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::PrevFace ( bool  bStopAtCrease) const

Description: Use PrevFace() to iterate backwards along a strip of quads. The active edge of the returned ON_SubDQuadFacePackSide is shared with this ON_SubDQuadFacePackSide. Parameters: bStopAtCrease - [in] If true, a crease edge will not be traversed. Returns: Gets ON_SubDQuadFacePackSide that references the neighboring quad and sets the reference edge to be oppisite the edge between this->Face() and this->PrevFace(...).Face(). If there is not a neighboring quad or the quad orientations are not compatible or bStopAtCrease is true and the separating edge is a crease, then ON_SubDQuadFacePackSide::Null is returned.

◆ QuadPackIsValid()

static const ON_2udex ON_SubDQuadFacePackSide::QuadPackIsValid ( const ON_SubDQuadFacePackSide  seed,
bool  bInQuadPackMark 
)
static

Description: Determines if the subd face pack containing seed is valid. Parameters: bPermitWrapping - [in] If true, then the face pack is allowed to wrap. For example, if bPermitWrapping is true, then a SubD cylinder that is a regular quad grid can have a single face pack. seed - [in] References any face in a SubD. Returns: If seed is in a valid quad grid,the pack id is seed.PackId() and the size of the grid is ON_2dex.i x ON_2dex.j. Otherwise ON_2udex::Zero is returned.

◆ RelativeEdge()

const ON_SubDEdge* ON_SubDQuadFacePackSide::RelativeEdge ( unsigned  relative_side_dex) const

◆ RelativeEdgeId()

unsigned int ON_SubDQuadFacePackSide::RelativeEdgeId ( unsigned  relative_side_dex) const

◆ RelativeEdgePtr()

const ON_SubDEdgePtr ON_SubDQuadFacePackSide::RelativeEdgePtr ( unsigned  relative_side_dex) const

◆ RelativeSide()

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::RelativeSide ( unsigned  relative_side_dex) const

Parameters: relative_side_dex - [in] 0 <= relative_side_dex < 4 0: this->Edge() will be the edge of the returned ON_SubDQuadFacePackSide. Returns: A new ON_SubDQuadFacePackSide referencing this->Face() and this->RelativeEdge(relative_side_dex).

◆ ReverseStrip()

static void ON_SubDQuadFacePackSide::ReverseStrip ( ON_SubDQuadFacePackSide strip,
unsigned  strip_count 
)
static

◆ RightFace()

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::RightFace ( bool  bStopAtCrease) const

Description: Use RightFace() to turn left when traversing a rectangular grid of quads. The active edge of the returned ON_SubDQuadFacePackSide is opposite from this ON_SubDQuadFacePackSide.

◆ SetEdgeMark()

bool ON_SubDQuadFacePackSide::SetEdgeMark ( bool  bEdgeMark) const

Parameters: bEdgeeMark - [in] Returns: True if this->Edge() is not nullptr and the mark was set. False if this->Edge() is nullptr.

◆ SetFaceMark()

bool ON_SubDQuadFacePackSide::SetFaceMark ( bool  bFaceMark) const

Parameters: bFaceMark - [in] Returns: True if this->Face() is not nullptr and the mark was set. False if this->Face() is nullptr.

◆ SetMark()

void ON_SubDQuadFacePackSide::SetMark ( bool  bFaceMark) const
Deprecated:
Use ON_SubDQuadFacePackSide::SetFaceMark(bFaceMark)

◆ SetPackId()

void ON_SubDQuadFacePackSide::SetPackId ( unsigned int  pack_id)

◆ SetStripMark()

static void ON_SubDQuadFacePackSide::SetStripMark ( bool  bMark,
const ON_SubDQuadFacePackSide strip,
unsigned  count 
)
static

◆ StripsAreNeighbors()

static bool ON_SubDQuadFacePackSide::StripsAreNeighbors ( const ON_SubDQuadFacePackSide strip0,
unsigned  strip0_side_dex,
const ON_SubDQuadFacePackSide strip1,
unsigned  strip1_side_dex,
unsigned  count 
)
static

Member Data Documentation

◆ Null

const ON_SubDQuadFacePackSide ON_SubDQuadFacePackSide::Null
static