HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_SubDivVertex Class Reference

#include <GU_SubDivPatch.h>

Public Member Functions

void incRefCount ()
 
void decRefCount ()
 
void setNum (GA_Index num)
 
GA_Index getNum () const
 
GU_SubDivEdgesetEdge (GU_SubDivVertex *vtx, int idx=-1, GU_SubDivEdge *parent=0)
 
void setEdge (GU_SubDivEdge *edge, int idx)
 
void clearEdge (GU_SubDivEdge *edge)
 
void removeEdge (int idx)
 
void setFace (GU_SubDivPatch *face, int idx=-1)
 
void clearFace (GU_SubDivPatch *face)
 
void setAllIncomplete ()
 
void copyIncomplete (const GU_SubDivVertex *vtx)
 
void setComplete (int i)
 
floatgetData () const
 Get subdivision data associated with this vertex. More...
 
floatgetVertexData (int fidx) const
 
void setVertexData (const float *data, int idx, const UT_IntArray &offsets)
 
void defaultVertexData (int low, int high)
 Resets the vertex data at off to the default values. More...
 
int getSize () const
 
int getVertexSize () const
 
void sum (const GU_SubDivVertex *vtx, fpreal scale=1)
 Operations used to build new data from subdivision rules. More...
 
void sum (const GU_SubDivVertex *vtx, const GU_SubDivPatch *face, fpreal scale=1)
 
void sumVertex (const GU_SubDivVertex *vtx, const GU_SubDivPatch *face, int idx, int low=0, int high=-1, fpreal scale=1)
 
void scale (fpreal scale)
 
void scaleVertex (fpreal scale, int low=0, int high=-1)
 
void copyVertex (int src, int dest, int low=0, int high=-1)
 
void getVertices (UT_Array< GU_SubDivVertex * > &list)
 
void getFaces (UT_Array< GU_SubDivPatch * > &list, const GU_SubDivPatch *face) const
 
GU_SubDivVertexgetChild ()
 Calculate the new subdivision point using the catmull-clark masks. More...
 
GU_SubDivVertexgetLimit ()
 
int getEdgeIndex (const GU_SubDivVertex *vtx) const
 
GU_SubDivEdgegetEdge (int idx) const
 
GU_SubDivEdgegetEdge (const GU_SubDivVertex *vtx) const
 
GU_SubDivVertexgetEdgeChild (const GU_SubDivVertex *vtx) const
 
int getFaceIndex (const GU_SubDivPatch *face) const
 
GU_SubDivPatchgetFace (int idx) const
 
bool hasFace (const GU_SubDivPatch *face) const
 
int getValence () const
 
bool hasHardEdge () const
 
void sortEdges ()
 Order the edges using the face set for this vertex. More...
 
void setWeight (fpreal weight, bool linear, const GU_SubDivPatch *face)
 
void setFlag (uint8 f)
 
void clearFlag (uint8 f)
 
bool getFlag (uint8 f) const
 
void dumpGeo (char c, const GU_SubDivPatch *face=0) const
 Dump geometry for the vertex as a draw file. More...
 

Static Public Member Functions

static GU_SubDivVertexallocVertex (int valence, int datasize, int vertexsize)
 
static GU_SubDivVertexallocVertex (const GU_SubDivVertex &src)
 
static void freeVertex (GU_SubDivVertex *vtx)
 

Protected Member Functions

void catclarkRule (GU_SubDivVertex *dest, int creaseidx[2], int hcount, bool limit)
 
void catclarkRuleVertex (GU_SubDivVertex *dest, int creaseidx[2], int hcount, int low, int high, bool limit)
 

Detailed Description

Definition at line 121 of file GU_SubDivPatch.h.

Member Function Documentation

static GU_SubDivVertex* GU_SubDivVertex::allocVertex ( int  valence,
int  datasize,
int  vertexsize 
)
static
static GU_SubDivVertex* GU_SubDivVertex::allocVertex ( const GU_SubDivVertex src)
static
void GU_SubDivVertex::catclarkRule ( GU_SubDivVertex dest,
int  creaseidx[2],
int  hcount,
bool  limit 
)
protected
void GU_SubDivVertex::catclarkRuleVertex ( GU_SubDivVertex dest,
int  creaseidx[2],
int  hcount,
int  low,
int  high,
bool  limit 
)
protected
void GU_SubDivVertex::clearEdge ( GU_SubDivEdge edge)
void GU_SubDivVertex::clearFace ( GU_SubDivPatch face)
void GU_SubDivVertex::clearFlag ( uint8  f)
inline

Definition at line 256 of file GU_SubDivPatch.h.

void GU_SubDivVertex::copyIncomplete ( const GU_SubDivVertex vtx)
void GU_SubDivVertex::copyVertex ( int  src,
int  dest,
int  low = 0,
int  high = -1 
)
void GU_SubDivVertex::decRefCount ( )
inline

Definition at line 130 of file GU_SubDivPatch.h.

void GU_SubDivVertex::defaultVertexData ( int  low,
int  high 
)

Resets the vertex data at off to the default values.

void GU_SubDivVertex::dumpGeo ( char  c,
const GU_SubDivPatch face = 0 
) const

Dump geometry for the vertex as a draw file.

static void GU_SubDivVertex::freeVertex ( GU_SubDivVertex vtx)
static
GU_SubDivVertex* GU_SubDivVertex::getChild ( )
inline

Calculate the new subdivision point using the catmull-clark masks.

Definition at line 215 of file GU_SubDivPatch.h.

