24 #ifndef OPENSUBDIV3_SDC_CREASE_H
25 #define OPENSUBDIV3_SDC_CREASE_H
27 #include "../version.h"
29 #include "../sdc/options.h"
31 namespace OpenSubdiv {
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;
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 SubdivideEdgeSharpnessAtVertex(float edgeSharpness, int incidentEdgeCountAtEndVertex, float const *edgeSharpnessAroundEndVertex) const
float decrementSharpness(float sharpness) const
float SubdivideVertexSharpness(float vertexSharpness) const
static float const SHARPNESS_SMOOTH
Rule DetermineVertexVertexRule(float vertexSharpness, int incidentEdgeCount, float const *incidentEdgeSharpness) const
static bool IsInfinite(float sharpness)
sharpen edges and corners
float SharpenBoundaryVertex(float edgeSharpness) const
float SharpenBoundaryEdge(float edgeSharpness) const
Types, constants and utilities related to semi-sharp creasing – whose implementation is independent o...
All supported options applying to subdivision scheme.
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
VtxBoundaryInterpolation GetVtxBoundaryInterpolation() const
Get vertex boundary interpolation rule.
static bool IsSmooth(float sharpness)
void GetSharpEdgePairOfCrease(float const *incidentEdgeSharpness, int incidentEdgeCount, int sharpEdgePair[2]) const
Crease(Options const &options)
float SubdivideUniformSharpness(float vertexOrEdgeSharpness) const
static float const SHARPNESS_INFINITE
static bool IsSemiSharp(float sharpness)
static bool IsSharp(float sharpness)
CreasingMethod GetCreasingMethod() const
Get edge crease rule.