13 #ifndef __CL_SimpleChannel_h__
14 #define __CL_SimpleChannel_h__
50 bool clamp_slopes =
true);
64 void splitAndFindSlopeLengths(
fpreal t,
104 return x0 + u*(x1 + u*(
x2 + u*x3));
128 static void clampSlopesToMonotone(
fpreal &in,
fpreal &out,
149 static void getMonotoneSlopeSDDE2ViaConic
156 void display()
const;
294 bool isAtHardKey(
fpreal gtime)
const;
296 int getSegmentIdx(
fpreal ltime)
const;
304 { mySegmentExpressions[
index] = expr; }
307 {
return mySegmentInSlopesAuto[
index]; }
309 {
return mySegmentOutSlopesAuto[
index]; }
333 bool insertKeyFrame(
fpreal global_time,
bool auto_slope =
true);
337 bool destroyKeyFrame(
fpreal global_time);
369 bool setKeyAutoSlope(
fpreal gtime,
bool auto_slope,
373 bool setRawValues(
fpreal from,
377 bool auto_slope =
true);
410 void setTolerance(
fpreal tolerance) { myTolerance = tolerance; }
432 void smoothAutoSlopesForSegments(
437 void smoothAutoSlopes(
bool force =
false);
451 static void setAutoSplit(
bool onoff);
456 {
return theDefaultSegmentType; }
459 {
return theDefaultSplitSegmentType; }
464 static fpreal theTolerance;
465 static constexpr
fpreal theDefaultAccelRatio = 1.0 / 3.0;
468 static bool theAutoSplit;
476 return length * ratio * SYSsqrt( slope*slope + 1 );
486 bool is_end_segment);
490 bool is_end_segment);
494 void splitSegment(
fpreal gtime,
bool auto_slope =
true);
496 void changeSegmentLength(
int index,
498 bool scale_accels =
true);
509 void insertSegment(
int index,
513 void removeSegment(
int index);
518 bool clamp_slopes =
true);
521 void recomputeBezierCoeffs(
int start_index = 0,
int end_index = -1);
529 void shiftKey(
int index,
fpreal t,
bool recompute_coeffs =
true);
const UT_Array< CL_SimpleSegment > & getSegments() const
fpreal getPostSlope() const
GLsizei GLenum const void * indices
#define SYS_DEPRECATED(__V__)
GA_API const UT_StringHolder accel
imath_half_bits_t half
if we're in a C-only context, alias the half bits type to half
const UT_Array< UT_StringHolder > & getSegmentExpressions() const
CL_ChannelBehavior getPreType() const
int getNSegments() const
Returns the number of segments including the end segment.
GLsizei const GLfloat * value
void setPostType(CL_ChannelBehavior type)
static CL_SimpleSegmentType getDefaultSegmentType()
GLboolean GLboolean GLboolean GLboolean a
GLuint GLsizei GLsizei * length
UT_StringHolder getSegmentExpression(int index) const
void setPreType(CL_ChannelBehavior type)
GLfloat GLfloat GLfloat v2
GLfloat GLfloat GLfloat GLfloat v3
void setStart(fpreal start)
fpreal getEndValue() const
const CL_SimpleSegment & getSegment(int index) const
void setType(CL_SimpleSegmentType type)
void setDefaultValue(fpreal value)
int getSegmentInSlopeAuto(int index) const
void setSegmentInSlopeAuto(int index, bool value)
void setSegmentOutSlopeAuto(int index, bool value)
void setSegmentExpression(int index, const UT_StringHolder &expr)
fpreal getTolerance() const
void setExtraData(int index, fpreal data)
void setPreSlope(fpreal slope)
HUSD_API bool eval(VtValue &val, T &ret_val)
GLboolean GLboolean GLboolean b
CL_SimpleSegmentType getType() const
fpreal getDefaultValue() const
void setPreValue(fpreal value)
static CL_SimpleSegmentType getDefaultSegmentSplitType()
fpreal evalP(fpreal u) const
SIM_API const UT_StringHolder force
static void setChannelTolerance(fpreal tol)
CL_ChannelBehavior getPostType() const
fpreal getPreValue() const
static fpreal getChannelTolerance()
LeafData & operator=(const LeafData &)=delete
void setPostSlope(fpreal slope)
int getSegmentOutSlopeAuto(int index) const
fpreal getPreSlope() const
void OIIO_UTIL_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)
fpreal getPostValue() const
static bool getAutoSplit()
CL_SimpleSegment & getSegment(int index)
void setPostValue(fpreal value)
fpreal getStartValue() const