float* GU_SubDivVertex::getData ( ) const
inline

Get subdivision data associated with this vertex.

Definition at line 166 of file GU_SubDivPatch.h.

GU_SubDivEdge* GU_SubDivVertex::getEdge ( int  idx) const
inline

Definition at line 233 of file GU_SubDivPatch.h.

GU_SubDivEdge* GU_SubDivVertex::getEdge ( const GU_SubDivVertex vtx) const
inline

Definition at line 234 of file GU_SubDivPatch.h.

GU_SubDivVertex* GU_SubDivVertex::getEdgeChild ( const GU_SubDivVertex vtx) const
inline

Definition at line 239 of file GU_SubDivPatch.h.

int GU_SubDivVertex::getEdgeIndex ( const GU_SubDivVertex vtx) const
GU_SubDivPatch* GU_SubDivVertex::getFace ( int  idx) const
inline

Definition at line 243 of file GU_SubDivPatch.h.

int GU_SubDivVertex::getFaceIndex ( const GU_SubDivPatch face) const
void GU_SubDivVertex::getFaces ( UT_Array< GU_SubDivPatch * > &  list,
const GU_SubDivPatch face 
) const
bool GU_SubDivVertex::getFlag ( uint8  f) const
inline

Definition at line 257 of file GU_SubDivPatch.h.

GU_SubDivVertex* GU_SubDivVertex::getLimit ( )
inline

Calculate the limit subdivision point using the catmull-clark masks. If you use this operation, further subdivision using this vertex will not produce the correct result.

Definition at line 225 of file GU_SubDivPatch.h.

GA_Index GU_SubDivVertex::getNum ( ) const
inline

Definition at line 139 of file GU_SubDivPatch.h.

int GU_SubDivVertex::getSize ( ) const
inline

Definition at line 185 of file GU_SubDivPatch.h.

int GU_SubDivVertex::getValence ( ) const
inline

Definition at line 247 of file GU_SubDivPatch.h.

float* GU_SubDivVertex::getVertexData ( int  fidx) const

Get per-face vertex data if it exists. You should use getFaceIndex() to retrieve the face index to be passed to this operation.

int GU_SubDivVertex::getVertexSize ( ) const
inline

Definition at line 186 of file GU_SubDivPatch.h.

void GU_SubDivVertex::getVertices ( UT_Array< GU_SubDivVertex * > &  list)
bool GU_SubDivVertex::hasFace ( const GU_SubDivPatch face) const
inline

Definition at line 244 of file GU_SubDivPatch.h.

bool GU_SubDivVertex::hasHardEdge ( ) const
void GU_SubDivVertex::incRefCount ( )
inline

Definition at line 129 of file GU_SubDivPatch.h.

void GU_SubDivVertex::removeEdge ( int  idx)

Remove an edge from this vertex at the given index. This operation may change the valence.

void GU_SubDivVertex::scale ( fpreal  scale)
inline

Definition at line 200 of file GU_SubDivPatch.h.

void GU_SubDivVertex::scaleVertex ( fpreal  scale,
int  low = 0,
int  high = -1 
)
void GU_SubDivVertex::setAllIncomplete ( )

Set and get completion status. We're complete when all our neighbouring edges and faces are defined.

void GU_SubDivVertex::setComplete ( int  i)
inline

Definition at line 163 of file GU_SubDivPatch.h.

GU_SubDivEdge* GU_SubDivVertex::setEdge ( GU_SubDivVertex vtx,
int  idx = -1,
GU_SubDivEdge parent = 0 
)

Adds vtx at the specified position in my edge table. If idx == -1, then add vtx to the next available position. Returns the edge.

void GU_SubDivVertex::setEdge ( GU_SubDivEdge edge,
int  idx 
)
inline

Definition at line 145 of file GU_SubDivPatch.h.

void GU_SubDivVertex::setFace ( GU_SubDivPatch face,
int  idx = -1 
)

Add the face to the specified position in my face table. If idx == -1, then we'll analyse the edges in the face to decide where to put it.

void GU_SubDivVertex::setFlag ( uint8  f)
inline

Definition at line 255 of file GU_SubDivPatch.h.

void GU_SubDivVertex::setNum ( GA_Index  num)
inline

Definition at line 138 of file GU_SubDivPatch.h.

void GU_SubDivVertex::setVertexData ( const float data,
int  idx,
const UT_IntArray offsets 
)

Set vertex data. The index is a face identifier in the current vertex. If a vertex seam is detected, we'll allocate separate face vertex data. The offset array is used to isolate individual vertex attributes so that we can have an independent hard edge mask for each attribute. The offsets are in number of floats and point to the start of each attribute.

void GU_SubDivVertex::setWeight ( fpreal  weight,
bool  linear,
const GU_SubDivPatch face 
)
void GU_SubDivVertex::sortEdges ( )

Order the edges using the face set for this vertex.

void GU_SubDivVertex::sum ( const GU_SubDivVertex vtx,
fpreal  scale = 1 
)
inline

Operations used to build new data from subdivision rules.

Definition at line 189 of file GU_SubDivPatch.h.

void GU_SubDivVertex::sum ( const GU_SubDivVertex vtx,
const GU_SubDivPatch face,
fpreal  scale = 1 
)
void GU_SubDivVertex::sumVertex ( const GU_SubDivVertex vtx,
const GU_SubDivPatch face,
int  idx,
int  low = 0,
int  high = -1,
fpreal  scale = 1 
)

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