HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simplify.h File Reference
+ Include dependency graph for simplify.h:

Go to the source code of this file.

Functions

PXR_NAMESPACE_OPEN_SCOPE
TS_API void 
TsSimplifySpline (TsSpline *spline, const GfMultiInterval &intervals, double maxErrorFraction, double extremeMaxErrFract=.001)
 
TS_API void TsSimplifySplinesInParallel (const std::vector< TsSpline * > &splines, const std::vector< GfMultiInterval > &intervals, double maxErrorFraction, double extremeMaxErrFract=.001)
 
TS_API void TsResampleSpline (TsSpline *spline, const GfMultiInterval &intervals, double maxErrorFraction)
 

Function Documentation

TS_API void TsResampleSpline ( TsSpline spline,
const GfMultiInterval intervals,
double  maxErrorFraction 
)

First densely samples the spline within the given intervals by adding one knot per frame. Then executes the simplify algorithm to remove as many knots as possibe while keeping the error below the given maximum.

PXR_NAMESPACE_OPEN_SCOPE TS_API void TsSimplifySpline ( TsSpline spline,
const GfMultiInterval intervals,
double  maxErrorFraction,
double  extremeMaxErrFract = .001 
)

Remove as many knots as possible from spline without introducing error greater than maxErrorFraction, where maxErrorFraction is a percentage of the spline's total range (if the spline's value varies over a range of x, the largest error allowed will be x*maxErrorFraction). Only remove knots in intervals.

TS_API void TsSimplifySplinesInParallel ( const std::vector< TsSpline * > &  splines,
const std::vector< GfMultiInterval > &  intervals,
double  maxErrorFraction,
double  extremeMaxErrFract = .001 
)

Run TsSimplifySpline() on a vector of splines in parallel. The splines in 'splines' are mutated in place. The first two args must have the same length, unless the intervals arg is empty, in which case the full frame range of each spline is used. The remaining args are as in TsSimplifySpline.