25 #ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H 26 #define OPENSUBDIV3_FAR_PATCH_TABLE_H 28 #include "../version.h" 30 #include "../far/patchDescriptor.h" 31 #include "../far/patchParam.h" 32 #include "../far/stencilTable.h" 34 #include "../sdc/options.h" 40 namespace OPENSUBDIV_VERSION {
86 return (
int)_patchVerts.size();
172 template <
class T>
void 177 return _localPointStencils;
183 return _localPointVaryingStencils;
203 return _vertexValenceTable;
279 return _quadOffsetsTable;
309 float wP[],
float wDs[],
float wDt[])
const;
339 void reservePatchArrays(
int numPatchArrays);
352 struct FVarPatchChannel;
353 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
355 FVarPatchChannel & getFVarPatchChannel(
int channel);
356 FVarPatchChannel
const & getFVarPatchChannel(
int channel)
const;
358 void allocateFVarPatchChannels(
int numChannels);
359 void allocateFVarPatchChannelValues(
360 int numPatches,
int numVerticesTotal,
int channel);
362 void setFVarPatchChannelLinearInterpolation(
382 PatchArrayVector _patchArrays;
384 std::vector<Index> _patchVerts;
394 QuadOffsetsTable _quadOffsetsTable;
395 VertexValenceTable _vertexValenceTable;
403 FVarPatchChannelVector _fvarChannels;
409 std::vector<Index> _sharpnessIndices;
410 std::vector<float> _sharpnessValues;
416 if (_localPointStencils) {
417 _localPointStencils->UpdateValues(src, dst);
425 using namespace OPENSUBDIV_VERSION;
ConstPatchParamArray const GetPatchParams(int array) const
Returns the PatchParams for the patches in array 'array'.
int GetMaxValence() const
Returns max vertex valence.
int GetNumPatchArrays() const
Returns the number of patch arrays in the table.
Local patch parameterization descriptor.
An quadtree-based map connecting coarse faces to their sub-patches.
float * getSharpnessValues(Index arrayIndex)
Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
StencilTable const * GetLocalPointVaryingStencilTable() const
Returns the varying stencil table for the change of basis patch points.
PatchDescriptor GetPatchArrayDescriptor(int array) const
Returns the PatchDescriptor for the patches in array 'array'.
int GetNumPatchesTotal() const
Returns the total number of patches stored in the table.
std::vector< PatchArray > PatchArrayVector
StencilTable const * GetLocalPointStencilTable() const
Returns the stencil table to get change of basis patch points.
std::vector< PatchParam > PatchParamTable
Handle that can be used as unique patch identifier within PatchTable.
std::vector< Index > const & GetSharpnessIndexTable() const
Returns a sharpness index table for each patch (if exists)
QuadOffsetsTable const & GetQuadOffsetsTable() const
Returns the quad-offsets table.
PatchParam GetPatchParam(PatchHandle const &handle) const
Returns a PatchParam for the patch identified by 'handle'.
Table of subdivision stencils.
Index getPatchIndex(int array, int patch) const
PatchParamTable const & GetPatchParamTable() const
Returns the PatchParamTable (PatchParams order matches patch array sorting)
VertexValenceTable const & GetVertexValenceTable() const
Returns the 'VertexValences' table (vertex neighborhoods table)
float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const
Returns the crease sharpness for the patch identified by 'handle' if it is a single-crease patch...
std::vector< Index > PatchVertsTable
int GetNumPtexFaces() const
Returns the total number of ptex faces in the mesh.
PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const
Returns the PatchDescriptor for the patches in array 'array'.
std::vector< Index > VertexValenceTable
int GetNumPatches(int array) const
Returns the number of patches in patch array 'array'.
void ComputeLocalPointValues(T const *src, T *dst) const
Updates local point values based on the refined values.
ConstIndexArray GetPatchVertices(PatchHandle const &handle) const
Returns the control vertex indices for the patch identified by 'handle'.
std::vector< unsigned int > QuadOffsetsTable
ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) const
Returns the value indices for a given patch in a channel.
Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel=0) const
Returns the interpolation mode for a given channel.
ConstIndexArray GetFVarValues(int channel=0) const
Returns an array of value indices for the patches in a channel.
Describes the type of a patch.
int GetNumControlVerticesTotal() const
Returns the total number of control vertex indices in the table.
int GetNumLocalPoints() const
Returns the number of points of the change of basis patches.
void print() const
debug helper
Container for arrays of parametric patches.
bool IsFeatureAdaptive() const
True if the patches are of feature adaptive types.
void EvaluateBasis(PatchHandle const &handle, float s, float t, float wP[], float wDs[], float wDt[]) const
Evaluate basis functions for position and first derivatives at a given (s,t) parametric location of a...
Index * getSharpnessIndices(Index arrayIndex)
int GetNumControlVertices(int array) const
Returns the number of control vertices in patch array 'array'.
PatchParamArray getPatchParams(int arrayIndex)
std::vector< float > const & GetSharpnessValues() const
Returns sharpness values table.
int GetNumFVarChannels() const
Returns the number of face-varying channels.
PatchVertsTable const & GetPatchControlVerticesTable() const
Get the table of patch control vertices.
ConstIndexArray GetPatchArrayVertices(int array) const
Returns the control vertex indices for the patches in array 'array'.
ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const
Returns the 'QuadOffsets' for the Gregory patch identified by 'handle'.