OpenSubdiv
Loading...
Searching...
No Matches
patchTable.h
Go to the documentation of this file.
1//
2// Copyright 2013 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://opensubdiv.org/license.
6//
7
8#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H
9#define OPENSUBDIV3_FAR_PATCH_TABLE_H
10
11#include "../version.h"
12
14#include "../far/patchParam.h"
15#include "../far/stencilTable.h"
16
17#include "../sdc/options.h"
18
19#include <vector>
20
21namespace OpenSubdiv {
22namespace OPENSUBDIV_VERSION {
23
24namespace Far {
25
39
40public:
41
44 // XXXX manuelk members will eventually be made private
45 public:
46
47 friend class PatchTable;
48 friend class PatchMap;
49
50 Index arrayIndex, // Array index of the patch
51 patchIndex, // Absolute Index of the patch
52 vertIndex; // Relative offset to the first CV of the patch in array
53 };
54
55public:
56
58 PatchTable(PatchTable const & src);
59
62
64 bool IsFeatureAdaptive() const;
65
68 return (int)_patchVerts.size();
69 }
70
72 int GetNumPatchesTotal() const;
73
75 int GetMaxValence() const { return _maxValence; }
76
78 int GetNumPtexFaces() const { return _numPtexFaces; }
79
80
82
88
91
94
96 PatchParam GetPatchParam(PatchHandle const & handle) const;
97
99 ConstIndexArray GetPatchVertices(int array, int patch) const;
100
102 PatchParam GetPatchParam(int array, int patch) const;
104
105
107
113
115 int GetNumPatchArrays() const;
116
118 int GetNumPatches(int array) const;
119
121 int GetNumControlVertices(int array) const;
122
125
128
130 ConstPatchParamArray const GetPatchParams(int array) const;
132
133
135
142
144 int GetNumLocalPoints() const;
145
148
150 template <typename REAL>
152
155 template <typename REAL> bool LocalPointStencilPrecisionMatchesType() const;
156
169 template <class T> void
170 ComputeLocalPointValues(T const *src, T *dst) const;
171
172
175
178
180 template <typename REAL>
182
185 template <typename REAL> bool LocalPointVaryingStencilPrecisionMatchesType() const;
186
199 template <class T> void
200 ComputeLocalPointValuesVarying(T const *src, T *dst) const;
201
202
204 int GetNumLocalPointsFaceVarying(int channel = 0) const;
205
207 StencilTable const *GetLocalPointFaceVaryingStencilTable(int channel = 0) const;
208
210 template <typename REAL>
212
215 template <typename REAL> bool LocalPointFaceVaryingStencilPrecisionMatchesType() const;
216
231 template <class T> void
232 ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const;
234
235
237
238
243
246
247 typedef std::vector<Index> VertexValenceTable;
248
251 return _vertexValenceTable;
252 }
254
255
257
263
267
270 float GetSingleCreasePatchSharpnessValue(int array, int patch) const;
272
273
275
281
284
287
289 ConstIndexArray GetPatchVaryingVertices(int array, int patch) const;
290
293
297
298
300
306
309
312
315
318
320 ConstIndexArray GetPatchFVarValues(PatchHandle const & handle, int channel = 0) const;
321
323 ConstIndexArray GetPatchFVarValues(int array, int patch, int channel = 0) const;
324
326 ConstIndexArray GetPatchArrayFVarValues(int array, int channel = 0) const;
327
329 ConstIndexArray GetFVarValues(int channel = 0) const;
330
332 int GetFVarValueStride(int channel = 0) const;
333
335 PatchParam GetPatchFVarPatchParam(PatchHandle const & handle, int channel = 0) const;
336
338 PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const;
339
341 ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel = 0) const;
342
345
349
350
352
357
358 typedef std::vector<Index> PatchVertsTable;
359
361 PatchVertsTable const & GetPatchControlVerticesTable() const { return _patchVerts; }
362
364 PatchParamTable const & GetPatchParamTable() const { return _paramTable; }
365
367 std::vector<Index> const &GetSharpnessIndexTable() const { return _sharpnessIndices; }
368
370 std::vector<float> const &GetSharpnessValues() const { return _sharpnessValues; }
371
372 typedef std::vector<unsigned int> QuadOffsetsTable;
373
376 return _quadOffsetsTable;
377 }
379
381 void print() const;
382
383public:
384
386
388
411 template <typename REAL>
412 void EvaluateBasis(PatchHandle const & handle, REAL u, REAL v,
413 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
414 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
415
418 void EvaluateBasis(PatchHandle const & handle, float u, float v,
419 float wP[], float wDu[] = 0, float wDv[] = 0,
420 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
421
424 void EvaluateBasis(PatchHandle const & handle, double u, double v,
425 double wP[], double wDu[] = 0, double wDv[] = 0,
426 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
427
450 template <typename REAL>
451 void EvaluateBasisVarying(PatchHandle const & handle, REAL u, REAL v,
452 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
453 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0) const;
454
457 void EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
458 float wP[], float wDu[] = 0, float wDv[] = 0,
459 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0) const;
460
463 void EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
464 double wP[], double wDu[] = 0, double wDv[] = 0,
465 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0) const;
466
491 template <typename REAL>
492 void EvaluateBasisFaceVarying(PatchHandle const & handle, REAL u, REAL v,
493 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
494 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0,
495 int channel = 0) const;
496
499 void EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
500 float wP[], float wDu[] = 0, float wDv[] = 0,
501 float wDuu[] = 0, float wDuv[] = 0, float wDvv[] = 0,
502 int channel = 0) const;
503
506 void EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
507 double wP[], double wDu[] = 0, double wDv[] = 0,
508 double wDuu[] = 0, double wDuv[] = 0, double wDvv[] = 0,
509 int channel = 0) const;
511
512protected:
513
514 friend class PatchTableBuilder;
515
516 // Factory constructor
517 PatchTable(int maxvalence);
518
519 Index getPatchIndex(int array, int patch) const;
520
522
524 float * getSharpnessValues(Index arrayIndex);
525
526private:
527
528 //
529 // Patch arrays
530 //
531 struct PatchArray {
532 PatchArray(PatchDescriptor d, int np, Index v, Index p, Index qo) :
533 desc(d), numPatches(np), vertIndex(v),
534 patchIndex(p), quadOffsetIndex (qo) { }
535
536 void print() const;
537
538 PatchDescriptor desc; // type of patches in the array
539
540 int numPatches; // number of patches in the array
541
542 Index vertIndex, // index to the first control vertex
543 patchIndex, // absolute index of the first patch in the array
544 quadOffsetIndex; // index of the first quad offset entry
545 };
546
547 typedef std::vector<PatchArray> PatchArrayVector;
548
549 PatchArray & getPatchArray(Index arrayIndex);
550 PatchArray const & getPatchArray(Index arrayIndex) const;
551
552 void reservePatchArrays(int numPatchArrays);
553 void pushPatchArray(PatchDescriptor desc, int npatches,
554 Index * vidx, Index * pidx, Index * qoidx=0);
555
556 IndexArray getPatchArrayVertices(int arrayIndex);
557
558 Index findPatchArray(PatchDescriptor desc);
559
560
561 //
562 // Varying patch arrays
563 //
564 IndexArray getPatchArrayVaryingVertices(int arrayIndex);
565
566 void allocateVaryingVertices(
567 PatchDescriptor desc, int numPatches);
568 void populateVaryingVertices();
569
570 //
571 // Face-varying patch channels
572 //
573
574 //
575 // FVarPatchChannel
576 //
577 // Stores a record for each patch in the primitive :
578 //
579 // - Each patch in the PatchTable has a corresponding patch in each
580 // face-varying patch channel. Patch vertex indices are sorted in the same
581 // patch-type order as PatchTable::PTables. Face-varying data for a patch
582 // can therefore be quickly accessed by using the patch primitive ID as
583 // index into patchValueOffsets to locate the face-varying control vertex
584 // indices.
585 //
586 // - Face-varying channels can have a different interpolation modes
587 //
588 // - Unlike "vertex" patches, there are no transition masks required
589 // for face-varying patches.
590 //
591 // - Face-varying patches still require boundary edge masks.
592 //
593 // - currently most patches with sharp boundaries but smooth interiors have
594 // to be isolated to level 10 : we need a special type of bicubic patch
595 // similar to single-crease to resolve this condition without requiring
596 // isolation if possible
597 //
598 struct FVarPatchChannel {
600
601 PatchDescriptor regDesc;
602 PatchDescriptor irregDesc;
603
604 int stride;
605
606 std::vector<Index> patchValues;
607 std::vector<PatchParam> patchParam;
608 };
609 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
610
611 FVarPatchChannel & getFVarPatchChannel(int channel);
612 FVarPatchChannel const & getFVarPatchChannel(int channel) const;
613
614 void allocateFVarPatchChannels(int numChannels);
615 void allocateFVarPatchChannelValues(
616 PatchDescriptor regDesc, PatchDescriptor irregDesc,
617 int numPatches, int channel);
618
619 // deprecated
620 void setFVarPatchChannelLinearInterpolation(
621 Sdc::Options::FVarLinearInterpolation interpolation, int channel);
622
623 IndexArray getFVarValues(int channel);
624 ConstIndexArray getPatchFVarValues(int patch, int channel) const;
625
626 PatchParamArray getFVarPatchParams(int channel);
627 PatchParam getPatchFVarPatchParam(int patch, int channel) const;
628
629private:
630 //
631 // Simple private class to hold stencil table pointers of varying precision,
632 // where the discriminant of the precision is external.
633 //
634 // NOTE that this is a simple pointer container and NOT a smart pointer that
635 // manages the ownership of the object referred to by it.
636 //
637 class StencilTablePtr {
638 private:
639 typedef StencilTableReal<float> float_type;
640 typedef StencilTableReal<double> double_type;
641
642 union {
643 float_type * _fPtr;
644 double_type * _dPtr;
645 };
646
647 public:
648 StencilTablePtr() { _fPtr = 0; }
649 StencilTablePtr(float_type * ptr) { _fPtr = ptr; }
650 StencilTablePtr(double_type * ptr) { _dPtr = ptr; }
651
652 operator bool() const { return _fPtr != 0; }
653
654 void Set() { _fPtr = 0; }
655 void Set(float_type * ptr) { _fPtr = ptr; }
656 void Set(double_type * ptr) { _dPtr = ptr; }
657
658 template <typename REAL> StencilTableReal<REAL> * Get() const;
659 };
660
661private:
662
663 //
664 // Topology
665 //
666
667 int _maxValence, // highest vertex valence found in the mesh
668 _numPtexFaces; // total number of ptex faces
669
670 PatchArrayVector _patchArrays; // Vector of descriptors for arrays of patches
671
672 std::vector<Index> _patchVerts; // Indices of the control vertices of the patches
673
674 PatchParamTable _paramTable; // PatchParam bitfields (one per patch)
675
676 //
677 // Extraordinary vertex closed-form evaluation / endcap basis conversion
678 //
679 // XXXtakahito: these data will probably be replaced with mask coefficient or something
680 // SchemeWorker populates.
681 //
682 QuadOffsetsTable _quadOffsetsTable; // Quad offsets (for Gregory patches)
683 VertexValenceTable _vertexValenceTable; // Vertex valence table (for Gregory patches)
684
685 StencilTablePtr _localPointStencils; // local point conversion stencils
686 StencilTablePtr _localPointVaryingStencils; // local point varying stencils
687
688 //
689 // Varying data
690 //
691 PatchDescriptor _varyingDesc;
692
693 std::vector<Index> _varyingVerts;
694
695 //
696 // Face-varying data
697 //
698 FVarPatchChannelVector _fvarChannels;
699
700 std::vector<StencilTablePtr> _localPointFaceVaryingStencils;
701
702 //
703 // 'single-crease' patch sharpness tables
704 //
705 std::vector<Index> _sharpnessIndices; // Indices of single-crease sharpness (one per patch)
706 std::vector<float> _sharpnessValues; // Sharpness values.
707
708 //
709 // Construction history -- relevant to at least one public query:
710 //
711 unsigned int _isUniformLinear : 1;
712
713 //
714 // Precision -- only applies to local-point stencil tables
715 //
716 unsigned int _vertexPrecisionIsDouble : 1;
717 unsigned int _varyingPrecisionIsDouble : 1;
718 unsigned int _faceVaryingPrecisionIsDouble : 1;
719};
720
721
722//
723// Template specializations for float/double -- to be defined before used:
724//
725template <> inline StencilTableReal<float> *
726PatchTable::StencilTablePtr::Get<float>() const { return _fPtr; }
727
728template <> inline StencilTableReal<double> *
729PatchTable::StencilTablePtr::Get<double>() const { return _dPtr; }
730
731template <> inline bool
733 return !_vertexPrecisionIsDouble;
734}
735template <> inline bool
737 return !_varyingPrecisionIsDouble;
738}
739template <> inline bool
741 return !_faceVaryingPrecisionIsDouble;
742}
743
744template <> inline bool
746 return _vertexPrecisionIsDouble;
747}
748template <> inline bool
750 return _varyingPrecisionIsDouble;
751}
752template <> inline bool
754 return _faceVaryingPrecisionIsDouble;
755}
756
757//
758// StencilTable access -- backward compatible and generic:
759//
760inline StencilTable const *
763 return reinterpret_cast<StencilTable const *>(_localPointStencils.Get<float>());
764}
765inline StencilTable const *
768 return reinterpret_cast<StencilTable const *>(
769 _localPointVaryingStencils.Get<float>());
770}
771inline StencilTable const *
774 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
775 return reinterpret_cast<StencilTable const *>(
776 _localPointFaceVaryingStencils[channel].Get<float>());
777 }
778 return NULL;
779}
780
781template <typename REAL>
782inline StencilTableReal<REAL> const *
785 return _localPointStencils.Get<REAL>();
786}
787template <typename REAL>
788inline StencilTableReal<REAL> const *
791 return _localPointVaryingStencils.Get<REAL>();
792}
793template <typename REAL>
794inline StencilTableReal<REAL> const *
797 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
798 return _localPointFaceVaryingStencils[channel].Get<REAL>();
799 }
800 return NULL;
801}
802
803
804//
805// Computation of local point values:
806//
807template <class T>
808inline void
809PatchTable::ComputeLocalPointValues(T const *src, T *dst) const {
811 if (_localPointStencils) {
812 _localPointStencils.Get<float>()->UpdateValues(src, dst);
813 }
814}
815
816template <class T>
817inline void
820 if (_localPointVaryingStencils) {
821 _localPointVaryingStencils.Get<float>()->UpdateValues(src, dst);
822 }
823}
824
825template <class T>
826inline void
827PatchTable::ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel) const {
829 if (channel >= 0 && channel < (int)_localPointFaceVaryingStencils.size()) {
830 if (_localPointFaceVaryingStencils[channel]) {
831 _localPointFaceVaryingStencils[channel].Get<float>()->UpdateValues(src, dst);
832 }
833 }
834}
835
836
837//
838// Basis evaluation overloads
839//
840inline void
841PatchTable::EvaluateBasis(PatchHandle const & handle, float u, float v,
842 float wP[], float wDu[], float wDv[],
843 float wDuu[], float wDuv[], float wDvv[]) const {
844
845 EvaluateBasis<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
846}
847inline void
848PatchTable::EvaluateBasis(PatchHandle const & handle, double u, double v,
849 double wP[], double wDu[], double wDv[],
850 double wDuu[], double wDuv[], double wDvv[]) const {
851
852 EvaluateBasis<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
853}
854
855inline void
856PatchTable::EvaluateBasisVarying(PatchHandle const & handle, float u, float v,
857 float wP[], float wDu[], float wDv[],
858 float wDuu[], float wDuv[], float wDvv[]) const {
859
860 EvaluateBasisVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
861}
862inline void
863PatchTable::EvaluateBasisVarying(PatchHandle const & handle, double u, double v,
864 double wP[], double wDu[], double wDv[],
865 double wDuu[], double wDuv[], double wDvv[]) const {
866
867 EvaluateBasisVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
868}
869
870inline void
871PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, float u, float v,
872 float wP[], float wDu[], float wDv[],
873 float wDuu[], float wDuv[], float wDvv[], int channel) const {
874
875 EvaluateBasisFaceVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
876}
877inline void
878PatchTable::EvaluateBasisFaceVarying(PatchHandle const & handle, double u, double v,
879 double wP[], double wDu[], double wDv[],
880 double wDuu[], double wDuv[], double wDvv[], int channel) const {
881
882 EvaluateBasisFaceVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
883}
884
885} // end namespace Far
886
887} // end namespace OPENSUBDIV_VERSION
888using namespace OPENSUBDIV_VERSION;
889
890} // end namespace OpenSubdiv
891
892#endif /* OPENSUBDIV3_FAR_PATCH_TABLE */
Vtr::ConstIndexArray ConstIndexArray
Definition types.h:30
std::vector< PatchParam > PatchParamTable
Definition patchParam.h:226
Vtr::Array< PatchParam > PatchParamArray
Definition patchParam.h:228
std::vector< PatchArray > PatchArrayVector
Definition types.h:115
An quadtree-based map connecting coarse faces to their sub-patches.
Definition patchMap.h:32
Container for arrays of parametric patches.
Definition patchTable.h:38
ConstIndexArray GetPatchArrayVaryingVertices(int array) const
Returns the varying vertex indices for the patches in array.
PatchVertsTable const & GetPatchControlVerticesTable() const
Get the table of patch control vertices.
Definition patchTable.h:361
void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) const
Updates local point face-varying values.
Definition patchTable.h:827
ConstIndexArray GetVaryingVertices() const
Returns an array of varying vertex indices for the patches.
void ComputeLocalPointValuesVarying(T const *src, T *dst) const
Updates local point varying values.
Definition patchTable.h:818
ConstIndexArray GetPatchVaryingVertices(PatchHandle const &handle) const
Returns the varying vertex indices for a given patch.
bool IsFeatureAdaptive() const
True if the patches are of feature adaptive types.
int GetMaxValence() const
Returns max vertex valence.
Definition patchTable.h:75
StencilTableReal< REAL > const * GetLocalPointStencilTable() const
Returns the stencil table to compute local point vertex values.
StencilTable const * GetLocalPointStencilTable() const
Returns the stencil table to compute local point vertex values.
Definition patchTable.h:761
PatchParamArray getPatchParams(int arrayIndex)
std::vector< unsigned int > QuadOffsetsTable
Definition patchTable.h:372
ConstIndexArray GetPatchArrayFVarValues(int array, int channel=0) const
Returns the value indices for the patches in array in channel.
std::vector< float > const & GetSharpnessValues() const
Returns sharpness values table.
Definition patchTable.h:370
PatchParam GetPatchFVarPatchParam(int array, int patch, int channel=0) const
Returns the face-varying params for a given patch channel.
ConstIndexArray GetPatchVaryingVertices(int array, int patch) const
Returns the varying vertex indices for a given patch.
PatchTable(PatchTable const &src)
Copy constructor.
int GetNumPatchArrays() const
Returns the number of patch arrays in the table.
ConstIndexArray GetPatchVertices(PatchHandle const &handle) const
Returns the control vertex indices for the patch identified by handle.
bool LocalPointFaceVaryingStencilPrecisionMatchesType() const
Tests if the precision of the stencil table to compute local point face-varying values matches the gi...
PatchParamTable const & GetPatchParamTable() const
Returns the PatchParamTable (PatchParams order matches patch array sorting)
Definition patchTable.h:364
VertexValenceTable const & GetVertexValenceTable() const
Returns the 'VertexValences' table (vertex neighborhoods table)
Definition patchTable.h:250
StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
Returns the stencil table to compute local point face-varying values.
Definition patchTable.h:772
int GetNumControlVertices(int array) const
Returns the number of control vertices in array.
void EvaluateBasisFaceVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0, int channel=0) const
Evaluate basis functions for a face-varying value and derivatives at a given (u,v) parametric locatio...
ConstQuadOffsetsArray GetPatchQuadOffsets(PatchHandle const &handle) const
Returns the 'QuadOffsets' for the Gregory patch identified by handle.
PatchDescriptor GetFVarPatchDescriptorIrregular(int channel=0) const
Returns the irregular patch descriptor for channel.
float GetSingleCreasePatchSharpnessValue(int array, int patch) const
Returns the crease sharpness for the patch in array if it is a single-crease patch,...
Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
Definition patchTable.h:242
void ComputeLocalPointValues(T const *src, T *dst) const
Updates local point vertex values.
Definition patchTable.h:809
float GetSingleCreasePatchSharpnessValue(PatchHandle const &handle) const
Returns the crease sharpness for the patch identified by handle if it is a single-crease patch,...
PatchParam GetPatchParam(int array, int patch) const
Returns the PatchParam for patch in array.
ConstIndexArray GetPatchFVarValues(int array, int patch, int channel=0) const
Returns the value indices for a given patch in channel.
PatchDescriptor GetFVarPatchDescriptorRegular(int channel=0) const
Returns the regular patch descriptor for channel.
PatchDescriptor GetPatchDescriptor(PatchHandle const &handle) const
Returns the PatchDescriptor for the patch identified by handle.
QuadOffsetsTable const & GetQuadOffsetsTable() const
Returns the quad-offsets table.
Definition patchTable.h:375
int GetNumPatches(int array) const
Returns the number of patches in array.
PatchDescriptor GetVaryingPatchDescriptor() const
Returns the varying patch descriptor.
ConstIndexArray GetPatchFVarValues(PatchHandle const &handle, int channel=0) const
Returns the value indices for a given patch in channel.
ConstPatchParamArray const GetPatchParams(int array) const
Returns the PatchParams for the patches in array.
int GetNumControlVerticesTotal() const
Returns the total number of control vertex indices in the table.
Definition patchTable.h:67
int GetNumFVarChannels() const
Returns the number of face-varying channels.
ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel=0) const
Returns the face-varying for a given patch in array in channel.
Index getPatchIndex(int array, int patch) const
int GetNumLocalPoints() const
Returns the number of local vertex points.
bool LocalPointVaryingStencilPrecisionMatchesType() const
Tests if the precision of the stencil table to compute local point varying values matches the given f...
ConstIndexArray GetPatchArrayVertices(int array) const
Returns the control vertex indices for the patches in array.
int GetNumPtexFaces() const
Returns the total number of ptex faces in the mesh.
Definition patchTable.h:78
ConstIndexArray GetFVarValues(int channel=0) const
Returns an array of value indices for the patches in channel.
void EvaluateBasis(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
Evaluate basis functions for position and derivatives at a given (u,v) parametric location of a patch...
StencilTableReal< REAL > const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
Returns the stencil table to compute local point face-varying values.
int GetNumPatchesTotal() const
Returns the total number of patches stored in the table.
PatchParam GetPatchParam(PatchHandle const &handle) const
Returns a PatchParam for the patch identified by handle.
Sdc::Options::FVarLinearInterpolation GetFVarChannelLinearInterpolation(int channel=0) const
Deprecated.
std::vector< Index > const & GetSharpnessIndexTable() const
Returns a sharpness index table for each patch (if exists)
Definition patchTable.h:367
PatchDescriptor GetPatchArrayDescriptor(int array) const
Returns the PatchDescriptor for the patches in array.
void EvaluateBasisVarying(PatchHandle const &handle, REAL u, REAL v, REAL wP[], REAL wDu[]=0, REAL wDv[]=0, REAL wDuu[]=0, REAL wDuv[]=0, REAL wDvv[]=0) const
Evaluate basis functions for a varying value and derivatives at a given (u,v) parametric location of ...
StencilTable const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
Definition patchTable.h:766
ConstIndexArray GetPatchVertices(int array, int patch) const
Returns the control vertex indices for patch in array.
PatchParam GetPatchFVarPatchParam(PatchHandle const &handle, int channel=0) const
Returns the value indices for a given patch in channel.
int GetFVarValueStride(int channel=0) const
Returns the stride between patches in the value index array of channel.
ConstPatchParamArray GetFVarPatchParams(int channel=0) const
Returns an array of face-varying patch param for channel.
PatchDescriptor GetFVarPatchDescriptor(int channel=0) const
Returns the default/irregular patch descriptor for channel.
int GetNumLocalPointsVarying() const
Returns the number of local varying points.
bool LocalPointStencilPrecisionMatchesType() const
Tests if the precision of the stencil table to compute local point vertex values matches the given fl...
StencilTableReal< REAL > const * GetLocalPointVaryingStencilTable() const
Returns the stencil table to compute local point varying values.
int GetNumLocalPointsFaceVarying(int channel=0) const
Returns the number of local face-varying points for channel.
Handle that can be used as unique patch identifier within PatchTable.
Definition patchTable.h:43
Stencil table class wrapping the template for compatibility.