DzFloatProperty Class Reference
[Property Objects]

An animatible floating-point property. More...

Inheritance diagram for DzFloatProperty:

DzNumericProperty DzProperty DzBase QObject Object DzNumericNodeProperty List of all members.

Enumerations



enum  InterpolationType { LINEAR_INTERP, CONSTANT_INTERP, TCB_INTERP, HERMITE_INTERP }

Methods

void add (Number val, Boolean applyToDefault=true)
Number adjustValue (DzTime tm, Number val)
Number adjustValue (Number val)
void divide (Number val, Boolean applyToDefault=true)
Number getDefaultValue ()
Boolean getDisplayAsPercent ()
InterpolationType getKeyInterpolationType (Number i)
Number getKeyValue (Number i)
Number getLocalValue (DzTime tm)
Number getLocalValue ()
Number getMax ()
Number getMin ()
Number getRawValue (DzTime tm)
Number getRawValue ()
Number getSensitivity ()
Number getValue (DzTime tm)
Number getValue ()
void multiply (Number val, Boolean applyToDefault=true)
void setDefaultValue (Number val)
void setDisplayAsPercent (Boolean onOff)
void setKeyInterpolation (Number i, InterpolationType interp, Number param0, Number param1, Number param2)
void setKeyInterpolation (Number i, InterpolationType interp)
void setKeyValue (Number i, Number val)
void setMax (Number max)
void setMin (Number min)
void setMinMax (Number min, Number max)
void setSensitivity (Number sens)
void setValue (DzTime tm, Number val, InterpolationType interp, Number param0, Number param1, Number param2)
void setValue (DzTime tm, Number val, InterpolationType interp)
void setValue (DzTime tm, Number val)
void setValue (Number val)
void subtract (Number val, Boolean applyToDefault=true)

Constructors

 DzFloatProperty (String name, Boolean canAnimate, Boolean isUserProperty, Number initVal=0.0)
 DzFloatProperty ()

Signals

void displayAsPercentChanged ()
 Signature: "displayAsPercentChanged()"

Detailed Description

An animatible floating-point property.


Member Enumeration Documentation

enum DzFloatProperty::InterpolationType

The different types of key interpolation

Enumerator:
LINEAR_INTERP  Linear interpolation between key values
CONSTANT_INTERP  Constant interpolation between key values
TCB_INTERP  TCB (Kochanek-Bartels) Spline interpolation between key values
HERMITE_INTERP  Hermite Spline interpolation between key values


Constructor & Destructor Documentation

DzFloatProperty::DzFloatProperty (  ) 

Default Constructor. Creates a non-animatable, non-user property.

