User Tools

Site Tools


DzNumericController

Base class for controllers that operate on DzNumericProperty types.

More...

Inherits :

Inherited By : DzERCLink

Methods

DAZ Script
Numberapply ( Number val, DzTime tm, Boolean local )
NumberapplyInverse ( Number val, DzTime tm, Boolean local )

Detailed Description

This is the base class for all controllers that can control the value of a DzNumericProperty-derived object. DzNumericProperty objects can have multiple controllers, these controllers are applied in the order they appear in the controller list.

The application of controllers in a DzNumeric-derived property begins with the keyed (raw) value of the property at the given time, this is the value that is passed to the apply() function of the first controller. The result returned by the apply() call to the first controller is then passed into the apply() function on the second controller, and so on. The result returned by the apply() function of the last controller on the property is then returned as the final value of the property for the given time.

The applyInverse function is used to determine the keyed (raw) value of the property when the user enters a number for the final value of the property. Controllers which have an 'Additive' effect must reimplement this method so that the value of the property appears to respond correctly to user input. Controllers which have a 'Replace' effect need not reimplement this function, since they have no inverse because they do not use the raw value of the property in their calculation.

Methods


Number : apply( Number val, DzTime tm, Boolean local )

This function is called to apply the controller to the numeric property that it controls.

Parameter(s):

  • val - The raw value of the property
  • tm - The scene time at which the controller is being evaluated

Return Value:

  • The final value for the property

This function is called to apply the controller to the numeric property that it controls. Subclasses must reimplement this function to perform the controller logic.

Parameter(s):

  • val - The raw value of the property
  • tm - The scene time at which the controller is being evaluated

Return Value:

  • The final value for the property

Number : applyInverse( Number val, DzTime tm, Boolean local )

This function is called to 'unapply' the controller to the numeric property that it controls.

Parameter(s):

  • val - The final value of the property
  • tm - The scene time at which the controller is being evaluated

Return Value:

  • The raw value for the property

This function is called to 'unapply' the controller to the numeric property that it controls. Subclasses must reimplement this function to perform the inverse of the controller logic.

Parameter(s):

  • val - The final value of the property
  • tm - The scene time at which the controller is being evaluated

Return Value:

  • The raw value for the property