7#ifndef OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
8#define OPENSUBDIV3_SDC_BILINEAR_SCHEME_H
10#include "../version.h"
15namespace OPENSUBDIV_VERSION {
43template <
typename EDGE,
typename MASK>
48 assignCreaseMaskForEdge(edge, mask);
52template <
typename VERTEX,
typename MASK>
57 assignCornerMaskForVertex(vertex, mask);
65template <
typename VERTEX,
typename MASK>
69 posMask.SetNumVertexWeights(1);
70 posMask.SetNumEdgeWeights(0);
71 posMask.SetNumFaceWeights(0);
72 posMask.SetFaceWeightsForFaceCenters(
false);
74 posMask.VertexWeight(0) = 1.0f;
78template <
typename VERTEX,
typename MASK>
81 int const [2])
const {
83 assignCornerLimitMask(vertex, posMask);
87template <
typename VERTEX,
typename MASK>
91 assignCornerLimitMask(vertex, posMask);
99template <
typename VERTEX,
typename MASK>
102 MASK& tan1Mask, MASK& tan2Mask)
const {
104 tan1Mask.SetNumVertexWeights(1);
105 tan1Mask.SetNumEdgeWeights(2);
106 tan1Mask.SetNumFaceWeights(0);
107 tan1Mask.SetFaceWeightsForFaceCenters(
false);
109 tan2Mask.SetNumVertexWeights(1);
110 tan2Mask.SetNumEdgeWeights(2);
111 tan2Mask.SetNumFaceWeights(0);
112 tan2Mask.SetFaceWeightsForFaceCenters(
false);
114 tan1Mask.VertexWeight(0) = -1.0f;
115 tan1Mask.EdgeWeight(0) = 1.0f;
116 tan1Mask.EdgeWeight(1) = 0.0f;
118 tan2Mask.VertexWeight(0) = -1.0f;
119 tan2Mask.EdgeWeight(0) = 0.0f;
120 tan2Mask.EdgeWeight(1) = 1.0f;
124template <
typename VERTEX,
typename MASK>
127 MASK& tan1Mask, MASK& tan2Mask,
int const [2])
const {
129 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
133template <
typename VERTEX,
typename MASK>
136 MASK& tan1Mask, MASK& tan2Mask)
const {
138 assignCornerLimitTangentMasks(vertex, tan1Mask, tan2Mask);
144using 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