|
HDK
|
Interface to perform limit surface evaluation. More...
#include <GT_OSD3.h>
Public Types | |
| using | TopologyRefiner = OpenSubdiv::Far::TopologyRefiner |
| using | PtexIndices = OpenSubdiv::Far::PtexIndices |
| using | PatchTable = OpenSubdiv::Far::PatchTable |
| using | PatchMap = OpenSubdiv::Far::PatchMap |
| using | PatchTableFactory = OpenSubdiv::Far::PatchTableFactory |
| using | AttribId = GT_OSDAttributes::AttribId |
| using | VertexStorage = GT_OSDAttributes::VertexStorage |
| using | Vertex = GT_OSDAttributes::Vertex |
Public Member Functions | |
| GT_OSDLimitSurface (const GT_OSDTopology &topology, const GT_OSDPatchTableOptions &options, const GT_OSDPatchTable &patchTable, const GT_PrimPolygonMesh &mesh) | |
| ~GT_OSDLimitSurface () | |
| void | dump () const |
| void | dump (UT_JSONWriter &w) const |
| int | ptexFaceCount () const |
| Return the number of patches. More... | |
| int | ptexFromFace (GT_Size face_index) const |
| Return the first ptex patch associated with the given coarse face. More... | |
| GT_Size | faceFromPtex (int ptex_id, int &offset) const |
| Return the coarse face associated with the given ptex id. More... | |
| int | limitSurface (GT_DataArrayHandle *result, GT_DataArrayHandle *result_du, GT_DataArrayHandle *result_dv, const GT_OSDAttributes &alist, const AttribId &attrib, int npts, const int32 *faces, const fpreal32 *u, const fpreal32 *v, int uv_stride=1, int seg=0) const |
| int | limitSurfaceFVar (const GT_OSDTopology &topology, GT_DataArrayHandle *result, GT_DataArrayHandle *result_du, GT_DataArrayHandle *result_dv, const GT_OSDAttributes &alist, const AttribId &attrib, int npts, const int32 *faces, const fpreal32 *u, const fpreal32 *v, int uv_stride=1, int seg=0) const |
| Evaluation of face-varying attributes on the limit surface. More... | |
| int | limitSurface (GT_DataArrayHandle *result, GT_DataArrayHandle *result_du, GT_DataArrayHandle *result_dv, GT_DataArrayHandle *result_duu, GT_DataArrayHandle *result_duv, GT_DataArrayHandle *result_dvv, const GT_OSDAttributes &alist, const AttribId &attrib, int npts, const int32 *faces, const fpreal32 *u, const fpreal32 *v, int uv_stride=1, int seg=0) const |
| int | limitSurfaceFVar (const GT_OSDTopology &topology, GT_DataArrayHandle *result, GT_DataArrayHandle *result_du, GT_DataArrayHandle *result_dv, GT_DataArrayHandle *result_duu, GT_DataArrayHandle *result_duv, GT_DataArrayHandle *result_dvv, const GT_OSDAttributes &alist, const AttribId &attrib, int npts, const int32 *faces, const fpreal32 *u, const fpreal32 *v, int uv_stride=1, int seg=0) const |
| Evaluation of face-varying attributes on the limit surface. More... | |
| int | numPtexPatches (const TopologyRefiner &refiner, GT_Size face_index) const |
| int | numPtexPatches (const GT_OSDTopology &top, GT_Size face_index) const |
| bool | coarsePoints (const GT_OSDTopology &topology, GT_Size coarse_face_index, GT_Size *vertices, GT_Size buffer_size) const |
| bool | coarseVertices (const GT_OSDTopology &topology, GT_Size coarse_face_index, GT_Size *vertices, GT_Size buffer_size) const |
| using GT_OSDLimitSurface::PatchMap = OpenSubdiv::Far::PatchMap |
| using GT_OSDLimitSurface::PatchTable = OpenSubdiv::Far::PatchTable |
| using GT_OSDLimitSurface::PatchTableFactory = OpenSubdiv::Far::PatchTableFactory |
| using GT_OSDLimitSurface::PtexIndices = OpenSubdiv::Far::PtexIndices |
| using GT_OSDLimitSurface::TopologyRefiner = OpenSubdiv::Far::TopologyRefiner |
| GT_OSDLimitSurface::GT_OSDLimitSurface | ( | const GT_OSDTopology & | topology, |
| const GT_OSDPatchTableOptions & | options, | ||
| const GT_OSDPatchTable & | patchTable, | ||
| const GT_PrimPolygonMesh & | mesh | ||
| ) |
| GT_OSDLimitSurface::~GT_OSDLimitSurface | ( | ) |
| bool GT_OSDLimitSurface::coarsePoints | ( | const GT_OSDTopology & | topology, |
| GT_Size | coarse_face_index, | ||
| GT_Size * | vertices, | ||
| GT_Size | buffer_size | ||
| ) | const |
Query the points/vertices for a face in the coarse mesh
| bool GT_OSDLimitSurface::coarseVertices | ( | const GT_OSDTopology & | topology, |
| GT_Size | coarse_face_index, | ||
| GT_Size * | vertices, | ||
| GT_Size | buffer_size | ||
| ) | const |
Query the points/vertices for a face in the coarse mesh
| void GT_OSDLimitSurface::dump | ( | ) | const |
| void GT_OSDLimitSurface::dump | ( | UT_JSONWriter & | w | ) | const |
Return the coarse face associated with the given ptex id.
| int GT_OSDLimitSurface::limitSurface | ( | GT_DataArrayHandle * | result, |
| GT_DataArrayHandle * | result_du, | ||
| GT_DataArrayHandle * | result_dv, | ||
| const GT_OSDAttributes & | alist, | ||
| const AttribId & | attrib, | ||
| int | npts, | ||
| const int32 * | faces, | ||
| const fpreal32 * | u, | ||
| const fpreal32 * | v, | ||
| int | uv_stride = 1, |
||
| int | seg = 0 |
||
| ) | const |
Evaluate the limit surface (and derivatives) at a given coordinates. The faces array should have npts entries. The u and v arrays should have also have npts entries. Each u and v coordinate will be offset by uv_stride entries. So, if you have uv's that are interleaved (i.e. [u0 v0 u1 v1 u2 v2 ...]), you can offset the v pointer and set the stride to 2.
Passing a nullptr for any of the results will disable evaluation of that property.
The method returns the tuple size of the attribute evaluated.
| int GT_OSDLimitSurface::limitSurface | ( | GT_DataArrayHandle * | result, |
| GT_DataArrayHandle * | result_du, | ||
| GT_DataArrayHandle * | result_dv, | ||
| GT_DataArrayHandle * | result_duu, | ||
| GT_DataArrayHandle * | result_duv, | ||
| GT_DataArrayHandle * | result_dvv, | ||
| const GT_OSDAttributes & | alist, | ||
| const AttribId & | attrib, | ||
| int | npts, | ||
| const int32 * | faces, | ||
| const fpreal32 * | u, | ||
| const fpreal32 * | v, | ||
| int | uv_stride = 1, |
||
| int | seg = 0 |
||
| ) | const |
Evaluate the limit surface (and derivatives) at the given coordinates. The faces array should have npts entries. The u and v arrays should have also have npts entries. Each u and v coordinate will be offset by uv_stride entries. So, if you have uv's that are interleaved (i.e. [u0 v0 u1 v1 u2 v2 ...]), you can offset the v pointer and set the stride to 2.
All pointers are required in this version.
The method returns the tuple size of the attribute evaluated.
| int GT_OSDLimitSurface::limitSurfaceFVar | ( | const GT_OSDTopology & | topology, |
| GT_DataArrayHandle * | result, | ||
| GT_DataArrayHandle * | result_du, | ||
| GT_DataArrayHandle * | result_dv, | ||
| const GT_OSDAttributes & | alist, | ||
| const AttribId & | attrib, | ||
| int | npts, | ||
| const int32 * | faces, | ||
| const fpreal32 * | u, | ||
| const fpreal32 * | v, | ||
| int | uv_stride = 1, |
||
| int | seg = 0 |
||
| ) | const |
Evaluation of face-varying attributes on the limit surface.
| int GT_OSDLimitSurface::limitSurfaceFVar | ( | const GT_OSDTopology & | topology, |
| GT_DataArrayHandle * | result, | ||
| GT_DataArrayHandle * | result_du, | ||
| GT_DataArrayHandle * | result_dv, | ||
| GT_DataArrayHandle * | result_duu, | ||
| GT_DataArrayHandle * | result_duv, | ||
| GT_DataArrayHandle * | result_dvv, | ||
| const GT_OSDAttributes & | alist, | ||
| const AttribId & | attrib, | ||
| int | npts, | ||
| const int32 * | faces, | ||
| const fpreal32 * | u, | ||
| const fpreal32 * | v, | ||
| int | uv_stride = 1, |
||
| int | seg = 0 |
||
| ) | const |
Evaluation of face-varying attributes on the limit surface.
| int GT_OSDLimitSurface::numPtexPatches | ( | const TopologyRefiner & | refiner, |
| GT_Size | face_index | ||
| ) | const |
Return the number of ptex patches for the given coarse face
|
inline |
| int GT_OSDLimitSurface::ptexFaceCount | ( | ) | const |
Return the number of patches.
Return the first ptex patch associated with the given coarse face.