StdControl

3DS Max Plug-In SDK

StdControl

See Also: Class StdControl.

The purpose of this class is to simplify some aspects of implementing controllers. The only restriction when using this class is that the controller can not evaluate itself as a function of its input. This class handles processing Out of Range Types, ease curves and multiplier curves.

There are a few other methods that StdControl requires:

Extrapolate()

Extrapolate is used to calculate some of the ORTs. There are several types of extrapolations that need to be done and there are template functions implemented in \MAXSDK\INCLUDE\CONTROL.H to do them.

CreateTempValue()

When processing the ORTs the system might need a temporary variable to hold an intermediate value. Since the system doesn't actual know the type of the data that the controller is controlling it can't allocate the right amount of temporary storage. It calls this method to do so.

DeleteTempValue()

This method simply deletes the memory allocated by CreateTempValue().

ApplyValue()

Applies the given value to the given input value. For position, rotation, and scale controllers, the input value will be a matrix and the value being applied will be a Point3, quaternion, or ScaleValue, respectively. For other controllers the input value is the same type as the value being applied.

MultiplyValue()

If the controller has multiplier curves then the system will calculate the factor from all the multiplier curves and then ask the controller to multiply the scalar value to the particular data type.