opensubdiv/far/patchTable.h Source File

patchTable.h
Go to the documentation of this file.
1 //
2 // Copyright 2013 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24
25 #ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H
26 #define OPENSUBDIV3_FAR_PATCH_TABLE_H
27
28 #include "../version.h"
29
30 #include "../far/patchDescriptor.h"
31 #include "../far/patchParam.h"
32 #include "../far/stencilTable.h"
33
34 #include "../sdc/options.h"
35
36 #include <vector>
37
38 namespace OpenSubdiv {
39 namespace OPENSUBDIV_VERSION {
40
41 namespace Far {
42
55 class PatchTable {
56
57 public:
58
60 class PatchHandle {
61 // XXXX manuelk members will eventually be made private
62 public:
63
64 friend class PatchTable;
65 friend class PatchMap;
66
67 Index arrayIndex, // Array index of the patch
68 patchIndex, // Absolute Index of the patch
69 vertIndex; // Relative offset to the first CV of the patch in array
70 };
71
72 public:
73
75 PatchTable(PatchTable const & src);
76
78 ~PatchTable();
79
81 bool IsFeatureAdaptive() const;
82
84 int GetNumControlVerticesTotal() const {
85 return (int)_patchVerts.size();
86 }
87
89 int GetNumPatchesTotal() const;
90
92 int GetMaxValence() const { return _maxValence; }
93
95 int GetNumPtexFaces() const { return _numPtexFaces; }
96
97
99
107 PatchDescriptor GetPatchDescriptor(PatchHandle const & handle) const;
108
110 ConstIndexArray GetPatchVertices(PatchHandle const & handle) const;
111
113 PatchParam GetPatchParam(PatchHandle const & handle) const;
114
116 ConstIndexArray GetPatchVertices(int array, int patch) const;
117
119 PatchParam GetPatchParam(int array, int patch) const;
121
122
124
132 int GetNumPatchArrays() const;
133
135 int GetNumPatches(int array) const;
136
138 int GetNumControlVertices(int array) const;
139
141 PatchDescriptor GetPatchArrayDescriptor(int array) const;
142
144 ConstIndexArray GetPatchArrayVertices(int array) const;
145
147 ConstPatchParamArray const GetPatchParams(int array) const;
149
150
152
161 int GetNumLocalPoints() const;
162
172 template <class T> void
173 ComputeLocalPointValues(T const *src, T *dst) const;
174
176 StencilTable const *GetLocalPointStencilTable() const {
177 return _localPointStencils;
178 }
179
181 int GetNumLocalPointsVarying() const;
182
192 template <class T> void
193 ComputeLocalPointValuesVarying(T const *src, T *dst) const;
194
196 StencilTable const *GetLocalPointVaryingStencilTable() const {
197 return _localPointVaryingStencils;
198 }
199
201 int GetNumLocalPointsFaceVarying(int channel = 0) const;
202
214 template <class T> void
215 ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const;
216
218 StencilTable const *GetLocalPointFaceVaryingStencilTable(int channel = 0) const {
219 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
220 return _localPointFaceVaryingStencils[channel];
221 }
222 return NULL;
223 }
225
226
228
233 typedef Vtr::ConstArray<unsigned int> ConstQuadOffsetsArray;
234
236 ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const & handle) const;
237
238 typedef std::vector<Index> VertexValenceTable;
239
241 VertexValenceTable const & GetVertexValenceTable() const {
242 return _vertexValenceTable;
243 }
245
246
248
257 float GetSingleCreasePatchSharpnessValue(PatchHandle const & handle) const;
258
261 float GetSingleCreasePatchSharpnessValue(int array, int patch) const;
263
264
266
274 PatchDescriptor GetVaryingPatchDescriptor() const;
275
277 ConstIndexArray GetPatchVaryingVertices(PatchHandle const & handle) const;
278
280 ConstIndexArray GetPatchVaryingVertices(int array, int patch) const;
281
283 ConstIndexArray GetPatchArrayVaryingVertices(int array) const;
284
286 ConstIndexArray GetVaryingVertices() const;
288
289
291
299 int GetNumFVarChannels() const;
300
302 PatchDescriptor GetFVarPatchDescriptor(int channel = 0) const;
303
305 ConstIndexArray GetPatchFVarValues(PatchHandle const & handle, int channel = 0) const;
306
308 ConstIndexArray GetPatchFVarValues(int array, int patch, int channel = 0) const;
309
311 ConstIndexArray GetPatchArrayFVarValues(int array, int channel = 0) const;
312
314 ConstIndexArray GetFVarValues(int channel = 0) const;
315
317 PatchParam GetPatchFVarPatchParam(PatchHandle const & handle, int channel = 0) const;
318
320 PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const;
321
323 ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel = 0) const;
324
326 ConstPatchParamArray GetFVarPatchParams(int channel = 0) const;
327
329 Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel = 0) const;
331
332
334
340 typedef std::vector<Index> PatchVertsTable;
341
343 PatchVertsTable const & GetPatchControlVerticesTable() const { return _patchVerts; }
344
346 PatchParamTable const & GetPatchParamTable() const { return _paramTable; }
347
349 std::vector<Index> const &GetSharpnessIndexTable() const { return _sharpnessIndices; }
350
352 std::vector<float> const &GetSharpnessValues() const { return _sharpnessValues; }
353
354 typedef std::vector<unsigned int> QuadOffsetsTable;
355
357 QuadOffsetsTable const & GetQuadOffsetsTable() const {
358 return _quadOffsetsTable;
359 }
361
363 void print() const;
364
365 public:
366
368
393 void EvaluateBasis(PatchHandle const & handle, float u, float v,
394 float wP[], float wDu[] = 0, float wDv[] = 0,
395 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
396
419 void EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
420 float wP[], float wDu[] = 0, float wDv[] = 0,
421 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
422
447 void EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
448 float wP[], float wDu[] = 0, float wDv[] = 0,
449 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0,
450 int channel = 0) const;
452
453 protected:
454
455 friend class PatchTableFactory;
456
457 // Factory constructor
458 PatchTable(int maxvalence);
459
460 Index getPatchIndex(int array, int patch) const;
461
462 PatchParamArray getPatchParams(int arrayIndex);
463
464 Index * getSharpnessIndices(Index arrayIndex);
465 float * getSharpnessValues(Index arrayIndex);
466
467 private:
468
469 //
470 // Patch arrays
471 //
472
473 struct PatchArray;
474 typedef std::vector<PatchArray> PatchArrayVector;
475
476 PatchArray & getPatchArray(Index arrayIndex);
477 PatchArray const & getPatchArray(Index arrayIndex) const;
478
479 void reservePatchArrays(int numPatchArrays);
480 void pushPatchArray(PatchDescriptor desc, int npatches,
481 Index * vidx, Index * pidx, Index * qoidx=0);
482
483 IndexArray getPatchArrayVertices(int arrayIndex);
484
485 Index findPatchArray(PatchDescriptor desc);
486
487
488 //
489 // Varying patch arrays
490 //
491 IndexArray getPatchArrayVaryingVertices(int arrayIndex);
492
493 void allocateVaryingVertices(
494 PatchDescriptor desc, int numPatches);
495 void populateVaryingVertices();
496
497 //
498 // Face-varying patch channels
499 //
500
501 struct FVarPatchChannel;
502 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
503
504 FVarPatchChannel & getFVarPatchChannel(int channel);
505 FVarPatchChannel const & getFVarPatchChannel(int channel) const;
506
507 void allocateFVarPatchChannels(int numChannels);
508 void allocateFVarPatchChannelValues(
509 PatchDescriptor desc, int numPatches, int channel);
510
511 // deprecated
512 void setFVarPatchChannelLinearInterpolation(
513 Sdc::Options::FVarLinearInterpolation interpolation, int channel);
514
515 IndexArray getFVarValues(int channel);
516 ConstIndexArray getPatchFVarValues(int patch, int channel) const;
517
518 PatchParamArray getFVarPatchParams(int channel);
519 PatchParam getPatchFVarPatchParam(int patch, int channel) const;
520
521 private:
522
523 //
524 // Topology
525 //
526
527 int _maxValence, // highest vertex valence found in the mesh
528 _numPtexFaces; // total number of ptex faces
529
530 PatchArrayVector _patchArrays; // Vector of descriptors for arrays of patches
531
532 std::vector<Index> _patchVerts; // Indices of the control vertices of the patches
533
534 PatchParamTable _paramTable; // PatchParam bitfields (one per patch)
535
536 //
537 // Extraordinary vertex closed-form evaluation / endcap basis conversion
538 //
539 // XXXtakahito: these data will probably be replaced with mask coefficient or something
540 // SchemeWorker populates.
541 //
542 QuadOffsetsTable _quadOffsetsTable; // Quad offsets (for Gregory patches)
543 VertexValenceTable _vertexValenceTable; // Vertex valence table (for Gregory patches)
544 StencilTable const * _localPointStencils; // endcap basis conversion stencils
545 StencilTable const * _localPointVaryingStencils; // endcap varying stencils (for convenience)
546
547 //
548 // Varying data
549 //
550
551 PatchDescriptor _varyingDesc;
552
553 std::vector<Index> _varyingVerts;
554
555 //
556 // Face-varying data
557 //
558
559 FVarPatchChannelVector _fvarChannels;
560
561 std::vector<StencilTable const *> _localPointFaceVaryingStencils;
562
563 //
564 // 'single-crease' patch sharpness tables
565 //
566
567 std::vector<Index> _sharpnessIndices; // Indices of single-crease sharpness (one per patch)
568 std::vector<float> _sharpnessValues; // Sharpness values.
569 };
570
571 template <class T>
572 inline void
573 PatchTable::ComputeLocalPointValues(T const *src, T *dst) const {
574 if (_localPointStencils) {
575 _localPointStencils->UpdateValues(src, dst);
576 }
577 }
578
579 template <class T>
580 inline void
581 PatchTable::ComputeLocalPointValuesVarying(T const *src, T *dst) const {
582 if (_localPointVaryingStencils) {
583 _localPointVaryingStencils->UpdateValues(src, dst);
584 }
585 }
586
587 template <class T>
588 inline void
589 PatchTable::ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel) const {
590 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
591 if (_localPointFaceVaryingStencils[channel]) {
592 _localPointFaceVaryingStencils[channel]->UpdateValues(src, dst);
593 }
594 }
595 }
596
597
598 } // end namespace Far
599
600 } // end namespace OPENSUBDIV_VERSION
601 using namespace OPENSUBDIV_VERSION;
602
603 } // end namespace OpenSubdiv
604
605 #endif /* OPENSUBDIV3_FAR_PATCH_TABLE */
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::EvaluateBasisFaceVarying
void EvaluateBasisFaceVarying(PatchHandle const &handle, float u, float v, float wP[], float wDu[]=0, float wDv[]=0, float wDuu[]=0, float wDuv[]=0, float wDvv[]=0, int channel=0) const
Evaluate basis functions for a face-varying value and derivatives at a given (u,v) parametric locatio...
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::getSharpnessValues
float * getSharpnessValues(Index arrayIndex)
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchVaryingVertices
ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const
Returns the varying vertex indices for a given patch.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumLocalPoints
int GetNumLocalPoints() const
Returns the number of local vertex points.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumLocalPointsVarying
int GetNumLocalPointsVarying() const
Returns the number of local varying points.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchParam
PatchParam GetPatchParam(PatchHandle const &handle) const
Returns a PatchParam for the patch identified by handle.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchHandle::patchIndex
Index patchIndex
Definition: patchTable.h:67
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable
Container for arrays of parametric patches.
Definition: patchTable.h:55
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetSharpnessValues
std::vector< float > const & GetSharpnessValues() const
Returns sharpness values table.
Definition: patchTable.h:352
OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTable
Table of subdivision stencils.
Definition: stencilTable.h:125
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetLocalPointFaceVaryingStencilTable
StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
Returns the stencil table to compute local point face-varying values.
Definition: patchTable.h:218
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::EvaluateBasis
void EvaluateBasis(PatchHandle const &handle, float u, float v, float wP[], float wDu[]=0, float wDv[]=0, float wDuu[]=0, float wDuv[]=0, float wDvv[]=0) const
Evaluate basis functions for position and derivatives at a given (u,v) parametric location of a patch...
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetVertexValenceTable
VertexValenceTable const & GetVertexValenceTable() const
Returns the &#39;VertexValences&#39; table (vertex neighborhoods table)
Definition: patchTable.h:241
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::ComputeLocalPointValuesFaceVarying
void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) const
Updates local point face-varying values.
Definition: patchTable.h:589
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetFVarPatchDescriptor
PatchDescriptor GetFVarPatchDescriptor(int channel=0) const
Returns the patch descriptor for channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchFVarValues
ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) const
Returns the value indices for a given patch in channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetFVarValues
ConstIndexArray GetFVarValues(int channel=0) const
Returns an array of value indices for the patches in channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumControlVerticesTotal
int GetNumControlVerticesTotal() const
Returns the total number of control vertex indices in the table.
Definition: patchTable.h:84
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::~PatchTable
~PatchTable()
Destructor.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::QuadOffsetsTable
std::vector< unsigned int > QuadOffsetsTable
Definition: patchTable.h:354
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchArrayVaryingVertices
ConstIndexArray GetPatchArrayVaryingVertices(int array) const
Returns the varying vertex indices for the patches in array.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetMaxValence
int GetMaxValence() const
Returns max vertex valence.
Definition: patchTable.h:92
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchDescriptor
PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const
Returns the PatchDescriptor for the patch identified by handle.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetVaryingPatchDescriptor
PatchDescriptor GetVaryingPatchDescriptor() const
Returns the varying patch descriptor.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumControlVertices
int GetNumControlVertices(int array) const
Returns the number of control vertices in array.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumPatchArrays
int GetNumPatchArrays() const
Returns the number of patch arrays in the table.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumFVarChannels
int GetNumFVarChannels() const
Returns the number of face-varying channels.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetVaryingVertices
ConstIndexArray GetVaryingVertices() const
Returns an array of varying vertex indices for the patches.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetFVarChannelLinearInterpolation
Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel=0) const
Deprecated.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchFVarPatchParam
PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) const
Returns the value indices for a given patch in channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::ConstQuadOffsetsArray
Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
Definition: patchTable.h:233
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetQuadOffsetsTable
QuadOffsetsTable const & GetQuadOffsetsTable() const
Returns the quad-offsets table.
Definition: patchTable.h:357
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::print
void print() const
debug helper
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTableFactory
Factory for constructing a PatchTable from a TopologyRefiner.
Definition: patchTableFactory.h:43
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumPtexFaces
int GetNumPtexFaces() const
Returns the total number of ptex faces in the mesh.
Definition: patchTable.h:95
OpenSubdiv::OPENSUBDIV_VERSION::Vtr::Array
Definition: array.h:105
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchParam
Patch parameterization.
Definition: patchParam.h:152
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::ComputeLocalPointValues
void ComputeLocalPointValues(T const *src, T *dst) const
Updates local point vertex values.
Definition: patchTable.h:573
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchMap
An quadtree-based map connecting coarse faces to their sub-patches.
Definition: patchMap.h:49
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchArrayVector
std::vector< PatchArray > PatchArrayVector
Definition: types.h:98
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchHandle::arrayIndex
Index arrayIndex
Definition: patchTable.h:67
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchVertices
ConstIndexArray GetPatchVertices(PatchHandle const &handle) const
Returns the control vertex indices for the patch identified by handle.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchHandle
Handle that can be used as unique patch identifier within PatchTable.
Definition: patchTable.h:60
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchArrayVertices
ConstIndexArray GetPatchArrayVertices(int array) const
Returns the control vertex indices for the patches in array.
OpenSubdiv::OPENSUBDIV_VERSION::Vtr::ConstArray< Index >
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::ComputeLocalPointValuesVarying
void ComputeLocalPointValuesVarying(T const *src, T *dst) const
Updates local point varying values.
Definition: patchTable.h:581
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::getPatchParams
PatchParamArray getPatchParams(int arrayIndex)
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::EvaluateBasisVarying
void EvaluateBasisVarying(PatchHandle const &handle, float u, float v, float wP[], float wDu[]=0, float wDv[]=0, float wDuu[]=0, float wDuv[]=0, float wDvv[]=0) const
Evaluate basis functions for a varying value and derivatives at a given (u,v) parametric location of ...
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchParams
ConstPatchParamArray const GetPatchParams(int array) const
Returns the PatchParams for the patches in array.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchQuadOffsets
ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const
Returns the &#39;QuadOffsets&#39; for the Gregory patch identified by handle.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::getSharpnessIndices
Index * getSharpnessIndices(Index arrayIndex)
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetSharpnessIndexTable
std::vector< Index > const & GetSharpnessIndexTable() const
Returns a sharpness index table for each patch (if exists)
Definition: patchTable.h:349
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumLocalPointsFaceVarying
int GetNumLocalPointsFaceVarying(int channel=0) const
Returns the number of local face-varying points for channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetSingleCreasePatchSharpnessValue
float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const
Returns the crease sharpness for the patch identified by handle if it is a single-crease patch...
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchControlVerticesTable
PatchVertsTable const & GetPatchControlVerticesTable() const
Get the table of patch control vertices.
Definition: patchTable.h:343
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::IsFeatureAdaptive
bool IsFeatureAdaptive() const
True if the patches are of feature adaptive types.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchHandle::vertIndex
Index vertIndex
Definition: patchTable.h:67
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchParamTable
PatchParamTable const & GetPatchParamTable() const
Returns the PatchParamTable (PatchParams order matches patch array sorting)
Definition: patchTable.h:346
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::getPatchIndex
Index getPatchIndex(int array, int patch) const
OpenSubdiv::OPENSUBDIV_VERSION::Far::Index
Vtr::Index Index
Definition: types.h:41
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchParamTable
std::vector< PatchParam > PatchParamTable
Definition: patchParam.h:234
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchArrayDescriptor
PatchDescriptor GetPatchArrayDescriptor(int array) const
Returns the PatchDescriptor for the patches in array.
OpenSubdiv
Definition: error.h:30
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchVertsTable
std::vector< Index > PatchVertsTable
Definition: patchTable.h:340
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchArrayFVarValues
ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const
Returns the value indices for the patches in array in channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::PatchHandle::PatchTable
friend class PatchTable
Definition: patchTable.h:64
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetFVarPatchParams
ConstPatchParamArray GetFVarPatchParams(int channel=0) const
Returns an array of face-varying patch param for channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumPatchesTotal
int GetNumPatchesTotal() const
Returns the total number of patches stored in the table.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::VertexValenceTable
std::vector< Index > VertexValenceTable
Definition: patchTable.h:238
OpenSubdiv::OPENSUBDIV_VERSION::Sdc::Options::FVarLinearInterpolation
FVarLinearInterpolation
Definition: options.h:58
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetLocalPointVaryingStencilTable
StencilTable const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
Definition: patchTable.h:196
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetPatchArrayFVarPatchParams
ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) const
Returns the face-varying for a given patch in array in channel.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetNumPatches
int GetNumPatches(int array) const
Returns the number of patches in array.
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable::GetLocalPointStencilTable
StencilTable const * GetLocalPointStencilTable() const
Returns the stencil table to compute local point vertex values.
Definition: patchTable.h:176
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchDescriptor
Describes the type of a patch.
Definition: patchDescriptor.h:50