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