HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CL_SimpleChannel.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: Channel Library (C++)
7  *
8  * COMMENTS: Simplified version of a channel which can be used without
9  * requiring the full CH library
10  *
11 */
12 
13 #ifndef __CL_SimpleChannel_h__
14 #define __CL_SimpleChannel_h__
15 
16 #include "CL_API.h"
17 #include "CL_Types.h"
18 
19 #include <SYS/SYS_Types.h>
20 #include <UT/UT_Array.h>
21 #include <UT/UT_Interval.h>
22 #include <UT/UT_StringHolder.h>
23 
24 class CL_SegmentValues;
25 class CL_SimpleSegment;
26 class CL_Cubic;
27 
28 class UT_RLEBitArray;
29 
31 {
32 public:
33  fpreal x[4];
34  fpreal y[4];
35 
36  CL_Bezier() {}
37 
38  CL_Bezier(const CL_SegmentValues &sv);
39  CL_Bezier(CL_SegmentValues sv, fpreal vscale, fpreal voff);
40  // This constructor can be used to convert segment values to a bezier
41  // without applying the clamp to the control points which is meant to fix
42  // curves that back in on themselves. We want to prevent this clamping when
43  // converting the end_segment. As it has has a length of 0, clamping will
44  // cause us to lose its control points/acceleration handles.
45  CL_Bezier(const CL_SegmentValues &sv, bool clamp_slopes);
46 
47  void init(const CL_SegmentValues &sv);
48 
49  void fromSegmentValues(const CL_SegmentValues &sv,
50  bool clamp_slopes = true);
51 
52  void getValues( CL_SegmentValues &v ) const;
53 
54  static void getCubicFromCVs( const fpreal x[4], CL_Cubic &c );
55  static void getCubicFromCVs( const fpreal x[4], fpreal c[4] );
56 
57  static void splitInternal( fpreal t, const fpreal xin[4],
58  fpreal xout1[4], fpreal xout2[4] );
59 
60  void splitP( fpreal u, CL_Bezier &a, CL_Bezier &b ) const;
61 
62  void split( fpreal t, CL_Bezier &a, CL_Bezier &b ) const;
63 
64  void splitAndFindSlopeLengths( fpreal t,
65  fpreal &left_in, fpreal &left_out,
66  fpreal &right_in, fpreal &right_out ) const;
67 
68  // Calculates an acceleration ratio for a key to try and ease
69  // the curve if it's at the corner of a steep gradient
70  static fpreal getAdjustedAccelRatio(fpreal v0, fpreal v1, fpreal v2,
71  fpreal t0, fpreal t1, fpreal t2,
72  fpreal slope, bool is_in);
73 
74  fpreal timeToParametric( fpreal t ) const;
75 
76  fpreal evalP( fpreal u ) const;
77 
78  fpreal eval( fpreal t ) const; // t is local
79 
80  void display() const;
81 };
82 
84 {
85 public:
86  fpreal t0, t1;
87  fpreal x0, x1, x2, x3;
88 
89  CL_Cubic() {};
90  CL_Cubic(const CL_SegmentValues &sv);
91  CL_Cubic(fpreal iv, fpreal ov, fpreal im, fpreal om, fpreal it, fpreal ot);
92 
93  void init(const CL_SegmentValues &sv);
94  void getValues(CL_SegmentValues &v) const;
95 
96  fpreal timeToParametric( fpreal t ) const; // t -> u
97 
98  static fpreal reverseEvalP( const fpreal x[4], fpreal y ); // y -> u
99  static fpreal reverseEvalP( const CL_SimpleSegment &seg, fpreal y ); // y -> u
100  fpreal reverseEvalP( fpreal y ) const; // y -> u
101 
102  fpreal evalP( fpreal u ) const // u -> y
103  {
104  return x0 + u*(x1 + u*(x2 + u*x3));
105  }
106 
107  fpreal eval( fpreal t ) const; // t -> y
108 
109  fpreal calculateSlopeP( fpreal u ) const;
110 
111  fpreal calculateAccelP( fpreal u ) const;
112 
113  // If lock_in = true, this computes the range of out slopes that produce
114  // a monotonic curve assuming the in slope is fixed. false does the same
115  // for the in slope assuming the out slope is fixed.
116  // If no such interval exists, sets range to (-CL_MAX_SLOPE, CL_MAX_SLOPE)
117  // and returns false. Returns true if there's a valid interval
118  bool getMonotoneInterval(UT_IntervalR &range, bool lock_in);
119  // Same as getMonotoneInterval, but if the interval doesn't exist then
120  // it is recalculated with the locked slope being clamped to a range where
121  // the interval must be non-empty.
122  // This is useful to find slopes that get as close as possible to
123  // monotonicity, which helps prevent snapping in some cases.
124  void getWeakMonotoneInterval(UT_IntervalR &range, bool lock_in);
125 
126 
127  static bool isMonotone(fpreal iv, fpreal ov, fpreal im, fpreal om, fpreal dt);
128  static void clampSlopesToMonotone(fpreal &in, fpreal &out,
129  fpreal in_val, fpreal out_val, fpreal dt);
130  /// Second derivative discontinuity minimizing method suggested by
131  /// Wolberg. Given the slopes at the surrounding knots, picks a
132  /// slope that gets as close to C2 continuity as possible while
133  /// preserving monotonicity. To be used on keys whose neighbours have
134  /// pre-determined slopes, like local extrema or non-auto slopes
135  static fpreal getMonotoneSlopeSDDE(fpreal v0, fpreal v1, fpreal v2,
136  fpreal t0, fpreal t1, fpreal t2,
137  fpreal m0, fpreal m2);
138  // An extension of getMonotoneSlopeSDDE that operates on a group of
139  // 2 keys sandwiched between knots with fixed slopes. Picks slopes for
140  // to approach C2 continuity at both knots simultaneously while
141  // preserving monotonicity
142  static void getMonotoneSlopeSDDE2(fpreal v0, fpreal v1, fpreal v2, fpreal v3,
143  fpreal t0, fpreal t1, fpreal t2, fpreal t3,
144  fpreal m0, fpreal &m1, fpreal &m2, fpreal m3);
145 
146  // An unstable extension of getMonotoneSlopeSDDE2 that uses conic intersections
147  // to resolve cases where the segments are non monotonic.
148  #if 0
149  static void getMonotoneSlopeSDDE2ViaConic
151  fpreal t0, fpreal t1, fpreal t2, fpreal t3,
152  fpreal m0, fpreal &m1, fpreal &m2, fpreal m3);
153  #endif
154 
155 
156  void display() const;
157 };
158 
159 // Supported SimpleSegment Types.
161 {
171  // Custom means an expression that is unsupported by
172  // the simple channel. The custom expression will be stored
173  // on the simpleSegment for purposes of preserving it when
174  // round-tripping back to a CH_Segment, but it will be
175  // evaluated as a Bezier instead of the actual type.
177 };
178 
179 class CL_SimpleChannel;
180 
181 enum class CL_KeyHalf
182 {
183  In,
184  Out,
185  InOut,
186 };
187 
189 {
190 public:
191  fpreal t0, t1;
192  fpreal iv, ov, im, om, isl, osl;
193 
195 
196  void display();
197 };
198 
199 // It is designed for fast evaluation of the supported segment types.
200 // with focus on the bezier segments.
202 {
203 public:
204  fpreal getStart() const { return myBezierX[0]; }
205  fpreal getEnd() const { return myBezierX[3]; }
206  fpreal getStartValue() const { return myBezierY[0]; }
207  fpreal getEndValue() const { return myBezierY[3]; }
208  fpreal getLength() const { return myBezierX[3] - myBezierX[0]; }
209 
210  void setType(CL_SimpleSegmentType type) { myType = type; }
211  CL_SimpleSegmentType getType() const { return myType; }
212 
213  void setExtraData(int index, fpreal data) { myExtra[index] = data; }
214  fpreal *getExtraData() { return myExtra; }
215 
216 private:
217 
218  //x[0] is the start time
219  //x[3] is the end time
220  //y[0] is the start value
221  //y[3] is the end value
222  fpreal myBezierX[4]; // x[] data member of CL_Bezier
223  fpreal myBezierY[4]; // y[] data member of CL_Bezier
224 
225  CL_SimpleSegmentType myType; // Simple Segment Type
226 
227  // Extra data for Bezier/Cubic/Quintic
228  // Bezier stores UT_BezierRootFinder precomputed coefficients
229  // Cubic stores InSlope and OutSlope
230  // Quintic stores InSlope, OutSlope, InAccel and OutAcce
231  fpreal myExtra[16];
232 
233  friend class CL_SimpleChannel;
234  friend class CL_Cubic;
235 };
236 
237 /// A specialized channel for fast evaluation.
238 /// Should be created from an existing CH_Channel using
239 /// CH_Channel->asSimpleChannel().
240 /// Can be copied using the copy constructor.
241 /// Doesn't store the in/out value/slope/accel directly.
242 /// It stores precomputed bezier coefficient to avoid doing the conversion at
243 /// each evaluation.
244 /// Also uses UT_BezierRootFinder with precomputed coefficients to speed up
245 /// CL_Cubic::reverseEvalP.
247 {
248 public:
249  // Create an empty channel
251 
253  fpreal start,
254  int num_segments,
255  fpreal length,
256  CL_ChannelBehavior left_type,
257  CL_ChannelBehavior right_type,
258  fpreal default_value,
259  fpreal default_slope);
260 
261  // Deprecated, use the variant without tolerance instead
262  SYS_DEPRECATED(20.0)
264  fpreal start,
265  int num_segments,
266  fpreal length,
267  CL_ChannelBehavior left_type,
268  CL_ChannelBehavior right_type,
269  fpreal default_value,
270  fpreal default_slope,
271  fpreal tolerance);
272 
273  ~CL_SimpleChannel() = default;
274 
275  CL_SimpleChannel(const CL_SimpleChannel &other) = default;
276  CL_SimpleChannel(CL_SimpleChannel &&other) = default;
277 
278  CL_SimpleChannel &operator=(const CL_SimpleChannel &other) = default;
279  CL_SimpleChannel &operator=(CL_SimpleChannel &&other) = default;
280 
281  // Evaluate the channel at global time.
282  fpreal eval(fpreal gtime) const;
283 
284  // Evaluate the channel at global time using a segment hint.
285  // Start with an hint of -1 if you don't have a previous evaluation.
286  fpreal eval(fpreal gtime, int &segment_idx_hint) const;
287 
288  // Evaluate the segment at local time using a segment hint.
289  fpreal eval(const CL_SimpleSegment &seg, fpreal ltime) const;
290 
291  // Evaluate the slope at local time using a segment hint.
292  fpreal evalSlope(const CL_SimpleSegment &seg, fpreal ltime) const;
293 
294  bool isAtHardKey(fpreal gtime) const;
295 
296  int getSegmentIdx(fpreal ltime) const;
297  CL_SimpleSegment &getSegment(int index) { return mySegments[index]; }
298  const CL_SimpleSegment &getSegment(int index) const { return mySegments[index]; }
299  const UT_Array<CL_SimpleSegment> &getSegments() const { return mySegments; }
300 
301  UT_StringHolder getSegmentExpression(int index) const { return mySegmentExpressions[index]; }
302  const UT_Array<UT_StringHolder> &getSegmentExpressions() const { return mySegmentExpressions; }
304  { mySegmentExpressions[index] = expr; }
305 
307  { return mySegmentInSlopesAuto[index]; }
309  { return mySegmentOutSlopesAuto[index]; }
310 
312  { mySegmentInSlopesAuto[index] = value; }
314  { mySegmentOutSlopesAuto[index] = value; }
315 
316  void setSegmentInSlope(int index, fpreal slope);
317  void setSegmentOutSlope(int index, fpreal slope);
318  void setSegmentInAccel(int index, fpreal accel, bool ratio = false);
319  void setSegmentOutAccel(int index, fpreal accel, bool ratio = false);
320 
321  /// Set the type of the segment
322  /// Note that this differs from the setSegmentExpression, which is used
323  /// only for custom expressions.
324  /// @param index The index of the segment to modify
325  /// @param type The type to change the segment to.
326  void setSegmentType(int index, CL_SimpleSegmentType type);
327 
328  CL_SimpleSegmentType getSegmentType(int index) const;
329 
330  /// Insert a key frame at the given global time.
331  /// Returns true if a key frame was added, or false if it failed, or if
332  /// there was already a key frame at the given time.
333  bool insertKeyFrame(fpreal global_time, bool auto_slope = true);
334  /// Destroy the key frame at the given global time
335  /// Returns true if a key was deleted, or false if there was no key at this
336  /// time
337  bool destroyKeyFrame(fpreal global_time);
338 
339  /// Set the value of the key at the given time
340  /// @param gtime Global time of the key to change
341  /// @param value New value to set for the key
342  /// @param half Which half of the key to set. Defaults to both (tied)
343  /// @returns true if successful, or false if there is no key at the given time
344  bool setKeyValue(fpreal gtime, fpreal value,
346 
347  /// Set the slope of the key at the given time
348  /// @param gtime Global time of the key to change
349  /// @param slope New slope to set for the key
350  /// @param half Which half of the key to set. Defaults to both (tied)
351  /// @returns true if successful, or false if there is no key at the given time
352  bool setKeySlope(fpreal gtime, fpreal slope,
354 
355  /// Set the accel of the key at the given time
356  /// @param gtime Global time of the key to change
357  /// @param accel New value to set for the key
358  /// @param half Which half of the key to set. Defaults to both (tied)
359  /// @returns true if successful, or false if there is no key at the given time
360  bool setKeyAccel(fpreal gtime, fpreal accel,
362 
363  /// Set the auto_slope property of the key at the given time
364  /// @param gtime Global time of the key to change
365  /// @param auto_slope New auto_slope to set for the key
366  /// @param half Which half of the key to set. Defaults to both (tied)
367  /// @returns true if successful, or false if there is no key at the given
368  /// time
369  bool setKeyAutoSlope(fpreal gtime, bool auto_slope,
371 
372  /// Sets data evenly spaced between from and to
373  bool setRawValues(fpreal from,
374  fpreal to,
375  fpreal *data,
376  int num_samples,
377  bool auto_slope = true);
378  /// Sets data at the specified times
379  bool setRawValues(fpreal *times, fpreal *data, int num_samples);
380 
381  /// clears the channel, erasing all segments
382  void clear();
383 
384  /// Set the default value. This is the value returned when evaluating
385  /// an empty channel.
386  void setDefaultValue(fpreal value) { myDefaultValue = value; }
387 
388  void setPreValue(fpreal value) { myPreValue = value; }
389  void setPreSlope(fpreal slope) { myPreSlope = slope; }
390  void setPreType(CL_ChannelBehavior type) { myPreType = type; }
391 
392  void setPostValue(fpreal value) { myPostValue = value; }
393  void setPostSlope(fpreal slope) { myPostSlope = slope; }
394  void setPostType(CL_ChannelBehavior type) { myPostType = type; }
395 
396  fpreal getDefaultValue() const { return myDefaultValue; }
397 
398  fpreal getPreValue() const { return myPreValue; }
399  fpreal getPreSlope() const { return myPreSlope; }
400  CL_ChannelBehavior getPreType() const { return myPreType; }
401 
402  fpreal getPostValue() const { return myPostValue; }
403  fpreal getPostSlope() const { return myPostSlope; }
404  CL_ChannelBehavior getPostType() const { return myPostType; }
405 
408 
409  SYS_DEPRECATED(20.0)
410  void setTolerance(fpreal tolerance) { myTolerance = tolerance; }
411 
412  fpreal getStart() const { return myStart; }
413  fpreal getEnd() const { return myStart + myLength; }
414  fpreal getLength() const { return myLength; }
415 
416  void setStart(fpreal start) { myStart = start; }
417  /// Returns the number of segments including the end segment
418  int getNSegments() const { return mySegments.size(); }
419 
420  UT_Array<fpreal> getKeyTimes() const;
421  UT_Array<fpreal> getKeyValues() const;
422 
423  bool getSurroundingSegs(fpreal gtime, CL_SimpleSegment *&left,
425 
426  /// Shift the specified keys by the given time offsets.
427  /// Time offsets must either match the size of indices, or be an array
428  /// of 1 element to shift all keys by the same offset.
429  bool moveKeysWithDeltas(const UT_IntArray &indices,
430  const UT_Array<fpreal> &time_offsets);
431 
432  void smoothAutoSlopesForSegments(
433  UT_RLEBitArray &slope_flags,
434  bool force = false,
435  fpreal max_delta = -1);
436 
437  void smoothAutoSlopes(bool force = false);
438 
439  // The following four functions are called by the CH_Manager to ensure
440  // simple channels share the same default animation preferences that
441  // regular channels do.
442  static void setChannelTolerance(fpreal tol) { theTolerance = tol; }
443  /// Set the segment type used for the first key in a channel
444  static void setDefaultSegmentType(CL_SimpleSegmentType type);
445  /// Set the segment type used when splitting a segment if auto split is
446  /// false
447  static void setDefaultSegmentSplitType(CL_SimpleSegmentType type);
448  /// Set the segment type behaviour when splitting a segment. If true,
449  /// The type of the split segment will be applied to the new segment,
450  /// otherwise, theDefaultSplitSegmentType will be used
451  static void setAutoSplit(bool onoff);
452 
453  static fpreal getChannelTolerance() { return theTolerance; }
454 
456  { return theDefaultSegmentType; }
457 
459  { return theDefaultSplitSegmentType; }
460 
461  static bool getAutoSplit() { return theAutoSplit; }
462 
463 private:
464  static fpreal theTolerance;
465  static constexpr fpreal theDefaultAccelRatio = 1.0 / 3.0;
466  static CL_SimpleSegmentType theDefaultSegmentType;
467  static CL_SimpleSegmentType theDefaultSplitSegmentType;
468  static bool theAutoSplit;
469 
470  // should be kept in sync with CH_Segment::getAccelFromRatio
471  static fpreal getAccelFromRatio(fpreal slope, fpreal ratio,
472  fpreal length)
473  {
474  if( length==0.0 )
475  length = 1.0;
476  return length * ratio * SYSsqrt( slope*slope + 1 );
477  }
478 
479  // These methods are adapted from CH_Segment::clamp{In,Out}Accel. They
480  // serve as an alternative to the clamp_slopes option in
481  // CL_Bezier::fromSegmentValues, clamping the acceleration instead of the
482  // slope.
483  /// Clamp a SegmentValues' in acceleration to fix a curve that would
484  /// back in on itself.
485  static fpreal clampSegmentValuesInAccel(const CL_SegmentValues &sv,
486  bool is_end_segment);
487  /// Clamp a SegmentValues' out acceleration to fix a curve that would
488  /// back in on itself.
489  static fpreal clampSegmentValuesOutAccel(const CL_SegmentValues &sv,
490  bool is_end_segment);
491 
492  bool extend(fpreal t, int &i, fpreal &ret) const;
493 
494  void splitSegment(fpreal gtime, bool auto_slope = true);
495  /// Change a segment's length, preserving its start time and in/out slopes
496  void changeSegmentLength(int index,
497  fpreal new_length,
498  bool scale_accels = true);
499 
500  // Methods for manipulating the segments array.
501  // Note that the following 4 functions do not change the segment data,
502  // But rather just ensure that the various arrays (segment, expression,
503  // in/out slope) are kept in sync when segments are moved.
504  // It is up to the caller to ensure that the segment values/times are
505  // correct when calling these methods.
506  void appendSegment(const CL_SimpleSegment &segment,
507  const UT_StringHolder &expr,
508  bool auto_slope);
509  void insertSegment(int index,
510  const CL_SimpleSegment &segment,
511  const UT_StringHolder &expr,
512  bool auto_slope);
513  void removeSegment(int index);
514 
515  CL_SegmentValues getValuesFromSegment(CL_SimpleSegment &segment);
516  void setSegmentFromValues(CL_SimpleSegment &segment,
517  const CL_SegmentValues &sv,
518  bool clamp_slopes = true);
519 
520  /// Recompute the bezier coeffs for each segment, in the given range
521  void recomputeBezierCoeffs(int start_index = 0, int end_index = -1);
522  void recomputeBezierCoeffs(CL_SimpleSegment &segment);
523 
524  /// Sets the extra data for the segment, based on its type.
525  void setSegmentExtraData(CL_SimpleSegment &segment);
526 
527  /// Moves a key/segment by the given time delta.
528  /// Requires that the new time does NOT have a key at it already
529  void shiftKey(int index, fpreal t, bool recompute_coeffs = true);
530 
531  /// Returns whether or not a segment is an end segment (ie, has length == 0)
532  bool isEndSegment(const CL_SimpleSegment &segment) const;
533 
534  // Compact array of segments.
535  // This data layout currently works well when evaluating a single channel
536  // many times across its whole time range.
537  // We might have to change the data layout to be more efficient
538  // at evaluating many channels at the same global time.
539  // This could involve a page system where segments from the same time range
540  // are from the area in memory same pool.
541  UT_Array<CL_SimpleSegment> mySegments;
542 
543  // Custom expressions for each segment with a type of CUSTOM.
544  // Stored for purposes of round-tripping back to CH_Channel only - these
545  // segments will still be evaluated as Beziers here.
546  UT_Array<UT_StringHolder> mySegmentExpressions;
547 
548  // Whether the in/out slope for each segment is auto calculated or not
549  // Stored for purposes of round-tripping back to a CH_Channel. These
550  // are currently not used when setting the key value of a simple channel.
551  // TODO(michaelf): Do we want to support auto-slope calculation when setting
552  // keys of simplechannels?
553  UT_Array<bool> mySegmentInSlopesAuto;
554  UT_Array<bool> mySegmentOutSlopesAuto;
555 
556  fpreal myTolerance; // Global floating point tolerance.
557  fpreal myLength; // Channel Length in time.
558  fpreal myStart; // Channel Start global time.
559 
560  // Constant value to be used if the channel is empty.
561  fpreal myDefaultValue;
562  // Precomputed values for pre/post extend.
563  fpreal myPreValue;
564  fpreal myPostValue;
565 
566  // Precomputed slope (or extra) for pre/post extend.
567  fpreal myPreSlope;
568  fpreal myPostSlope;
569 
570  // Pre/right types, used by extend()
571  CL_ChannelBehavior myPreType;
572  CL_ChannelBehavior myPostType;
573 };
574 
575 #endif
const UT_Array< CL_SimpleSegment > & getSegments() const
fpreal getPostSlope() const
GLsizei GLenum const void * indices
Definition: glcorearb.h:406
GLenum GLint * range
Definition: glcorearb.h:1925
#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
Definition: half.h:266
void
Definition: png.h:1083
GLint left
Definition: glcorearb.h:2005
GLboolean * data
Definition: glcorearb.h:131
const UT_Array< UT_StringHolder > & getSegmentExpressions() const
const GLdouble * v
Definition: glcorearb.h:837
CL_ChannelBehavior getPreType() const
GLuint start
Definition: glcorearb.h:475
int getNSegments() const
Returns the number of segments including the end segment.
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void setPostType(CL_ChannelBehavior type)
GLdouble right
Definition: glad.h:2817
static CL_SimpleSegmentType getDefaultSegmentType()
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
UT_StringHolder getSegmentExpression(int index) const
void setPreType(CL_ChannelBehavior type)
GLint y
Definition: glcorearb.h:103
fpreal getLength() const
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
void setStart(fpreal start)
fpreal getEndValue() const
GLdouble GLdouble x2
Definition: glad.h:2349
CL_SimpleSegmentType
const CL_SimpleSegment & getSegment(int index) const
void setType(CL_SimpleSegmentType type)
#define CL_API
Definition: CL_API.h:10
fpreal getEnd() const
void setDefaultValue(fpreal value)
fpreal * getExtraData()
int getSegmentInSlopeAuto(int index) const
void setSegmentInSlopeAuto(int index, bool value)
fpreal getStart() const
void setSegmentOutSlopeAuto(int index, bool value)
void setSegmentExpression(int index, const UT_StringHolder &expr)
fpreal getTolerance() const
CL_KeyHalf
void setExtraData(int index, fpreal data)
void setPreSlope(fpreal slope)
HUSD_API bool eval(VtValue &val, T &ret_val)
fpreal getEnd() const
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLint GLenum GLint x
Definition: glcorearb.h:409
CL_SimpleSegmentType getType() const
fpreal getDefaultValue() const
GLdouble t
Definition: glad.h:2397
GLfloat v0
Definition: glcorearb.h:816
CL_ChannelBehavior
Definition: CL_Types.h:18
void setPreValue(fpreal value)
static CL_SimpleSegmentType getDefaultSegmentSplitType()
fpreal getLength() const
fpreal evalP(fpreal u) const
SIM_API const UT_StringHolder force
static void setChannelTolerance(fpreal tol)
fpreal64 fpreal
Definition: SYS_Types.h:277
CL_ChannelBehavior getPostType() const
fpreal getPreValue() const
static fpreal getChannelTolerance()
LeafData & operator=(const LeafData &)=delete
void setPostSlope(fpreal slope)
GLuint index
Definition: glcorearb.h:786
GLfloat GLfloat v1
Definition: glcorearb.h:817
Definition: core.h:1131
int getSegmentOutSlopeAuto(int index) const
fpreal getPreSlope() const
fpreal getStart() 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()
type
Definition: core.h:1059
CL_SimpleSegment & getSegment(int index)
Definition: format.h:895
void setPostValue(fpreal value)
fpreal getStartValue() const