IBoolCntrl Class Reference

Search for all occurrences

Detailed Description

See also:
Class Animatable, Class StdControl, Class IKeyControl

Description:
This class is only available in release 5 or later.

Certain problems plague the current ON/OFF controller that produces counter-intuitive results and makes it difficult to use it in an animation system. The objective of this feature is to overcome these problems, either by fixing the existing controller or by creating a new controller. In the beginning we'll focus on the first option.

We have decided to keep the current ON/OFF controller as it is because of its utility to certain users and develop a new Boolean controller.

This is a controller similar to On/Off. However, its animation behavior is quite different in that, unlike On/Off, it is NOT a flip flop control. Each key in On/Off merely creates a state change. Its output is -1 or 1.

The Boolean controller is a True/False control. Its output is the value of the last key which can only be either 0 or 1, thus any number of similar keys may be in sequence; the controller is merely evaluated at the current time and its value is output. This is not possible with the On/Off controller where each key must necessarily be a change of state from either -1 to 1 OR 1 to -1.

The Boolean Controller will be useful for any situation where something must be turned on and off and the user wishes to work in a non-linear fashion i.e. jumping backwards and forwards at will in the time line. For example, such binary functions as object smoothing, object visibility scale multipliers, light on/off state, etc.

The most pressing need for the Boolean is in the IK enabled state. Currently, the enable state is controlled by the On/Off controller. The On/Off behavior is in direct conflict with the idea of non-linear IK/FK blend animation. For multiple reasons that are too difficult and involved to go into here the flip flop behavior of On/Off becomes cumbersome at best. Furthermore, in R4 the behavior of On/Off was modified to mitigate this problem: if the Animate button is active and the IK Enable button is pressed, the enable track is examined, if any enable keys exist in the track later in time they are "rippled" back to the current time in order to preserve the overall animated state of IK Enable. With the Animate button off On/Off behaves as it did in R3: the new key is introduced and all existing animation in the Enable track is inverted. It is only when an even number of keys is added to the track that existing animation is preserved.

The code for this controller is in: maxsdk/samples/controllers/boolcntrl

#include <istdplug.h>

Inheritance diagram for IBoolCntrl:
Inheritance graph
[legend]

List of all members.


IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl
IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl IBoolCntrl