ug4
ug::SubdivRules_PLoop Class Reference

A singleton that stores all rules for a piecewise-loop subdivision surface. More...

#include <subdivision_rules_piecewise_loop.h>

Classes

struct  NeighborInfo
 

Public Member Functions

number get_beta (size_t valency) const
 returns beta as it is used in the subdivision masks. More...
 
vector3 proj_crease_weights () const
 
number proj_inner_center_weight (size_t valence) const
 
void proj_inner_crease_nbr_weights (number &centerWgtOut, number *nbrWgtsOut, NeighborInfo *nbrInfos, size_t numNbrs) const
 
number proj_inner_nbr_weight (size_t valence) const
 
vector3 ref_even_crease_weights () const
 returns weights for center, nbr1 and nbr2. More...
 
number ref_even_inner_center_weight (size_t valence) const
 
number ref_even_inner_nbr_weight (size_t valence) const
 
vector2 ref_odd_crease_weights () const
 
vector4 ref_odd_inner_weights () const
 
vector4 ref_odd_inner_weights (size_t creaseValence) const
 weights of an odd vertex on an inner edge that is connected to a crease. More...
 

Static Public Member Functions

static SubdivRules_PLoopinst ()
 returns the only instance to this singleton. More...
 

Private Member Functions

number calculate_beta (size_t valency) const
 calculates beta as it is used in the subdivision masks. More...
 
size_t next_ind (size_t ind, size_t numInds) const
 returns the next index in a cyclic index set More...
 
SubdivRules_PLoopoperator= (const SubdivRules_PLoop &src)
 private assignment operator prohibits assignment. More...
 
size_t prev_ind (size_t ind, size_t numInds) const
 returns the previous index in a cyclic index set More...
 
 SubdivRules_PLoop ()
 private constructor prohibits multiple instantiation. More...
 
 SubdivRules_PLoop (const SubdivRules_PLoop &src)
 private copy constructor prohibits copy-construction. More...
 

Private Attributes

std::vector< numberm_betas
 

Detailed Description

A singleton that stores all rules for a piecewise-loop subdivision surface.

Constructor & Destructor Documentation

◆ SubdivRules_PLoop() [1/2]

ug::SubdivRules_PLoop::SubdivRules_PLoop ( )
private

private constructor prohibits multiple instantiation.

◆ SubdivRules_PLoop() [2/2]

ug::SubdivRules_PLoop::SubdivRules_PLoop ( const SubdivRules_PLoop src)
private

private copy constructor prohibits copy-construction.

Member Function Documentation

◆ calculate_beta()

number ug::SubdivRules_PLoop::calculate_beta ( size_t  valency) const
private

calculates beta as it is used in the subdivision masks.

References ug::PI.

◆ get_beta()

number ug::SubdivRules_PLoop::get_beta ( size_t  valency) const

returns beta as it is used in the subdivision masks.

performs a lookup if the valency is small enough. calculates a fresh beta else.

Referenced by proj_inner_center_weight(), proj_inner_nbr_weight(), ref_even_inner_center_weight(), and ref_even_inner_nbr_weight().

◆ inst()

◆ next_ind()

size_t ug::SubdivRules_PLoop::next_ind ( size_t  ind,
size_t  numInds 
) const
inlineprivate

returns the next index in a cyclic index set

Referenced by proj_inner_crease_nbr_weights().

◆ operator=()

SubdivRules_PLoop & ug::SubdivRules_PLoop::operator= ( const SubdivRules_PLoop src)
private

private assignment operator prohibits assignment.

◆ prev_ind()

size_t ug::SubdivRules_PLoop::prev_ind ( size_t  ind,
size_t  numInds 
) const
inlineprivate

returns the previous index in a cyclic index set

Referenced by proj_inner_crease_nbr_weights().

◆ proj_crease_weights()

vector3 ug::SubdivRules_PLoop::proj_crease_weights ( ) const
inline

◆ proj_inner_center_weight()

number ug::SubdivRules_PLoop::proj_inner_center_weight ( size_t  valence) const
inline

◆ proj_inner_crease_nbr_weights()

void ug::SubdivRules_PLoop::proj_inner_crease_nbr_weights ( number centerWgtOut,
number nbrWgtsOut,
NeighborInfo nbrInfos,
size_t  numNbrs 
) const
inline

◆ proj_inner_nbr_weight()

number ug::SubdivRules_PLoop::proj_inner_nbr_weight ( size_t  valence) const
inline

◆ ref_even_crease_weights()

vector3 ug::SubdivRules_PLoop::ref_even_crease_weights ( ) const
inline

returns weights for center, nbr1 and nbr2.

Referenced by ug::SubdivisionProjector::refinement_begins().

◆ ref_even_inner_center_weight()

◆ ref_even_inner_nbr_weight()

◆ ref_odd_crease_weights()

vector2 ug::SubdivRules_PLoop::ref_odd_crease_weights ( ) const
inline

◆ ref_odd_inner_weights() [1/2]

vector4 ug::SubdivRules_PLoop::ref_odd_inner_weights ( ) const
inline

◆ ref_odd_inner_weights() [2/2]

vector4 ug::SubdivRules_PLoop::ref_odd_inner_weights ( size_t  creaseValence) const
inline

weights of an odd vertex on an inner edge that is connected to a crease.

The weight for the vertex on the crease is in v.x(), the inner edge vertex in v.y() and the two indirectly connected vertex weights are in v.z() and v.w. creaseValence specifies the number of associated edges of the crease vertex.

Rules are taken from: "Piecewise Smooth Subdivision Surfaces with Normal Control", H. Biermann, Adi Levin, Denis Zorin.

References ug::PI, and ref_odd_inner_weights().

Member Data Documentation

◆ m_betas

std::vector<number> ug::SubdivRules_PLoop::m_betas
private

The documentation for this class was generated from the following files: