#include <ControllerC.h>
Inheritance diagram for ControllerC:
Public Methods | |
virtual Edit::DataBlockI * | create () |
Creates new controller. | |
virtual Edit::DataBlockI * | create (Edit::EditableI *pOriginal) |
Creates new controller (used internally), see Edit::EditableI::create(). | |
virtual void | copy (Edit::EditableI *pEditable) |
Deep copy from a data block, see Edit::DataBlockI::copy(). | |
virtual void | restore (Edit::EditableI *pEditable) |
Shallow copy from a editable, see Edit::EditableI::restore(). | |
virtual PajaTypes::int32 | get_key_count () |
Returns the number of keys inside the controller. | |
virtual KeyC * | get_key (PajaTypes::int32 i32Index) |
Returns pointer to a key pointed by the argument. | |
virtual void | del_key (PajaTypes::int32 i32Index) |
Deletes a key pointed by the argument. | |
virtual KeyC * | get_key_at_time (PajaTypes::int32 i32Time) |
Returns a key at specified time, else NULL. | |
virtual KeyC * | add_key_at_time (PajaTypes::int32 i32Time) |
Creates a new key at specified time and returns it. | |
virtual void | set_start_ort (PajaTypes::uint32 ui32Ort) |
Sets the start (time before the first key) out of range type. | |
virtual void | set_end_ort (PajaTypes::uint32 ui32Ort) |
Sets the end (time after last key) out of range type. | |
virtual PajaTypes::uint32 | get_start_ort () |
Returns the start out fo range type. | |
virtual PajaTypes::uint32 | get_end_ort () |
Returns the end out fo range type. | |
virtual void | sort_keys () |
Sorts keys by time. | |
virtual void | prepare () |
Prepares controller for interpolation. | |
virtual void | get_value (PajaTypes::float32 *pValues, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time. | |
virtual void | get_value (PajaTypes::int32 &i32Val, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time as a integer value. | |
virtual void | get_value (PajaTypes::float32 &f32Val, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time as a floating point values. | |
virtual void | get_value (PajaTypes::Vector2C &rVal, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time as a 3D vector. | |
virtual void | get_value (PajaTypes::Vector3C &rVal, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time as a 3D vector. | |
virtual void | get_value (PajaTypes::ColorC &rVal, PajaTypes::int32 i32Time) |
Returns the interpolated value of the controller at specified time as a color. | |
virtual void | get_value (Import::FileHandleC *&pHandle, PajaTypes::int32 &i32FileTime, PajaTypes::int32 i32Time) |
Returns the value of the controller at specified time as a file and file time. | |
virtual PajaTypes::int32 | get_min_time () |
Returns the time of the first key. | |
virtual PajaTypes::int32 | get_max_time () |
Returns the time of the last key. | |
virtual PajaTypes::uint32 | get_type () |
Returns the type of the controller. | |
virtual void | set_type (PajaTypes::uint32 ui32Type) |
Sets the type of the controller. | |
virtual PajaTypes::uint32 | get_num_channels () |
Returns number of channels this cintroller controls. | |
virtual PajaTypes::uint32 | save (FileIO::SaveC *pSave) |
Save editable to a Demopaja output stream. | |
virtual PajaTypes::uint32 | load (FileIO::LoadC *pLoad) |
Load editable from a Demopaja input stream. | |
Static Public Methods | |
ControllerC * | create_new (ControllerTypeE eType) |
Creates new controller. | |
Protected Methods | |
ControllerC (ControllerTypeE eType) | |
Default constructor. | |
ControllerC (Edit::EditableI *pOriginal) | |
Default constructor with reference to the original. | |
~ControllerC () | |
Default destructor. |
Controller class is used to control the animated parameter values in Demopaja. For user and coder the use of controllers are invisible. The parameter takes care of using the controller. In some cases it may be useful to use the controller directly.
Controller provides methods to add and delete keys, interpolate between set of keys,
This class is implemented by the system.
|
Default constructor.
|
|
Default constructor with reference to the original.
|
|
Default destructor.
|
|
Creates a new key at specified time and returns it.
|
|
Deep copy from a data block, see Edit::DataBlockI::copy().
Implements EditableI. |
|
Creates new controller (used internally), see Edit::EditableI::create().
Implements EditableI. |
|
Creates new controller. Use set_type() to set number of channels and the type of the controller. Implements EditableI. |
|
Creates new controller.
|
|
Deletes a key pointed by the argument.
|
|
Returns the end out fo range type.
|
|
Returns pointer to a key pointed by the argument.
|
|
Returns a key at specified time, else NULL.
|
|
Returns the number of keys inside the controller.
|
|
Returns the time of the last key.
|
|
Returns the time of the first key.
|
|
Returns number of channels this cintroller controls. The channel count depends on the controller type.
|
|
Returns the start out fo range type.
|
|
Returns the type of the controller.
|
|
Returns the value of the controller at specified time as a file and file time. This methos calculates the time to pass to the importables eval_state() method based on the frame offset and time scale set in the key. |
|
Returns the interpolated value of the controller at specified time as a color.
|
|
Returns the interpolated value of the controller at specified time as a 3D vector.
|
|
Returns the interpolated value of the controller at specified time as a 3D vector.
|
|
Returns the interpolated value of the controller at specified time as a floating point values.
|
|
Returns the interpolated value of the controller at specified time as a integer value.
|
|
Returns the interpolated value of the controller at specified time. This method calculates the interpolated value based in the keys inside the controller. If no keys are present the return value will be zero for all channels. Maximum of KEY_MAXCHANNELS (currently 4) values are stored in the array pointed by the pValues parmeter. For easier access should one of the other get_value() methods be used. |
|
Load editable from a Demopaja input stream.
Implements EditableI. |
|
Prepares controller for interpolation. This method has to be called after a new key is added to the controller, or the result of other methods may be incorrect. If the controller contains smooth keys the tangents are calculated by this method, else it does nothing. |
|
Shallow copy from a editable, see Edit::EditableI::restore().
Implements EditableI. |
|
Save editable to a Demopaja output stream.
Implements EditableI. |
|
Sets the end (time after last key) out of range type.
|
|
Sets the start (time before the first key) out of range type.
|
|
Sets the type of the controller. This method should only be called for a controller which does not have any keys. It doesn't convert the keys and will lead in serious trouble if misused. |
|
Sorts keys by time. This method has to be called after a new key is added to the controller, or the result of other methods may be incorrect. |