Stores topology data for a specified set of refinement options. More...
#include <topologyRefiner.h>
Public Member Functions | |
TopologyRefiner (Sdc::Type type, Sdc::Options options=Sdc::Options()) | |
Constructor. More... | |
~TopologyRefiner () | |
Destructor. More... | |
Sdc::Type | GetSchemeType () const |
Returns the subdivision scheme. More... | |
Sdc::Options | GetSchemeOptions () const |
Returns the subdivision options. More... | |
bool | IsUniform () const |
Returns true if uniform subdivision has been applied. More... | |
int | GetMaxLevel () const |
Returns the highest level of refinement. More... | |
int | GetNumVerticesTotal () const |
Returns the total number of vertices in all levels. More... | |
int | GetNumEdgesTotal () const |
Returns the total number of edges in all levels. More... | |
int | GetNumFacesTotal () const |
Returns the total number of edges in all levels. More... | |
int | GetNumFaceVerticesTotal () const |
Returns the total number of face vertices in all levels. More... | |
void | RefineUniform (int maxLevel, bool fullTopologyInLastLevel=false) |
Refine the topology uniformly. More... | |
void | RefineAdaptive (int maxLevel, bool fullTopologyInLastLevel=false) |
Feature Adaptive topology refinement. More... | |
void | Unrefine () |
Unrefine the topology (keep control cage) More... | |
void | Clear () |
Clear the topology entirely. More... | |
template<class T , class U > | |
void | Interpolate (T const *src, U *dst) const |
Apply vertex and varying interpolation weights to a primvar buffer. More... | |
template<class T , class U > | |
void | Interpolate (int level, T const *src, U *dst) const |
Apply vertex and varying interpolation weights to a primvar buffer for a single level level of refinement. More... | |
template<class T , class U > | |
void | InterpolateVarying (T const *src, U *dst) const |
Apply only varying interpolation weights to a primvar buffer. More... | |
template<class T , class U > | |
void | InterpolateVarying (int level, T const *src, U *dst) const |
Apply only varying interpolation weights to a primvar buffer for a single level level of refinement. More... | |
template<class T , class U > | |
void | InterpolateFaceVarying (T const *src, U *dst, int channel=0) const |
Apply face-varying interpolation weights to a primvar buffer. More... | |
template<class T , class U > | |
void | InterpolateFaceVarying (int level, T const *src, U *dst, int channel=0) const |
int | GetNumVertices (int level) const |
Returns the number of vertices at a given level of refinement. More... | |
int | GetNumEdges (int level) const |
Returns the number of edges at a given level of refinement. More... | |
int | GetNumFaces (int level) const |
Returns the number of face vertex indices at a given level of refinement. More... | |
int | GetNumFaceVertices (int level) const |
Returns the number of faces at a given level of refinement. More... | |
float | GetEdgeSharpness (int level, Index edge) const |
Returns the sharpness of a given edge (at 'level' of refinement) More... | |
float | GetVertexSharpness (int level, Index vert) const |
Returns the sharpness of a given vertex (at 'level' of refinement) More... | |
Sdc::Crease::Rule | GetVertexRule (int level, Index vert) const |
Returns the subdivision rule of a given vertex (at 'level' of refinement) More... | |
IndexArray const | GetFaceVertices (int level, Index face) const |
Returns the vertices of a 'face' at 'level'. More... | |
IndexArray const | GetFaceEdges (int level, Index face) const |
Returns the edges of a 'face' at 'level'. More... | |
IndexArray const | GetEdgeVertices (int level, Index edge) const |
Returns the vertices of an 'edge' at 'level' (2 of them) More... | |
IndexArray const | GetEdgeFaces (int level, Index edge) const |
Returns the faces incident to 'edge' at 'level'. More... | |
IndexArray const | GetVertexFaces (int level, Index vert) const |
Returns the faces incident to 'vertex' at 'level'. More... | |
IndexArray const | GetVertexEdges (int level, Index vert) const |
Returns the edges incident to 'vertex' at 'level'. More... | |
LocalIndexArray const | VertexFaceLocalIndices (int level, Index vert) const |
Returns the local face indices of vertex 'vert' at 'level'. More... | |
LocalIndexArray const | VertexEdgeLocalIndices (int level, Index vert) const |
Returns the local edge indices of vertex 'vert' at 'level'. More... | |
Index | FindEdge (int level, Index v0, Index v1) const |
Returns the edge with vertices'v0' and 'v1' (or -1 if they are not connected) More... | |
int | GetNumFVarChannels () const |
Returns the number of face-varying channels in the tables. More... | |
int | GetNumFVarValuesTotal (int channel=0) const |
Returns the total number of face-varying values in all levels. More... | |
int | GetNumFVarValues (int level, int channel=0) const |
Returns the number of face-varying values at a given level of refinement. More... | |
IndexArray const | GetFVarFaceValues (int level, Index face, int channel=0) const |
Returns the face-varying values of a 'face' at 'level'. More... | |
IndexArray const | GetFaceChildFaces (int level, Index f) const |
Returns the child faces of face 'f' at 'level'. More... | |
IndexArray const | GetFaceChildEdges (int level, Index f) const |
Returns the child edges of face 'f' at 'level'. More... | |
IndexArray const | GetEdgeChildEdges (int level, Index e) const |
Returns the child edges of edge 'e' at 'level'. More... | |
Index | GetFaceChildVertex (int level, Index f) const |
Returns the child vertex of face 'f' at 'level'. More... | |
Index | GetEdgeChildVertex (int level, Index e) const |
Returns the child vertex of edge 'e' at 'level'. More... | |
Index | GetVertexChildVertex (int level, Index v) const |
Returns the child vertex of vertex 'v' at 'level'. More... | |
int | GetNumPtexFaces () const |
Returns the number of ptex faces in the mesh. More... | |
int | GetPtexIndex (Index f) const |
Returns the ptex face index given a coarse face 'f' or -1. More... | |
bool | ValidateTopology (int level) const |
Returns true if the topology of 'level' is valid. More... | |
void | PrintTopology (int level, bool children=true) const |
Prints topology information to console. More... | |
Friends | |
template<class MESH > | |
class | TopologyRefinerFactory |
class | TopologyRefinerFactoryBase |
class | PatchTablesFactory |
Stores topology data for a specified set of refinement options.
Definition at line 55 of file topologyRefiner.h.
TopologyRefiner | ( | Sdc::Type | type, |
Sdc::Options | options = Sdc::Options() |
||
) |
Constructor.
~TopologyRefiner | ( | ) |
Destructor.
|
inlineprotected |
Definition at line 426 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 427 of file topologyRefiner.h.
void Clear | ( | ) |
Clear the topology entirely.
|
inlineprotected |
Definition at line 436 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 430 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 433 of file topologyRefiner.h.
Returns the edge with vertices'v0' and 'v1' (or -1 if they are not connected)
Definition at line 290 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 438 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 394 of file topologyRefiner.h.
|
inline |
Returns the child edges of edge 'e' at 'level'.
Definition at line 336 of file topologyRefiner.h.
Returns the child vertex of edge 'e' at 'level'.
Definition at line 346 of file topologyRefiner.h.
|
inline |
Returns the faces incident to 'edge' at 'level'.
Definition at line 264 of file topologyRefiner.h.
|
inline |
Returns the sharpness of a given edge (at 'level' of refinement)
Definition at line 228 of file topologyRefiner.h.
|
inline |
Returns the vertices of an 'edge' at 'level' (2 of them)
Definition at line 259 of file topologyRefiner.h.
|
inline |
Returns the child edges of face 'f' at 'level'.
Definition at line 331 of file topologyRefiner.h.
|
inline |
Returns the child faces of face 'f' at 'level'.
Definition at line 326 of file topologyRefiner.h.
Returns the child vertex of face 'f' at 'level'.
Definition at line 341 of file topologyRefiner.h.
|
inline |
Returns the edges of a 'face' at 'level'.
Definition at line 254 of file topologyRefiner.h.
|
inline |
Returns the vertices of a 'face' at 'level'.
Definition at line 249 of file topologyRefiner.h.
|
inline |
Returns the face-varying values of a 'face' at 'level'.
Definition at line 314 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 395 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 396 of file topologyRefiner.h.
|
inline |
Returns the highest level of refinement.
Definition at line 75 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 400 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 399 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 401 of file topologyRefiner.h.
|
inline |
Returns the number of edges at a given level of refinement.
Definition at line 213 of file topologyRefiner.h.
int GetNumEdgesTotal | ( | ) | const |
Returns the total number of edges in all levels.
|
inline |
Returns the number of face vertex indices at a given level of refinement.
Definition at line 218 of file topologyRefiner.h.
int GetNumFacesTotal | ( | ) | const |
Returns the total number of edges in all levels.
|
inline |
Returns the number of faces at a given level of refinement.
Definition at line 223 of file topologyRefiner.h.
int GetNumFaceVerticesTotal | ( | ) | const |
Returns the total number of face vertices in all levels.
|
inline |
Returns the number of face-varying channels in the tables.
Definition at line 301 of file topologyRefiner.h.
|
inline |
Returns the number of face-varying values at a given level of refinement.
Definition at line 309 of file topologyRefiner.h.
int GetNumFVarValuesTotal | ( | int | channel = 0 | ) | const |
Returns the total number of face-varying values in all levels.
|
inlineprotected |
Definition at line 393 of file topologyRefiner.h.
int GetNumPtexFaces | ( | ) | const |
Returns the number of ptex faces in the mesh.
|
inline |
Returns the number of vertices at a given level of refinement.
Definition at line 208 of file topologyRefiner.h.
int GetNumVerticesTotal | ( | ) | const |
Returns the total number of vertices in all levels.
int GetPtexIndex | ( | Index | f | ) | const |
Returns the ptex face index given a coarse face 'f' or -1.
|
inlineprotected |
Definition at line 397 of file topologyRefiner.h.
|
inline |
Returns the subdivision options.
Definition at line 69 of file topologyRefiner.h.
|
inline |
Returns the subdivision scheme.
Definition at line 66 of file topologyRefiner.h.
Returns the child vertex of vertex 'v' at 'level'.
Definition at line 351 of file topologyRefiner.h.
|
inline |
Returns the edges incident to 'vertex' at 'level'.
Definition at line 274 of file topologyRefiner.h.
|
inline |
Returns the faces incident to 'vertex' at 'level'.
Definition at line 269 of file topologyRefiner.h.
|
inline |
Returns the subdivision rule of a given vertex (at 'level' of refinement)
Definition at line 238 of file topologyRefiner.h.
|
inline |
Returns the sharpness of a given vertex (at 'level' of refinement)
Definition at line 233 of file topologyRefiner.h.
|
inline |
Apply vertex and varying interpolation weights to a primvar buffer.
The destination buffer must allocate an array of data for all the refined vertices (at least GetNumVerticesTotal()-GetNumVertices(0))
src | Source primvar buffer (control vertex data) |
dst | Destination primvar buffer (refined vertex data) |
Definition at line 480 of file topologyRefiner.h.
|
inline |
Apply vertex and varying interpolation weights to a primvar buffer for a single level level of refinement.
The destination buffer must allocate an array of data for all the refined vertices (at least GetNumVertices(level))
level | The refinement level |
src | Source primvar buffer (control vertex data) |
dst | Destination primvar buffer (refined vertex data) |
Definition at line 495 of file topologyRefiner.h.
|
inline |
Apply face-varying interpolation weights to a primvar buffer.
Definition at line 791 of file topologyRefiner.h.
|
inline |
Definition at line 806 of file topologyRefiner.h.
|
inline |
Apply only varying interpolation weights to a primvar buffer.
This method can be a useful alternative if the varying primvar data does not need to be re-computed over time.
The destination buffer must allocate an array of data for all the refined vertices (at least GetNumVerticesTotal()-GetNumVertices(0))
src | Source primvar buffer (control vertex data) |
dst | Destination primvar buffer (refined vertex data) |
Definition at line 679 of file topologyRefiner.h.
|
inline |
Apply only varying interpolation weights to a primvar buffer for a single level level of refinement.
This method can be a useful alternative if the varying primvar data does not need to be re-computed over time.
The destination buffer must allocate an array of data for all the refined vertices (at least GetNumVertices(level))
level | The refinement level |
src | Source primvar buffer (control vertex data) |
dst | Destination primvar buffer (refined vertex data) |
Definition at line 694 of file topologyRefiner.h.
|
inline |
Returns true if uniform subdivision has been applied.
Definition at line 72 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 440 of file topologyRefiner.h.
|
inline |
Prints topology information to console.
Definition at line 378 of file topologyRefiner.h.
void RefineAdaptive | ( | int | maxLevel, |
bool | fullTopologyInLastLevel = false |
||
) |
Feature Adaptive topology refinement.
maxLevel | Highest level of subdivision refinement |
fullTopologyInLastLevel | Skip secondary topological relationships at the highest level of refinement. |
void RefineUniform | ( | int | maxLevel, |
bool | fullTopologyInLastLevel = false |
||
) |
Refine the topology uniformly.
maxLevel | Highest level of subdivision refinement |
fullTopologyInLastLevel | Skip secondary topological relationships at the highest level of refinement. |
|
inlineprotected |
Definition at line 417 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 416 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 415 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 414 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 423 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 419 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 422 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 418 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 409 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 405 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 404 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 408 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 411 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 410 of file topologyRefiner.h.
|
inlineprotected |
Definition at line 406 of file topologyRefiner.h.
void Unrefine | ( | ) |
Unrefine the topology (keep control cage)
|
inline |
Returns true if the topology of 'level' is valid.
Definition at line 373 of file topologyRefiner.h.
|
inline |
Returns the local edge indices of vertex 'vert' at 'level'.
Definition at line 284 of file topologyRefiner.h.
|
inline |
Returns the local face indices of vertex 'vert' at 'level'.
Definition at line 279 of file topologyRefiner.h.
|
friend |
Definition at line 391 of file topologyRefiner.h.
|
friend |
Definition at line 389 of file topologyRefiner.h.
|
friend |
Definition at line 390 of file topologyRefiner.h.