DzFloatProperty::DzFloatProperty ( String  name,
Boolean  canAnimate,
Boolean  isUserProperty,
Number  initVal = 0.0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
name The name of this property.
canAnimate If true, creates an animatable property.
isUserProperty If true, create a user property. User properties are properties that can be added/deleted by users.
initVal Sets the default value of this property.


Member Function Documentation

void DzFloatProperty::add ( Number  val,
Boolean  applyToDefault = true 
)

Adds the given value to all the key values.

Parameters:
val The addend for the values.
applyToDefault If true, val will also be added to the default value for the property.

Number DzFloatProperty::adjustValue ( DzTime  tm,
Number  val 
)

Adjust the value of the property at the given time based on the contribution of property controllers.

Parameters:
tm The scene time at which to adjust the value.
val The 'final' value desired for the property.
Returns:
A 'raw' value for the property that will result in the property having the given value with the current controllers.

Number DzFloatProperty::adjustValue ( Number  val  ) 

Adjust the value of the property based on the contribution of property controllers.

Parameters:
val The 'final' value desired for the property.
Returns:
A 'raw' value for the property that will result in the property having the given value with the current controllers.

DzFloatProperty::displayAsPercentChanged (  )  [signal]

Signature: "displayAsPercentChanged()"

Emitted if the way this property is displayed changed.

void DzFloatProperty::divide ( Number  val,
Boolean  applyToDefault = true 
)

Divides all key values by the given amount.

Parameters:
val The divisor for the values.
applyToDefault If true, the default value for the property will also be divided.

Number DzFloatProperty::getDefaultValue (  ) 

Returns:
The default value of the property.

Boolean DzFloatProperty::getDisplayAsPercent (  ) 

Returns:
true if this property should be displayed as a percentage, false if it is to be displayed as a decimal.

InterpolationType DzFloatProperty::getKeyInterpolationType ( Number  i  ) 

Parameters:
i The index of the key to get the interpolation values for.
Returns:
The type of interpolation performed for the i'th key in the property.

Number DzFloatProperty::getKeyValue ( Number  i  ) 

Parameters:
index The index of the key to get the value for.
Returns:
The value of the i'th key in the property.

Number DzFloatProperty::getLocalValue ( DzTime  tm  ) 

This function is provided for the special case of ERC redirection - sometimes called 'Cross-talk'. For example, if Figure A (a piece of clothing, for example) is 'Fit To' Figure B, the ERC links on Figure A are redirected to follow channels on Figure B - this is how morphs on a piece of clothing will follow morphs on the figure, etc. This function will provide the value of the property ignoring any redirection of ERC links. So, for a figure that is not 'Fit To' another figure, this will return the same value as getValue(). For a figure that is 'Fit To' another figure, this will return the value that the property would have if the ERC had not been redirected.

Parameters:
tm The time at which to get the calculate this properties value.
Returns:
The value of the property at the given time without any ERC redirection.

Number DzFloatProperty::getLocalValue (  ) 

This function is provided for the special case of ERC redirection - sometimes called 'Cross-talk'. For example, if Figure A (a piece of clothing, for example) is 'Fit To' Figure B, the ERC links on Figure A are redirected to follow channels on Figure B - this is how morphs on a piece of clothing will follow morphs on the figure, etc. This function will provide the value of the property ignoring any redirection of ERC links. So, for a figure that is not 'Fit To' another figure, this will return the same value as getValue(). For a figure that is 'Fit To' another figure, this will return the value that the property would have if the ERC had not been redirected.

Returns:
The value of the property at the current time without any ERC redirection.

Number DzFloatProperty::getMax (  ) 

Returns:
The maximum allowable value of the property

Number DzFloatProperty::getMin (  ) 

Returns:
The minimum allowable value of the property

Number DzFloatProperty::getRawValue ( DzTime  tm  ) 

This function is provided to make it easy to get the 'keyed' value of the property without any modifications. When the value of a property is evaluated, first the value based on key interpolation is calculated, that value is then passed to each of the controllers on the property (ERC Links for example) which can modify that value. This modified value is then returned as the value of the property by getValue(). This function returns the value of the property before the application of the controllers - strictly the result of key interpolation.

Parameters:
tm The scene time at which to get the value of the property.
Returns:
The 'raw' value of the property at the given time - this is the actual value of the property without the contribution of property links, etc.

Number DzFloatProperty::getRawValue (  ) 

This function is provided to make it easy to get the 'keyed' value of the property without any modifications. When the value of a property is evaluated, first the value based on key interpolation is calculated, that value is then passed to each of the controllers on the property (ERC Links for example) which can modify that value. This modified value is then returned as the value of the property by getValue(). This function returns the value of the property before the application of the controllers - strictly the result of key interpolation.

Returns:
The 'raw' value of the property at the current time - this is the actual value of the property without the contribution of property links, etc.

Number DzFloatProperty::getSensitivity (  ) 

Returns:
The sensitivity setting for this property.

Number DzFloatProperty::getValue ( DzTime  tm  ) 

Returns:
The value of the property at the given time.

Number DzFloatProperty::getValue (  ) 

Returns:
The value of the property at the current time.

void DzFloatProperty::multiply ( Number  val,
Boolean  applyToDefault = true 
)

Multiplies all key values by the given amount.

Parameters:
val The multiplier for the values.
applyToDefault If true, the default value for the property will also be multiplied.

void DzFloatProperty::setDefaultValue ( Number  val  ) 

Sets the default value for this property.

void DzFloatProperty::setDisplayAsPercent ( Boolean  onOff  ) 

Sets whether this property should have its value displayed as a percentage - the default is false ( value is displayed as a decimal )

void DzFloatProperty::setKeyInterpolation ( Number  i,
InterpolationType  interp,
Number  param0,
Number  param1,
Number  param2 
)

Sets the interpolation method for the i'th key. User is responsible to assure that i lies within the valid range of keys for this property.

Parameters:
i The index of the key to change.
interp The type of interpolation to perform between this keyframe and the next.
param0 The parameter 0 for key interpolation: T value for TCB interpolation, starting slope value for Hermite interpolation.
param1 The parameter 1 for key interpolation: C value for TCB interpolation, ending slope value for Hermite interpolation.
param2 The parameter 2 for key interpolation: B value for TCB interpolation

void DzFloatProperty::setKeyInterpolation ( Number  i,
InterpolationType  interp 
)

Sets the interpolation method for the i'th key. User is responsible to assure that i lies within the valid range of keys for this property.

Parameters:
i The index of the key to change.
interp The type of interpolation to perform between this keyframe and the next.

void DzFloatProperty::setKeyValue ( Number  i,
Number  val 
)

Sets the value of the i'th key. User is responsible to assure that i lies within the valid range of keys for this property.

Parameters:
i The index of the key to change.
val The new value for the key.

void DzFloatProperty::setMax ( Number  max  ) 

Set the maximum allowable value

void DzFloatProperty::setMin ( Number  min  ) 

Set the mininimum allowable value

void DzFloatProperty::setMinMax ( Number  min,
Number  max 
)

Set the mininimum and maximum allowable values

void DzFloatProperty::setSensitivity ( Number  sens  ) 

Set the sensitivity for this property. This value describes the amount of change in the value of this property caused by adjustment in the interface, especially if limits are off.

void DzFloatProperty::setValue ( DzTime  tm,
Number  val,
InterpolationType  interp,
Number  param0,
Number  param1,
Number  param2 
)

Sets the value for this property at the given time - or the default value if this property is not animatable.

Parameters:
tm The time to set the value at.
val The value to set the property to.
interp The type of interpolation to perform between this keyframe and the next.
param0 The parameter 0 for key interpolation: T value for TCB interpolation, starting slope value for Hermite interpolation.
param1 The parameter 1 for key interpolation: C value for TCB interpolation, ending slope value for Hermite interpolation.
param2 The parameter 2 for key interpolation: B value for TCB interpolation

void DzFloatProperty::setValue ( DzTime  tm,
Number  val,
InterpolationType  interp 
)

Sets the value for this property at the given time - or the default value if this property is not animatable.

Parameters:
tm The time to set the value at.
val The value to set the property to.
interp The type of interpolation to perform between this keyframe and the next. Parameters for interpolation are set to defaults.

void DzFloatProperty::setValue ( DzTime  tm,
Number  val 
)

Sets the value for this property at the given time - or the default value if this property is not animatable.

Parameters:
tm The time to set the value at.
val The value to set the property to.

void DzFloatProperty::setValue ( Number  val  ) 

Sets the value for this property at the current time - or the default value if this property is not animatable.

Parameters:
val The value to set the property to.

void DzFloatProperty::subtract ( Number  val,
Boolean  applyToDefault = true 
)

Subtracts the given value to all the key values.

Parameters:
val The value to be subtracted from the key values.
applyToDefault If true, val will also be subtracted from the default value for the property.


Generated on Thu Sep 24 12:21:12 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.