24 #ifndef OPENSUBDIV3_SDC_CREASE_H 25 #define OPENSUBDIV3_SDC_CREASE_H 27 #include "../version.h" 29 #include "../sdc/options.h" 32 namespace OPENSUBDIV_VERSION {
129 int incidentEdgeCountAtEndVertex,
130 float const* edgeSharpnessAroundEndVertex)
const;
133 float const* incidentEdgeSharpnessAroundVertex,
134 float* childEdgesSharpnessAroundVertex)
const;
145 int incidentEdgeCount,
146 float const* incidentEdgeSharpness)
const;
148 int sharpEdgeCount)
const;
163 float childVertexSharpness,
164 int incidentEdgeCount,
165 float const* incidentEdgeSharpness,
166 float const* childEdgesSharpness)
const;
169 int incidentEdgeCount,
170 int sharpEdgePair[2])
const;
203 SHARPNESS_INFINITE : vertexSharpness;
211 if (sharpness > 1.0f)
return (sharpness - 1.0f);
229 int sharpEdgePair[2])
const {
234 sharpEdgePair[0] = 0;
235 while (
IsSmooth(incidentEdgeSharpness[sharpEdgePair[0]])) ++ sharpEdgePair[0];
237 sharpEdgePair[1] = incidentEdgeCount - 1;
238 while (
IsSmooth(incidentEdgeSharpness[sharpEdgePair[1]])) -- sharpEdgePair[1];
244 using namespace OPENSUBDIV_VERSION;
float ComputeFractionalWeightAtVertex(float vertexSharpness, float childVertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness, float const *childEdgesSharpness) const
Transitional weighting: When the rules applicable to a parent vertex and its child differ...
static bool IsSmooth(float sharpness)
float SubdivideVertexSharpness(float vertexSharpness) const
Crease(Options const &options)
float SharpenBoundaryEdge(float edgeSharpness) const
float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const
static bool IsSemiSharp(float sharpness)
float SharpenBoundaryVertex(float edgeSharpness) const
All supported options applying to subdivision scheme.
static float const SHARPNESS_INFINITE
static bool IsSharp(float sharpness)
Types, constants and utilities related to semi-sharp creasing – whose implementation is independent ...
static float const SHARPNESS_SMOOTH
float decrementSharpness(float sharpness) const
float SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) const
void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int incidentEdgeCount, int sharpEdgePair[2]) const
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float const *incidentEdgeSharpnessAroundVertex, float *childEdgesSharpnessAroundVertex) const
sharpen edges and corners
Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness) const
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Set vertex boundary interpolation rule.
static bool IsInfinite(float sharpness)