HDK
|
#include <CL_SimpleChannel.h>
Static Public Member Functions | |
static void | setChannelTolerance (fpreal tol) |
static void | setDefaultSegmentType (CL_SimpleSegmentType type) |
Set the segment type used for the first key in a channel. More... | |
static void | setDefaultSegmentSplitType (CL_SimpleSegmentType type) |
static void | setAutoSplit (bool onoff) |
static fpreal | getChannelTolerance () |
static CL_SimpleSegmentType | getDefaultSegmentType () |
static CL_SimpleSegmentType | getDefaultSegmentSplitType () |
static bool | getAutoSplit () |
A specialized channel for fast evaluation. Should be created from an existing CH_Channel using CH_Channel->asSimpleChannel(). Can be copied using the copy constructor. Doesn't store the in/out value/slope/accel directly. It stores precomputed bezier coefficient to avoid doing the conversion at each evaluation. Also uses UT_BezierRootFinder with precomputed coefficients to speed up CL_Cubic::reverseEvalP.
Definition at line 246 of file CL_SimpleChannel.h.
CL_SimpleChannel::CL_SimpleChannel | ( | ) |
CL_SimpleChannel::CL_SimpleChannel | ( | fpreal | start, |
int | num_segments, | ||
fpreal | length, | ||
CL_ChannelBehavior | left_type, | ||
CL_ChannelBehavior | right_type, | ||
fpreal | default_value, | ||
fpreal | default_slope | ||
) |
CL_SimpleChannel::CL_SimpleChannel | ( | fpreal | start, |
int | num_segments, | ||
fpreal | length, | ||
CL_ChannelBehavior | left_type, | ||
CL_ChannelBehavior | right_type, | ||
fpreal | default_value, | ||
fpreal | default_slope, | ||
fpreal | tolerance | ||
) |
|
default |
|
default |
|
default |
void CL_SimpleChannel::clear | ( | ) |
clears the channel, erasing all segments
bool CL_SimpleChannel::destroyKeyFrame | ( | fpreal | global_time | ) |
Destroy the key frame at the given global time Returns true if a key was deleted, or false if there was no key at this time
fpreal CL_SimpleChannel::eval | ( | const CL_SimpleSegment & | seg, |
fpreal | ltime | ||
) | const |
fpreal CL_SimpleChannel::evalSlope | ( | const CL_SimpleSegment & | seg, |
fpreal | ltime | ||
) | const |
|
inlinestatic |
Definition at line 461 of file CL_SimpleChannel.h.
|
inlinestatic |
Definition at line 453 of file CL_SimpleChannel.h.
|
inlinestatic |
Definition at line 458 of file CL_SimpleChannel.h.
|
inlinestatic |
Definition at line 455 of file CL_SimpleChannel.h.
|
inline |
Definition at line 396 of file CL_SimpleChannel.h.
|
inline |
Definition at line 413 of file CL_SimpleChannel.h.
|
inline |
Definition at line 414 of file CL_SimpleChannel.h.
|
inline |
Returns the number of segments including the end segment.
Definition at line 418 of file CL_SimpleChannel.h.
|
inline |
Definition at line 403 of file CL_SimpleChannel.h.
|
inline |
Definition at line 404 of file CL_SimpleChannel.h.
|
inline |
Definition at line 402 of file CL_SimpleChannel.h.
|
inline |
Definition at line 399 of file CL_SimpleChannel.h.
|
inline |
Definition at line 400 of file CL_SimpleChannel.h.
|
inline |
Definition at line 398 of file CL_SimpleChannel.h.
|
inline |
Definition at line 297 of file CL_SimpleChannel.h.
|
inline |
Definition at line 298 of file CL_SimpleChannel.h.
|
inline |
Definition at line 301 of file CL_SimpleChannel.h.
|
inline |
Definition at line 302 of file CL_SimpleChannel.h.
Definition at line 306 of file CL_SimpleChannel.h.
Definition at line 308 of file CL_SimpleChannel.h.
|
inline |
Definition at line 299 of file CL_SimpleChannel.h.
CL_SimpleSegmentType CL_SimpleChannel::getSegmentType | ( | int | index | ) | const |
|
inline |
Definition at line 412 of file CL_SimpleChannel.h.
bool CL_SimpleChannel::getSurroundingSegs | ( | fpreal | gtime, |
CL_SimpleSegment *& | left, | ||
CL_SimpleSegment *& | right | ||
) |
|
inline |
Definition at line 406 of file CL_SimpleChannel.h.
bool CL_SimpleChannel::insertKeyFrame | ( | fpreal | global_time, |
bool | auto_slope = true |
||
) |
Insert a key frame at the given global time. Returns true if a key frame was added, or false if it failed, or if there was already a key frame at the given time.
bool CL_SimpleChannel::isAtHardKey | ( | fpreal | gtime | ) | const |
bool CL_SimpleChannel::moveKeysWithDeltas | ( | const UT_IntArray & | indices, |
const UT_Array< fpreal > & | time_offsets | ||
) |
Shift the specified keys by the given time offsets. Time offsets must either match the size of indices, or be an array of 1 element to shift all keys by the same offset.
|
default |
|
default |
|
static |
Set the segment type behaviour when splitting a segment. If true, The type of the split segment will be applied to the new segment, otherwise, theDefaultSplitSegmentType will be used
Definition at line 442 of file CL_SimpleChannel.h.
|
static |
Set the segment type used when splitting a segment if auto split is false
|
static |
Set the segment type used for the first key in a channel.
Set the default value. This is the value returned when evaluating an empty channel.
Definition at line 386 of file CL_SimpleChannel.h.
bool CL_SimpleChannel::setKeyAccel | ( | fpreal | gtime, |
fpreal | accel, | ||
CL_KeyHalf | half = CL_KeyHalf::InOut |
||
) |
Set the accel of the key at the given time
gtime | Global time of the key to change |
accel | New value to set for the key |
half | Which half of the key to set. Defaults to both (tied) |
bool CL_SimpleChannel::setKeyAutoSlope | ( | fpreal | gtime, |
bool | auto_slope, | ||
CL_KeyHalf | half = CL_KeyHalf::InOut |
||
) |
Set the auto_slope property of the key at the given time
gtime | Global time of the key to change |
auto_slope | New auto_slope to set for the key |
half | Which half of the key to set. Defaults to both (tied) |
bool CL_SimpleChannel::setKeySlope | ( | fpreal | gtime, |
fpreal | slope, | ||
CL_KeyHalf | half = CL_KeyHalf::InOut |
||
) |
Set the slope of the key at the given time
gtime | Global time of the key to change |
slope | New slope to set for the key |
half | Which half of the key to set. Defaults to both (tied) |
bool CL_SimpleChannel::setKeyValue | ( | fpreal | gtime, |
fpreal | value, | ||
CL_KeyHalf | half = CL_KeyHalf::InOut |
||
) |
Set the value of the key at the given time
gtime | Global time of the key to change |
value | New value to set for the key |
half | Which half of the key to set. Defaults to both (tied) |
Definition at line 393 of file CL_SimpleChannel.h.
|
inline |
Definition at line 394 of file CL_SimpleChannel.h.
Definition at line 392 of file CL_SimpleChannel.h.
Definition at line 389 of file CL_SimpleChannel.h.
|
inline |
Definition at line 390 of file CL_SimpleChannel.h.
Definition at line 388 of file CL_SimpleChannel.h.
bool CL_SimpleChannel::setRawValues | ( | fpreal | from, |
fpreal | to, | ||
fpreal * | data, | ||
int | num_samples, | ||
bool | auto_slope = true |
||
) |
Sets data evenly spaced between from and to.
Sets data at the specified times.
|
inline |
Definition at line 303 of file CL_SimpleChannel.h.
Definition at line 311 of file CL_SimpleChannel.h.
Definition at line 313 of file CL_SimpleChannel.h.
void CL_SimpleChannel::setSegmentType | ( | int | index, |
CL_SimpleSegmentType | type | ||
) |
Set the type of the segment Note that this differs from the setSegmentExpression, which is used only for custom expressions.
index | The index of the segment to modify |
type | The type to change the segment to. |
Definition at line 416 of file CL_SimpleChannel.h.
Definition at line 410 of file CL_SimpleChannel.h.
void CL_SimpleChannel::smoothAutoSlopes | ( | bool | force = false | ) |
void CL_SimpleChannel::smoothAutoSlopesForSegments | ( | UT_RLEBitArray & | slope_flags, |
bool | force = false , |
||
fpreal | max_delta = -1 |
||
) |