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;
CreasingMethod GetCreasingMethod() const
Get edge crease rule.
Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness) const
float decrementSharpness(float sharpness) const
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Set vertex boundary interpolation rule.
sharpen edges and corners
float SharpenBoundaryEdge(float edgeSharpness) const
static bool IsInfinite(float sharpness)
float SubdivideVertexSharpness(float vertexSharpness) const
static float const SHARPNESS_SMOOTH
Crease(Options const &options)
static float const SHARPNESS_INFINITE
All supported options applying to subdivision scheme.
static bool IsSemiSharp(float sharpness)
float SharpenBoundaryVertex(float edgeSharpness) const
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...
void SubdivideEdgeSharpnessesAroundVertex(int incidentEdgeCountAtVertex, float const *incidentEdgeSharpnessAroundVertex, float *childEdgesSharpnessAroundVertex) const
void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int incidentEdgeCount, int sharpEdgePair[2]) const
float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const
static bool IsSharp(float sharpness)
static bool IsSmooth(float sharpness)
float SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) const
Types, constants and utilities related to semi-sharp creasing – whose implementation is independent ...