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

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 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
 

Detailed Description

Interface to perform limit surface evaluation.

Definition at line 720 of file GT_OSD3.h.

Member Typedef Documentation

using GT_OSDLimitSurface::PatchMap = OpenSubdiv::Far::PatchMap

Definition at line 726 of file GT_OSD3.h.

using GT_OSDLimitSurface::PatchTable = OpenSubdiv::Far::PatchTable

Definition at line 725 of file GT_OSD3.h.

using GT_OSDLimitSurface::PatchTableFactory = OpenSubdiv::Far::PatchTableFactory

Definition at line 727 of file GT_OSD3.h.

using GT_OSDLimitSurface::PtexIndices = OpenSubdiv::Far::PtexIndices

Definition at line 724 of file GT_OSD3.h.

using GT_OSDLimitSurface::TopologyRefiner = OpenSubdiv::Far::TopologyRefiner

Definition at line 723 of file GT_OSD3.h.

Constructor & Destructor Documentation

GT_OSDLimitSurface::GT_OSDLimitSurface ( const GT_OSDTopology topology,
const GT_OSDPatchTableOptions options,
const GT_OSDPatchTable patchTable,
const GT_PrimPolygonMesh mesh 
)
GT_OSDLimitSurface::~GT_OSDLimitSurface ( )

Member Function Documentation

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
GT_Size GT_OSDLimitSurface::faceFromPtex ( int  ptex_id,
int offset 
) 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::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::numPtexPatches ( const TopologyRefiner refiner,
GT_Size  face_index 
) const

Return the number of ptex patches for the given coarse face

int GT_OSDLimitSurface::numPtexPatches ( const GT_OSDTopology top,
GT_Size  face_index 
) const
inline

Return the number of ptex patches for the given coarse face

Definition at line 750 of file GT_OSD3.h.

int GT_OSDLimitSurface::ptexFaceCount ( ) const

Return the number of patches.

int GT_OSDLimitSurface::ptexFromFace ( GT_Size  face_index) const

Return the first ptex patch associated with the given coarse face.


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