24#ifndef OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
25#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
27#include "../version.h"
29#include "../sdc/scheme.h"
32namespace OPENSUBDIV_VERSION {
60template <
typename EDGE,
typename MASK>
65 assignCreaseMaskForEdge(edge, mask);
69template <
typename VERTEX,
typename MASK>
74 assignCornerMaskForVertex(vertex, mask);
82template <
typename VERTEX,
typename MASK>
86 posMask.SetNumVertexWeights(1);
87 posMask.SetNumEdgeWeights(0);
88 posMask.SetNumFaceWeights(0);
89 posMask.SetFaceWeightsForFaceCenters(
false);
91 posMask.VertexWeight(0) = 1.0f;
95template <
typename VERTEX,
typename MASK>
98 int const [2])
const {
100 assignCornerLimitMask(vertex, posMask);
104template <
typename VERTEX,
typename MASK>
108 assignCornerLimitMask(vertex, posMask);
116template <
typename VERTEX,
typename MASK>
119 MASK& tan1Mask, MASK& tan2Mask)
const {
121 tan1Mask.SetNumVertexWeights(1);
122 tan1Mask.SetNumEdgeWeights(2);
123 tan1Mask.SetNumFaceWeights(0);
124 tan1Mask.SetFaceWeightsForFaceCenters(
false);
126 tan2Mask.SetNumVertexWeights(1);
127 tan2Mask.SetNumEdgeWeights(2);
128 tan2Mask.SetNumFaceWeights(0);
129 tan2Mask.SetFaceWeightsForFaceCenters(
false);
131 tan1Mask.VertexWeight(0) = -1.0f;
132 tan1Mask.EdgeWeight(0) = 1.0f;
133 tan1Mask.EdgeWeight(1) = 0.0f;
135 tan2Mask.VertexWeight(0) = -1.0f;
136 tan2Mask.EdgeWeight(0) = 0.0f;
137 tan2Mask.EdgeWeight(1) = 1.0f;
141template <
typename VERTEX,
typename MASK>
144 MASK& tan1Mask, MASK& tan2Mask,
int const [2])
const {
146 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
150template <
typename VERTEX,
typename MASK>
153 MASK& tan1Mask, MASK& tan2Mask)
const {
155 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
161using namespace OPENSUBDIV_VERSION;
Split
Enumerated type for all face splitting schemes.
@ SPLIT_TO_QUADS
Used by Catmark and Bilinear.
static Split GetTopologicalSplitType()
void ComputeVertexVertexMask(VERTEX const &vertexNeighborhood, MASK &vertexVertexMask, Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease::RULE_UNKNOWN) const
Vertex-vertex masks If known, a single Rule or pair of Rules can be specified (indicating a crease tr...
void assignCreaseLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2, int const creaseEnds[2]) const
static int GetRegularFaceSize()
void ComputeEdgeVertexMask(EDGE const &edgeNeighborhood, MASK &edgeVertexMask, Crease::Rule parentRule=Crease::RULE_UNKNOWN, Crease::Rule childRule=Crease::RULE_UNKNOWN) const
Edge-vertex masks If known, the Rule for the edge and/or the derived vertex can be specified to accel...
void assignSmoothLimitMask(VERTEX const &vertex, MASK &pos) const
static int GetLocalNeighborhoodSize()
void assignCreaseLimitMask(VERTEX const &vertex, MASK &pos, int const creaseEnds[2]) const
static int GetRegularVertexValence()
void assignSmoothLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const
void assignCornerLimitMask(VERTEX const &vertex, MASK &pos) const
void assignCornerLimitTangentMasks(VERTEX const &vertex, MASK &tan1, MASK &tan2) const