│ │ │ │
Go to the documentation of this file.
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ @@ -119,747 +119,249 @@
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_H
│ │ │ │ -
26#define OPENSUBDIV3_FAR_PATCH_TABLE_H
│ │ │ │ +
25#ifndef OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_H
│ │ │ │ +
26#define OPENSUBDIV3_FAR_PATCH_TABLE_FACTORY_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"
│ │ │ │ +
30#include "../far/topologyRefiner.h"
│ │ │ │ +
31#include "../far/patchTable.h"
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
34namespace OPENSUBDIV_VERSION {
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
39namespace OPENSUBDIV_VERSION {
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
85 return (
int)_patchVerts.size();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
107 return adaptiveOptions;
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
167 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
186 template <
class T>
void
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
197 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
216 template <
class T>
void
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
212template <>
inline void PatchTableFactory::Options::SetPatchPrecision<float>() {
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
215template <>
inline void PatchTableFactory::Options::SetFVarPatchPrecision<float>() {
│ │ │ │ +
216 fvarPatchPrecisionDouble =
false;
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
219template <>
inline void PatchTableFactory::Options::SetPatchPrecision<double>() {
│ │ │ │ +
220 patchPrecisionDouble =
true;
│ │ │ │ +
│ │ │ │ +
222template <>
inline void PatchTableFactory::Options::SetFVarPatchPrecision<double>() {
│ │ │ │ +
223 fvarPatchPrecisionDouble =
true;
│ │ │ │ +
│ │ │ │
│ │ │ │ -
227 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
230using namespace OPENSUBDIV_VERSION;
│ │ │ │ +
│ │ │ │ +
│ │ │ │
│ │ │ │ -
248 template <
class T>
void
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
268 return _vertexValenceTable;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
393 return _quadOffsetsTable;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
428 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
430 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
│ │ │ │ -
431 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
436 float wP[],
float wDu[] = 0,
float wDv[] = 0,
│ │ │ │ -
437 float wDuu[] = 0,
float wDuv[] = 0,
float wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
442 double wP[],
double wDu[] = 0,
double wDv[] = 0,
│ │ │ │ -
443 double wDuu[] = 0,
double wDuv[] = 0,
double wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
467 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
469 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
│ │ │ │ -
470 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
475 float wP[],
float wDu[] = 0,
float wDv[] = 0,
│ │ │ │ -
476 float wDuu[] = 0,
float wDuv[] = 0,
float wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
481 double wP[],
double wDu[] = 0,
double wDv[] = 0,
│ │ │ │ -
482 double wDuu[] = 0,
double wDuv[] = 0,
double wDvv[] = 0)
const;
│ │ │ │ -
│ │ │ │ -
508 template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
510 REAL wP[], REAL wDu[] = 0, REAL wDv[] = 0,
│ │ │ │ -
511 REAL wDuu[] = 0, REAL wDuv[] = 0, REAL wDvv[] = 0,
│ │ │ │ -
512 int channel = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
517 float wP[],
float wDu[] = 0,
float wDv[] = 0,
│ │ │ │ -
518 float wDuu[] = 0,
float wDuv[] = 0,
float wDvv[] = 0,
│ │ │ │ -
519 int channel = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
524 double wP[],
double wDu[] = 0,
double wDv[] = 0,
│ │ │ │ -
525 double wDuu[] = 0,
double wDuv[] = 0,
double wDvv[] = 0,
│ │ │ │ -
526 int channel = 0)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
550 typedef std::vector<PatchArray> PatchArrayVector;
│ │ │ │ -
│ │ │ │ -
552 PatchArray & getPatchArray(
Index arrayIndex);
│ │ │ │ -
553 PatchArray
const & getPatchArray(
Index arrayIndex)
const;
│ │ │ │ -
│ │ │ │ -
555 void reservePatchArrays(
int numPatchArrays);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
559 IndexArray getPatchArrayVertices(
int arrayIndex);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
567 IndexArray getPatchArrayVaryingVertices(
int arrayIndex);
│ │ │ │ -
│ │ │ │ -
569 void allocateVaryingVertices(
│ │ │ │ -
│ │ │ │ -
571 void populateVaryingVertices();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
577 struct FVarPatchChannel;
│ │ │ │ -
578 typedef std::vector<FVarPatchChannel> FVarPatchChannelVector;
│ │ │ │ -
│ │ │ │ -
580 FVarPatchChannel & getFVarPatchChannel(
int channel);
│ │ │ │ -
581 FVarPatchChannel
const & getFVarPatchChannel(
int channel)
const;
│ │ │ │ -
│ │ │ │ -
583 void allocateFVarPatchChannels(
int numChannels);
│ │ │ │ -
584 void allocateFVarPatchChannelValues(
│ │ │ │ -
│ │ │ │ -
586 int numPatches,
int channel);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
589 void setFVarPatchChannelLinearInterpolation(
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
596 PatchParam getPatchFVarPatchParam(
int patch,
int channel)
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
606 class StencilTablePtr {
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
617 StencilTablePtr() { _fPtr = 0; }
│ │ │ │ -
618 StencilTablePtr(float_type * ptr) { _fPtr = ptr; }
│ │ │ │ -
619 StencilTablePtr(double_type * ptr) { _dPtr = ptr; }
│ │ │ │ -
│ │ │ │ -
621 operator bool()
const {
return _fPtr != 0; }
│ │ │ │ -
│ │ │ │ -
623 void Set() { _fPtr = 0; }
│ │ │ │ -
624 void Set(float_type * ptr) { _fPtr = ptr; }
│ │ │ │ -
625 void Set(double_type * ptr) { _dPtr = ptr; }
│ │ │ │ -
│ │ │ │ -
627 template <
typename REAL> StencilTableReal<REAL> * Get()
const;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
641 std::vector<Index> _patchVerts;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
654 StencilTablePtr _localPointStencils;
│ │ │ │ -
655 StencilTablePtr _localPointVaryingStencils;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
660 PatchDescriptor _varyingDesc;
│ │ │ │ -
│ │ │ │ -
662 std::vector<Index> _varyingVerts;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
667 FVarPatchChannelVector _fvarChannels;
│ │ │ │ -
│ │ │ │ -
669 std::vector<StencilTablePtr> _localPointFaceVaryingStencils;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
674 std::vector<Index> _sharpnessIndices;
│ │ │ │ -
675 std::vector<float> _sharpnessValues;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
680 unsigned int _isUniformLinear : 1;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
685 unsigned int _vertexPrecisionIsDouble : 1;
│ │ │ │ -
686 unsigned int _varyingPrecisionIsDouble : 1;
│ │ │ │ -
687 unsigned int _faceVaryingPrecisionIsDouble : 1;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
694template <>
inline StencilTableReal<float> *
│ │ │ │ -
695PatchTable::StencilTablePtr::Get<float>()
const {
return _fPtr; }
│ │ │ │ -
│ │ │ │ -
697template <>
inline StencilTableReal<double> *
│ │ │ │ -
698PatchTable::StencilTablePtr::Get<double>()
const {
return _dPtr; }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
700template <>
inline bool
│ │ │ │ -
701PatchTable::LocalPointStencilPrecisionMatchesType<float>()
const {
│ │ │ │ -
702 return !_vertexPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
704template <>
inline bool
│ │ │ │ -
705PatchTable::LocalPointVaryingStencilPrecisionMatchesType<float>()
const {
│ │ │ │ -
706 return !_varyingPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
708template <>
inline bool
│ │ │ │ -
709PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<float>()
const {
│ │ │ │ -
710 return !_faceVaryingPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
713template <>
inline bool
│ │ │ │ -
714PatchTable::LocalPointStencilPrecisionMatchesType<double>()
const {
│ │ │ │ -
715 return _vertexPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
717template <>
inline bool
│ │ │ │ -
718PatchTable::LocalPointVaryingStencilPrecisionMatchesType<double>()
const {
│ │ │ │ -
719 return _varyingPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
721template <>
inline bool
│ │ │ │ -
722PatchTable::LocalPointFaceVaryingStencilPrecisionMatchesType<double>()
const {
│ │ │ │ -
723 return _faceVaryingPrecisionIsDouble;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
731 assert(LocalPointStencilPrecisionMatchesType<float>());
│ │ │ │ -
732 return static_cast<StencilTable const *
>(_localPointStencils.Get<
float>());
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
736 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
│ │ │ │ -
│ │ │ │ -
738 _localPointVaryingStencils.Get<
float>());
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
742 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
│ │ │ │ -
743 if (channel >= 0 && channel < (
int)_localPointFaceVaryingStencils.size()) {
│ │ │ │ -
│ │ │ │ -
745 _localPointFaceVaryingStencils[channel].Get<
float>());
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
750template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
753 assert(LocalPointStencilPrecisionMatchesType<REAL>());
│ │ │ │ -
754 return _localPointStencils.Get<REAL>();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
756template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
759 assert(LocalPointVaryingStencilPrecisionMatchesType<REAL>());
│ │ │ │ -
760 return _localPointVaryingStencils.Get<REAL>();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
762template <
typename REAL>
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
765 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<REAL>());
│ │ │ │ -
766 if (channel >= 0 && channel < (
int)_localPointFaceVaryingStencils.size()) {
│ │ │ │ -
767 return _localPointFaceVaryingStencils[channel].Get<REAL>();
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
779 assert(LocalPointStencilPrecisionMatchesType<float>());
│ │ │ │ -
780 if (_localPointStencils) {
│ │ │ │ -
781 _localPointStencils.Get<
float>()->UpdateValues(src, dst);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
788 assert(LocalPointVaryingStencilPrecisionMatchesType<float>());
│ │ │ │ -
789 if (_localPointVaryingStencils) {
│ │ │ │ -
790 _localPointVaryingStencils.Get<
float>()->UpdateValues(src, dst);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
797 assert(LocalPointFaceVaryingStencilPrecisionMatchesType<float>());
│ │ │ │ -
798 if (channel >= 0 && channel < (
int)_localPointFaceVaryingStencils.size()) {
│ │ │ │ -
799 if (_localPointFaceVaryingStencils[channel]) {
│ │ │ │ -
800 _localPointFaceVaryingStencils[channel].Get<
float>()->UpdateValues(src, dst);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
811 float wP[],
float wDu[],
float wDv[],
│ │ │ │ -
812 float wDuu[],
float wDuv[],
float wDvv[])
const {
│ │ │ │ -
│ │ │ │ -
814 EvaluateBasis<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
818 double wP[],
double wDu[],
double wDv[],
│ │ │ │ -
819 double wDuu[],
double wDuv[],
double wDvv[])
const {
│ │ │ │ -
│ │ │ │ -
821 EvaluateBasis<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
826 float wP[],
float wDu[],
float wDv[],
│ │ │ │ -
827 float wDuu[],
float wDuv[],
float wDvv[])
const {
│ │ │ │ -
│ │ │ │ -
829 EvaluateBasisVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
833 double wP[],
double wDu[],
double wDv[],
│ │ │ │ -
834 double wDuu[],
double wDuv[],
double wDvv[])
const {
│ │ │ │ -
│ │ │ │ -
836 EvaluateBasisVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
841 float wP[],
float wDu[],
float wDv[],
│ │ │ │ -
842 float wDuu[],
float wDuv[],
float wDvv[],
int channel)
const {
│ │ │ │ -
│ │ │ │ -
844 EvaluateBasisFaceVarying<float>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
848 double wP[],
double wDu[],
double wDv[],
│ │ │ │ -
849 double wDuu[],
double wDuv[],
double wDvv[],
int channel)
const {
│ │ │ │ -
│ │ │ │ -
851 EvaluateBasisFaceVarying<double>(handle, u, v, wP, wDu, wDv, wDuu, wDuv, wDvv, channel);
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
857using namespace OPENSUBDIV_VERSION;
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
std::vector< PatchParam > PatchParamTable
│ │ │ │ -
│ │ │ │ -
std::vector< PatchArray > PatchArrayVector
│ │ │ │ -
Describes the type of a patch.
│ │ │ │ -
An quadtree-based map connecting coarse faces to their sub-patches.
│ │ │ │ -
│ │ │ │ -
Container for arrays of parametric patches.
│ │ │ │ -
ConstIndexArray GetPatchArrayVaryingVertices(int array) const
Returns the varying vertex indices for the patches in array.
│ │ │ │ -
float * getSharpnessValues(Index arrayIndex)
│ │ │ │ -
PatchVertsTable const & GetPatchControlVerticesTable() const
Get the table of patch control vertices.
│ │ │ │ -
void ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel=0) const
Updates local point face-varying values.
│ │ │ │ -
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.
│ │ │ │ -
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.
│ │ │ │ -
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.
│ │ │ │ -
PatchParamArray getPatchParams(int arrayIndex)
│ │ │ │ -
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.
│ │ │ │ -
std::vector< Index > VertexValenceTable
│ │ │ │ -
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.
│ │ │ │ -
PatchTable(int maxvalence)
│ │ │ │ -
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)
│ │ │ │ -
VertexValenceTable const & GetVertexValenceTable() const
Returns the 'VertexValences' table (vertex neighborhoods table)
│ │ │ │ -
StencilTable const * GetLocalPointFaceVaryingStencilTable(int channel=0) const
Returns the stencil table to compute local point face-varying values.
│ │ │ │ -
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,...
│ │ │ │ -
Index * getSharpnessIndices(Index arrayIndex)
│ │ │ │ -
void ComputeLocalPointValues(T const *src, T *dst) const
Updates local point vertex values.
│ │ │ │ -
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.
│ │ │ │ -
std::vector< Index > PatchVertsTable
│ │ │ │ -
QuadOffsetsTable const & GetQuadOffsetsTable() const
Returns the quad-offsets table.
│ │ │ │ -
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.
│ │ │ │ -
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.
│ │ │ │ -
ConstIndexArray GetFVarValues(int channel=0) const
Returns an array of value indices for the patches in channel.
│ │ │ │ -
Vtr::ConstArray< unsigned int > ConstQuadOffsetsArray
Accessors for the gregory patch evaluation buffers. These methods will be deprecated.
│ │ │ │ -
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.
│ │ │ │ -
void print() const
debug helper
│ │ │ │ -
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)
│ │ │ │ -
PatchDescriptor GetPatchArrayDescriptor(int array) const
Returns the PatchDescriptor for the patches in array.
│ │ │ │ -
friend class PatchTableBuilder
│ │ │ │ -
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.
│ │ │ │ -
std::vector< unsigned int > QuadOffsetsTable
│ │ │ │ -
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.
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
Table of subdivision stencils.
│ │ │ │ -
Stencil table class wrapping the template for compatibility.
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
Vtr::ConstIndexArray ConstIndexArray
│ │ │ │ +
Container for arrays of parametric patches.
│ │ │ │ +
Factory for constructing a PatchTable from a TopologyRefiner.
│ │ │ │ +
std::vector< PatchFaceTag > PatchTagVector
│ │ │ │ +
static PatchTable * Create(TopologyRefiner const &refiner, Options options=Options(), ConstIndexArray selectedFaces=ConstIndexArray())
Instantiates a PatchTable from a client-provided TopologyRefiner.
│ │ │ │ +
Public options for the PatchTable factory.
│ │ │ │ +
unsigned int generateVaryingTables
Generate varying patch tables.
│ │ │ │ +
unsigned int generateLegacySharpCornerPatches
Generate sharp regular patches at smooth corners (legacy)
│ │ │ │ +
unsigned int shareEndCapPatchPoints
│ │ │ │ +
TopologyRefiner::AdaptiveOptions GetRefineAdaptiveOptions() const
Determine adaptive refinement options to match assigned patch options.
│ │ │ │ +
unsigned int maxIsolationLevel
Cap adaptive feature isolation to the given level (max. 10)
│ │ │ │ +
EndCapType GetEndCapType() const
Get endcap basis type.
│ │ │ │ +
unsigned int generateFVarLegacyLinearPatches
Generate all linear face-varying patches (legacy)
│ │ │ │ +
void SetPatchPrecision()
Set precision of vertex patches.
│ │ │ │ +
unsigned int fvarPatchPrecisionDouble
Generate double-precision stencils for face-varying patches.
│ │ │ │ +
void SetMaxIsolationLevel(unsigned int level)
Set maximum isolation level.
│ │ │ │ +
unsigned int endCapType
EndCapType.
│ │ │ │ +
int const * fvarChannelIndices
List containing the indices of the channels selected for the factory.
│ │ │ │ +
unsigned int useSingleCreasePatch
Use single crease patch.
│ │ │ │ +
unsigned int useInfSharpPatch
Use infinitely-sharp patch.
│ │ │ │ +
void SetEndCapType(EndCapType e)
Set endcap basis type.
│ │ │ │ +
unsigned int generateVaryingLocalPoints
Generate local points with varying patches.
│ │ │ │ +
unsigned int includeFVarBaseLevelIndices
Include base level in face-varying patch point indices (Uniform mode only)
│ │ │ │ +
unsigned int generateAllLevels
Generate levels from 'firstLevel' to 'maxLevel' (Uniform mode only)
│ │ │ │ +
unsigned int patchPrecisionDouble
Generate double-precision stencils for vertex patches.
│ │ │ │ +
unsigned int generateFVarTables
Generate face-varying patch tables.
│ │ │ │ +
unsigned int includeBaseLevelIndices
Include base level in patch point indices (Uniform mode only)
│ │ │ │ +
void SetFVarPatchPrecision()
Set precision of face-varying patches.
│ │ │ │ +
int numFVarChannels
Number of channel indices and interpolation modes passed.
│ │ │ │ +
unsigned int triangulateQuads
Triangulate 'QUADS' primitives (Uniform mode only)
│ │ │ │ +
EndCapType
Choice for approximating irregular patches (end-caps)
│ │ │ │ +
@ ENDCAP_LEGACY_GREGORY
legacy option for 2.x style Gregory patches (Catmark only)
│ │ │ │ +
@ ENDCAP_GREGORY_BASIS
use Gregory patches (highest quality, recommended default)
│ │ │ │ +
│ │ │ │ +
@ ENDCAP_BILINEAR_BASIS
use linear patches (simple quads or tris)
│ │ │ │ +
@ ENDCAP_BSPLINE_BASIS
use BSpline-like patches (same patch type as regular)
│ │ │ │ +
Options(unsigned int maxIsolation=10)
│ │ │ │ +
Obsolete internal struct not intended for public use – due to be deprecated.
│ │ │ │ +
unsigned int _isSingleCrease
│ │ │ │ +
│ │ │ │ +
unsigned int _boundaryIndex
│ │ │ │ +
void assignBoundaryPropertiesFromVertexMask(int boundaryVertexMask)
│ │ │ │ +
unsigned int _transitionMask
│ │ │ │ +
unsigned int _hasBoundaryEdge
│ │ │ │ +
unsigned int _boundaryMask
│ │ │ │ +
│ │ │ │ +
void assignTransitionPropertiesFromEdgeMask(int boundaryVertexMask)
│ │ │ │ +
│ │ │ │ +
void assignBoundaryPropertiesFromEdgeMask(int boundaryEdgeMask)
│ │ │ │ +
unsigned int _boundaryCount
│ │ │ │ +
Stores topology data for a specified set of refinement options.
│ │ │ │ +
Adaptive refinement options.
│ │ │ │ +
unsigned int useSingleCreasePatch
│ │ │ │ +
unsigned int useInfSharpPatch
│ │ │ │ +
unsigned int considerFVarChannels
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │