HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CH_Segment Class Reference

#include <CH_Segment.h>

Public Member Functions

 CH_Segment (CH_Channel *mom)
 
 CH_Segment (fpreal def_val, CH_Channel *mom, fpreal len=0)
 
 CH_Segment (const CH_Segment &from)
 
 CH_Segment (const CL_SimpleSegment &from, CH_Channel *mom, const char *expr, CH_ExprLanguage language)
 
 CH_Segment (const char *expr, CH_ExprLanguage language, CH_Channel *mom, fpreal len=0)
 
 ~CH_Segment ()
 
int64 getMemoryUsage (bool inclusive) const
 
CH_ManagergetManager () const
 
fpreal getTolerance () const
 
void save (std::ostream &os, int binary, bool compiled, bool disabled) const
 
template<typename FPREAL_TYPE >
bool load (UT_IStream &is, bool disabled, bool reload=false)
 
CH_Segmentoperator= (const CH_Segment &from)
 
int operator== (const CH_Segment &)
 
fpreal evaluate (int thread)
 
void evaluateString (UT_String &result, int thread)
 
void unresolveLocalVars (int thread)
 
CH_ChannelgetChannel () const
 
void setChannel (CH_Channel *chp)
 
void setExprLanguage (CH_ExprLanguage language)
 
CH_ExprLanguage getExprLanguage () const
 
CH_StringMeaning getStringMeaning ()
 
int isMatchFunction () const
 
int isLockedSegment () const
 
int isChopSegment () const
 
CH_SegmentFlags getFlags () const
 
void lockLength (int onoff)
 
void lockStart (int onoff)
 
void lockEnd (int onoff)
 
void tieInValue (int onoff, bool dotie=true)
 
void tieOutValue (int onoff, bool dotie=true)
 
void tieInSlope (int onoff, bool dotie=true, fpreal ar=0.0)
 
void tieOutSlope (int onoff, bool dotie=true, fpreal ar=0.0)
 
void tieInAccel (int onoff, bool dotie=true)
 
void tieOutAccel (int onoff, bool dotie=true)
 
void autoInSlope (int onoff)
 
void autoOutSlope (int onoff)
 
void cook (int state, int unused=0)
 
int isCooking () const
 
int isLengthLocked () const
 
int isStartLocked () const
 
int isEndLocked () const
 
int isInValueTied () const
 
int isOutValueTied () const
 
int isInSlopeTied () const
 
int isOutSlopeTied () const
 
int isInAccelTied () const
 
int isOutAccelTied () const
 
int isConstant () const
 
int isCubic () const
 
int isQuintic () const
 
int isBezier () const
 
int isLinear () const
 
int isQLinear () const
 
int isQCubic () const
 
int isEase () const
 
int isEaseIn () const
 
int isEaseOut () const
 
int isQuaternion () const
 
bool isStandard () const
 
bool treatExtendAsHold () const
 
bool hasFakeSlopeHandles () const
 
bool hasFakeAccelHandles () const
 
int isInSlopeAuto () const
 
int isOutSlopeAuto () const
 
bool isInSlopeFixed (bool force) const
 
bool isOutSlopeFixed (bool force) const
 
int isInValueUsed ()
 
int isOutValueUsed ()
 
int isInSlopeUsed ()
 
int isOutSlopeUsed ()
 
int isInAccelUsed ()
 
int isOutAccelUsed ()
 
int isSplineUsed ()
 
bool getFunctionKeyUserFlags (int thread, unsigned &flags)
 
bool computeFastTimeDep (bool &is_special) const
 
bool isTimeDependent () const
 
bool isTimeDependentAndGetValue (fpreal &value, int thread) const
 
bool isTimeDependentAndGetValue (UT_DeepString &value, int thread) const
 
bool hasNonIntegerKeys () const
 
unsigned isDataDependent () const
 
int canChange (fpreal start, fpreal end) const
 
void changeLength (fpreal len, CH_SegmentScale how=CH_SCALE_ANY, bool accel_ratio=true)
 
void changeTimes (fpreal s, fpreal e)
 
void stretch (fpreal scale, int adjust_slopes, int adjust_accel)
 
const char * getExpression () const
 
const CH_ExpressiongetCHExpr () const
 
CH_ExpressiongetCHExpr ()
 
bool isEndSegment () const
 
fpreal getInValue () const
 
fpreal getOutValue () const
 
fpreal getInSlope () const
 
fpreal getOutSlope () const
 
fpreal getInAccel () const
 
fpreal getOutAccel () const
 
fpreal getInAccelRatio () const
 
fpreal getOutAccelRatio () const
 
CH_SegmentgetNext ()
 
const CH_SegmentgetNext () const
 
void setNext (CH_Segment *segp)
 
CH_SegmentgetPrev ()
 
const CH_SegmentgetPrev () const
 
void setPrev (CH_Segment *segp)
 
fpreal getLength () const
 
fpreal getILength () const
 
fpreal getStart () const
 
fpreal getEnd () const
 
fpreal relativeTime (fpreal t) const
 
void changeExpression (const char *expr, CH_ExprLanguage language, bool convert_accels, bool post_process=true)
 
void changeExpression (const char *expr, CH_ExprLanguage language)
 
void changeExpressionToBezierOrCubic ()
 
bool expressionIsAnimationFunctionCall ()
 
void setInValue (fpreal v, bool dotie=true)
 
void setOutValue (fpreal v, bool dotie=true)
 
void setInSlope (fpreal v, bool dotie=true, fpreal ar=0.0)
 
void setOutSlope (fpreal v, bool dotie=true, fpreal ar=0.0)
 
void setInAccel (fpreal v, bool dotie=true)
 
void setOutAccel (fpreal v, bool dotie=true)
 
void setInAccelRatio (fpreal ratio, bool dotie=true)
 
void setOutAccelRatio (fpreal ratio, bool dotie=true)
 
void clampInAccel ()
 
void clampOutAccel ()
 
void normalizeAccels ()
 
void postProcessFakeSlopeAccelHandles ()
 
void postProcessHybridSlopes ()
 
void makeMonotone (bool do_prev=false, bool do_next=false)
 
bool isMonotone () const
 
bool getMonotoneInterval (UT_IntervalR &range, bool lock_in)
 
void setPrevNext (CH_Segment *p, CH_Segment *n)
 
void setChanged ()
 
void reverse ()
 
void buildOpDependencies (void *ref_id, int thread)
 
int changeOpRef (const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name, int thread)
 
int findString (const char *str, bool fullword, bool usewildcards) const
 
int changeString (const char *from, const char *to, bool fullword, int thread)
 
void transferGroup (CH_Segment &from)
 
bool wasModified () const
 
void setModified (bool on_off)
 
void dirtyExprCache ()
 
fpreal getValue (bool left, CH_ValueTypes t) const
 
void setValue (bool left, CH_ValueTypes t, fpreal value)
 
bool getValueValid (bool left, CH_ValueTypes t)
 
bool getValueTied (bool left, CH_ValueTypes t) const
 
void setValueTied (bool left, CH_ValueTypes t, bool on_off)
 
bool getValueAuto (bool left, CH_ValueTypes t) const
 
void setValueAuto (bool left, CH_ValueTypes t, bool on_off)
 
void display ()
 
CH_TimeGroupgetTimeGroup () const
 
CL_SimpleSegmentType getSimpleType () const
 
CL_SegmentValues getSegmentValues () const
 

Static Public Member Functions

static fpreal getAccelRatio (fpreal slope, fpreal accel, fpreal length)
 
static fpreal getAccelFromRatio (fpreal slope, fpreal ratio, fpreal length)
 
static fpreal getAccelX (fpreal slope, fpreal accel)
 
static bool expressionIsAnimationFunctionCall (const char *expression)
 
static const char * getExpressionFromSimpleType (CL_SimpleSegmentType type)
 

Friends

class CH_TimeGroup
 

Detailed Description

Definition at line 106 of file CH_Segment.h.

Constructor & Destructor Documentation

CH_Segment::CH_Segment ( CH_Channel mom)
CH_Segment::CH_Segment ( fpreal  def_val,
CH_Channel mom,
fpreal  len = 0 
)
CH_Segment::CH_Segment ( const CH_Segment from)
CH_Segment::CH_Segment ( const CL_SimpleSegment from,
CH_Channel mom,
const char *  expr,
CH_ExprLanguage  language 
)
CH_Segment::CH_Segment ( const char *  expr,
CH_ExprLanguage  language,
CH_Channel mom,
fpreal  len = 0 
)
CH_Segment::~CH_Segment ( )

Member Function Documentation

void CH_Segment::autoInSlope ( int  onoff)
void CH_Segment::autoOutSlope ( int  onoff)
void CH_Segment::buildOpDependencies ( void ref_id,
int  thread 
)
int CH_Segment::canChange ( fpreal  start,
fpreal  end 
) const
void CH_Segment::changeExpression ( const char *  expr,
CH_ExprLanguage  language,
bool  convert_accels,
bool  post_process = true 
)
void CH_Segment::changeExpression ( const char *  expr,
CH_ExprLanguage  language 
)
void CH_Segment::changeExpressionToBezierOrCubic ( )
void CH_Segment::changeLength ( fpreal  len,
CH_SegmentScale  how = CH_SCALE_ANY,
bool  accel_ratio = true 
)
int CH_Segment::changeOpRef ( const char *  new_fullpath,
const char *  old_fullpath,
const char *  old_cwd,
const char *  chan_name,
const char *  old_chan_name,
int  thread 
)
int CH_Segment::changeString ( const char *  from,
const char *  to,
bool  fullword,
int  thread 
)
void CH_Segment::changeTimes ( fpreal  s,
fpreal  e 
)
void CH_Segment::clampInAccel ( )
void CH_Segment::clampOutAccel ( )
bool CH_Segment::computeFastTimeDep ( bool &  is_special) const
inline

Definition at line 507 of file CH_Segment.h.

void CH_Segment::cook ( int  state,
int  unused = 0 
)
void CH_Segment::dirtyExprCache ( )
void CH_Segment::display ( )
fpreal CH_Segment::evaluate ( int  thread)
void CH_Segment::evaluateString ( UT_String result,
int  thread 
)
static bool CH_Segment::expressionIsAnimationFunctionCall ( const char *  expression)
static
bool CH_Segment::expressionIsAnimationFunctionCall ( )
int CH_Segment::findString ( const char *  str,
bool  fullword,
bool  usewildcards 
) const
static fpreal CH_Segment::getAccelFromRatio ( fpreal  slope,
fpreal  ratio,
fpreal  length 
)
inlinestatic

Definition at line 320 of file CH_Segment.h.

static fpreal CH_Segment::getAccelRatio ( fpreal  slope,
fpreal  accel,
fpreal  length 
)
static
static fpreal CH_Segment::getAccelX ( fpreal  slope,
fpreal  accel 
)
static
CH_Channel* CH_Segment::getChannel ( ) const
inline

Definition at line 152 of file CH_Segment.h.

const CH_Expression* CH_Segment::getCHExpr ( ) const
inline

Definition at line 295 of file CH_Segment.h.

CH_Expression* CH_Segment::getCHExpr ( )
inline

Definition at line 296 of file CH_Segment.h.

fpreal CH_Segment::getEnd ( ) const
inline

Definition at line 342 of file CH_Segment.h.

const char* CH_Segment::getExpression ( ) const
static const char* CH_Segment::getExpressionFromSimpleType ( CL_SimpleSegmentType  type)
static
CH_ExprLanguage CH_Segment::getExprLanguage ( ) const
CH_SegmentFlags CH_Segment::getFlags ( ) const
inline

Definition at line 167 of file CH_Segment.h.

bool CH_Segment::getFunctionKeyUserFlags ( int  thread,
unsigned &  flags 
)
fpreal CH_Segment::getILength ( ) const
inline

Definition at line 339 of file CH_Segment.h.

fpreal CH_Segment::getInAccel ( ) const
inline

Definition at line 306 of file CH_Segment.h.

fpreal CH_Segment::getInAccelRatio ( ) const
inline

Definition at line 308 of file CH_Segment.h.

fpreal CH_Segment::getInSlope ( ) const
inline

Definition at line 304 of file CH_Segment.h.

fpreal CH_Segment::getInValue ( ) const
inline

Definition at line 302 of file CH_Segment.h.

fpreal CH_Segment::getLength ( ) const
inline

Definition at line 338 of file CH_Segment.h.

CH_Manager* CH_Segment::getManager ( ) const
int64 CH_Segment::getMemoryUsage ( bool  inclusive) const
bool CH_Segment::getMonotoneInterval ( UT_IntervalR range,
bool  lock_in 
)

For segments that are not cubic or bezier, sets range to the entire slope interval, (-CH_MAX_SLOPE, CH_MAX_SLOPE), and returns false

CH_Segment* CH_Segment::getNext ( )
inline

Definition at line 329 of file CH_Segment.h.

const CH_Segment* CH_Segment::getNext ( ) const
inline

Definition at line 330 of file CH_Segment.h.

fpreal CH_Segment::getOutAccel ( ) const
inline

Definition at line 307 of file CH_Segment.h.

fpreal CH_Segment::getOutAccelRatio ( ) const
inline

Definition at line 313 of file CH_Segment.h.

fpreal CH_Segment::getOutSlope ( ) const
inline

Definition at line 305 of file CH_Segment.h.

fpreal CH_Segment::getOutValue ( ) const
inline

Definition at line 303 of file CH_Segment.h.

CH_Segment* CH_Segment::getPrev ( )
inline

Definition at line 333 of file CH_Segment.h.

const CH_Segment* CH_Segment::getPrev ( ) const
inline

Definition at line 334 of file CH_Segment.h.

CL_SegmentValues CH_Segment::getSegmentValues ( ) const
CL_SimpleSegmentType CH_Segment::getSimpleType ( ) const
fpreal CH_Segment::getStart ( ) const
inline

Definition at line 341 of file CH_Segment.h.

CH_StringMeaning CH_Segment::getStringMeaning ( )
CH_TimeGroup* CH_Segment::getTimeGroup ( ) const
inline

Definition at line 441 of file CH_Segment.h.

fpreal CH_Segment::getTolerance ( ) const
fpreal CH_Segment::getValue ( bool  left,
CH_ValueTypes  t 
) const
bool CH_Segment::getValueAuto ( bool  left,
CH_ValueTypes  t 
) const
bool CH_Segment::getValueTied ( bool  left,
CH_ValueTypes  t 
) const
bool CH_Segment::getValueValid ( bool  left,
CH_ValueTypes  t 
)
bool CH_Segment::hasFakeAccelHandles ( ) const
inline

Definition at line 229 of file CH_Segment.h.

bool CH_Segment::hasFakeSlopeHandles ( ) const
inline

Definition at line 222 of file CH_Segment.h.

bool CH_Segment::hasNonIntegerKeys ( ) const
int CH_Segment::isBezier ( ) const
inline

Definition at line 199 of file CH_Segment.h.

int CH_Segment::isChopSegment ( ) const
inline

Definition at line 165 of file CH_Segment.h.

int CH_Segment::isConstant ( ) const
inline

Definition at line 196 of file CH_Segment.h.

int CH_Segment::isCooking ( ) const
inline

Definition at line 186 of file CH_Segment.h.

int CH_Segment::isCubic ( ) const
inline

Definition at line 197 of file CH_Segment.h.

unsigned CH_Segment::isDataDependent ( ) const
int CH_Segment::isEase ( ) const
inline

Definition at line 203 of file CH_Segment.h.

int CH_Segment::isEaseIn ( ) const
inline

Definition at line 204 of file CH_Segment.h.

int CH_Segment::isEaseOut ( ) const
inline

Definition at line 205 of file CH_Segment.h.

int CH_Segment::isEndLocked ( ) const
inline

Definition at line 189 of file CH_Segment.h.

bool CH_Segment::isEndSegment ( ) const
inline

Definition at line 298 of file CH_Segment.h.

int CH_Segment::isInAccelTied ( ) const
inline

Definition at line 194 of file CH_Segment.h.

int CH_Segment::isInAccelUsed ( )
int CH_Segment::isInSlopeAuto ( ) const
inline

Definition at line 232 of file CH_Segment.h.

bool CH_Segment::isInSlopeFixed ( bool  force) const
int CH_Segment::isInSlopeTied ( ) const
inline

Definition at line 192 of file CH_Segment.h.

int CH_Segment::isInSlopeUsed ( )
int CH_Segment::isInValueTied ( ) const
inline

Definition at line 190 of file CH_Segment.h.

int CH_Segment::isInValueUsed ( )
int CH_Segment::isLengthLocked ( ) const
inline

Definition at line 187 of file CH_Segment.h.

int CH_Segment::isLinear ( ) const
inline

Definition at line 200 of file CH_Segment.h.

int CH_Segment::isLockedSegment ( ) const
inline

Definition at line 164 of file CH_Segment.h.

int CH_Segment::isMatchFunction ( ) const
bool CH_Segment::isMonotone ( ) const
int CH_Segment::isOutAccelTied ( ) const
inline

Definition at line 195 of file CH_Segment.h.

int CH_Segment::isOutAccelUsed ( )
int CH_Segment::isOutSlopeAuto ( ) const
inline

Definition at line 233 of file CH_Segment.h.

bool CH_Segment::isOutSlopeFixed ( bool  force) const
int CH_Segment::isOutSlopeTied ( ) const
inline

Definition at line 193 of file CH_Segment.h.

int CH_Segment::isOutSlopeUsed ( )
int CH_Segment::isOutValueTied ( ) const
inline

Definition at line 191 of file CH_Segment.h.

int CH_Segment::isOutValueUsed ( )
int CH_Segment::isQCubic ( ) const
inline

Definition at line 202 of file CH_Segment.h.

int CH_Segment::isQLinear ( ) const
inline

Definition at line 201 of file CH_Segment.h.

int CH_Segment::isQuaternion ( ) const
inline

Definition at line 207 of file CH_Segment.h.

int CH_Segment::isQuintic ( ) const
inline

Definition at line 198 of file CH_Segment.h.

int CH_Segment::isSplineUsed ( )
bool CH_Segment::isStandard ( ) const
inline

Definition at line 209 of file CH_Segment.h.

int CH_Segment::isStartLocked ( ) const
inline

Definition at line 188 of file CH_Segment.h.

bool CH_Segment::isTimeDependent ( ) const
inline

Definition at line 260 of file CH_Segment.h.

bool CH_Segment::isTimeDependentAndGetValue ( fpreal value,
int  thread 
) const
inline
bool CH_Segment::isTimeDependentAndGetValue ( UT_DeepString value,
int  thread 
) const
inline
template<typename FPREAL_TYPE >
bool CH_Segment::load ( UT_IStream is,
bool  disabled,
bool  reload = false 
)
void CH_Segment::lockEnd ( int  onoff)
inline

Definition at line 170 of file CH_Segment.h.

void CH_Segment::lockLength ( int  onoff)
inline

Definition at line 168 of file CH_Segment.h.

void CH_Segment::lockStart ( int  onoff)
inline

Definition at line 169 of file CH_Segment.h.

void CH_Segment::makeMonotone ( bool  do_prev = false,
bool  do_next = false 
)
void CH_Segment::normalizeAccels ( )
CH_Segment& CH_Segment::operator= ( const CH_Segment from)
int CH_Segment::operator== ( const CH_Segment )
inline

Definition at line 143 of file CH_Segment.h.

void CH_Segment::postProcessFakeSlopeAccelHandles ( )
void CH_Segment::postProcessHybridSlopes ( )
fpreal CH_Segment::relativeTime ( fpreal  t) const
inline

Definition at line 344 of file CH_Segment.h.

void CH_Segment::reverse ( )
void CH_Segment::save ( std::ostream &  os,
int  binary,
bool  compiled,
bool  disabled 
) const
void CH_Segment::setChanged ( )
void CH_Segment::setChannel ( CH_Channel chp)
inline

Definition at line 153 of file CH_Segment.h.

void CH_Segment::setExprLanguage ( CH_ExprLanguage  language)
void CH_Segment::setInAccel ( fpreal  v,
bool  dotie = true 
)
void CH_Segment::setInAccelRatio ( fpreal  ratio,
bool  dotie = true 
)
inline

Definition at line 371 of file CH_Segment.h.

void CH_Segment::setInSlope ( fpreal  v,
bool  dotie = true,
fpreal  ar = 0.0 
)
void CH_Segment::setInValue ( fpreal  v,
bool  dotie = true 
)
void CH_Segment::setModified ( bool  on_off)
void CH_Segment::setNext ( CH_Segment segp)
inline

Definition at line 331 of file CH_Segment.h.

void CH_Segment::setOutAccel ( fpreal  v,
bool  dotie = true 
)
void CH_Segment::setOutAccelRatio ( fpreal  ratio,
bool  dotie = true 
)
inline

Definition at line 377 of file CH_Segment.h.

void CH_Segment::setOutSlope ( fpreal  v,
bool  dotie = true,
fpreal  ar = 0.0 
)
void CH_Segment::setOutValue ( fpreal  v,
bool  dotie = true 
)
void CH_Segment::setPrev ( CH_Segment segp)
inline

Definition at line 335 of file CH_Segment.h.

void CH_Segment::setPrevNext ( CH_Segment p,
CH_Segment n 
)
inline

Definition at line 397 of file CH_Segment.h.

void CH_Segment::setValue ( bool  left,
CH_ValueTypes  t,
fpreal  value 
)
void CH_Segment::setValueAuto ( bool  left,
CH_ValueTypes  t,
bool  on_off 
)
void CH_Segment::setValueTied ( bool  left,
CH_ValueTypes  t,
bool  on_off 
)
void CH_Segment::stretch ( fpreal  scale,
int  adjust_slopes,
int  adjust_accel 
)
void CH_Segment::tieInAccel ( int  onoff,
bool  dotie = true 
)
void CH_Segment::tieInSlope ( int  onoff,
bool  dotie = true,
fpreal  ar = 0.0 
)
void CH_Segment::tieInValue ( int  onoff,
bool  dotie = true 
)
void CH_Segment::tieOutAccel ( int  onoff,
bool  dotie = true 
)
void CH_Segment::tieOutSlope ( int  onoff,
bool  dotie = true,
fpreal  ar = 0.0 
)
void CH_Segment::tieOutValue ( int  onoff,
bool  dotie = true 
)
void CH_Segment::transferGroup ( CH_Segment from)
bool CH_Segment::treatExtendAsHold ( ) const
inline

Definition at line 219 of file CH_Segment.h.

void CH_Segment::unresolveLocalVars ( int  thread)
bool CH_Segment::wasModified ( ) const
inline

Definition at line 426 of file CH_Segment.h.

Friends And Related Function Documentation

friend class CH_TimeGroup
friend

Definition at line 503 of file CH_Segment.h.


The documentation for this class was generated from the following file: