Main Page Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages

# Composition::ControllerC Class Reference

Value controller class. More...

`#include <ControllerC.h>`

Inheritance diagram for Composition::ControllerC:

List of all members.

## Public Methods

- virtual Edit::DataBlockI* create ()
- virtual Edit::DataBlockI* create ( Edit::EditableI* pOriginal )
- virtual void copy ( Edit::DataBlockI* pBlock )
- virtual void restore ( Edit::EditableI* pBlock )
- virtual PajaTypes::int32 get_key_count ()
- virtual KeyC* get_key ( PajaTypes::int32 i32Index )
- virtual void del_key ( PajaTypes::int32 i32Index )
- virtual KeyC* get_key_at_time ( PajaTypes::int32 i32Time )
- virtual KeyC* add_key_at_time ( PajaTypes::int32 i32Time )
- virtual void set_start_ort ( PajaTypes::uint32 ui32Ort )
- virtual void set_end_ort ( PajaTypes::uint32 ui32Ort )
- virtual PajaTypes::uint32 get_start_ort ()
- virtual PajaTypes::uint32 get_end_ort ()
- virtual void sort_keys ()
- virtual void prepare ()
- virtual void get_value ( PajaTypes::float32* pValues, PajaTypes::int32 i32Time )
- virtual void get_value ( PajaTypes::int32& i32Val, PajaTypes::int32 i32Time )
- virtual void get_value ( PajaTypes::float32& f32Val, PajaTypes::int32 i32Time )
- virtual void get_value ( PajaTypes::Vector2C& rVal, PajaTypes::int32 i32Time )
- virtual void get_value ( PajaTypes::Vector3C& rVal, PajaTypes::int32 i32Time )
- virtual void get_value ( PajaTypes::ColorC& rVal, PajaTypes::int32 i32Time )
- virtual PajaTypes::float32 get_min_val ()
- virtual PajaTypes::float32 get_max_val ()
- virtual PajaTypes::int32 get_min_time ()
- virtual PajaTypes::int32 get_max_time ()
- virtual PajaTypes::uint32 get_type ()
- virtual void set_type ( PajaTypes::uint32 ui32Type )
- virtual PajaTypes::uint32 get_num_channels ()
- virtual PajaTypes::uint32 save ( FileIO::SaveC* pSave )
- virtual PajaTypes::uint32 load ( FileIO::LoadC* pLoad )

## Static Public Methods

- ControllerC* create_new ( ControllerTypeE eType )

## Protected Methods

- ControllerC ( ControllerTypeE eType )
- ControllerC ( Edit::EditableI* pOriginal )
- ~ControllerC ()

## Detailed Description

Value controller class.

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.

See also:
  KeyC

## Constructor & Destructor Documentation

ControllerC ( | ControllerTypeE eType )`[protected]`

| Default constructor.

ControllerC ( | Edit::EditableI * pOriginal )`[protected]`

| Default constructor with reference to the original.

~ControllerC ( | )`[protected]`

| Default destructor.

## Member Function Documentation

KeyC * add_key_at_time ( | PajaTypes::int32 i32Time )`[virtual]`

| Creates a new key at specified time and returns it.

void copy ( | Edit::DataBlockI * pBlock )`[virtual]`

| Deep copy from a data block, see Edit::DataBlockI::copy(). Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( | Edit::EditableI * pOriginal )`[virtual]`

| Creates new controller (used internally), see Edit::EditableI::create(). Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( | )`[virtual]`

| Creates new controller. Use set_type() to set number of channels and the type of the controller. Reimplemented from Edit::EditableI.

ControllerC * create_new ( | ControllerTypeE eType )`[static]`

  | Creates new controller. Parameters:
  eType | Type of controller to create.
This method creates new controller. The type defines the number of channels to use.

void del_key ( | PajaTypes::int32 i32Index )`[virtual]`

| Deletes a key pointed by the argument.

PajaTypes::uint32 get_end_ort ( | )`[virtual]`

| Returns the end out fo range type.

KeyC * get_key ( | PajaTypes::int32 i32Index )`[virtual]`

| Returns pointer to a key pointed by the argument.

KeyC * get_key_at_time ( | PajaTypes::int32 i32Time )`[virtual]`

| Returns a key at specified time, else NULL.

PajaTypes::int32 get_key_count ( | )`[virtual]`

| Returns the number of keys inside the controller.

PajaTypes::int32 get_max_time ( | )`[virtual]`

| Returns the time of the last key.

PajaTypes::float32 get_max_val ( | )`[virtual]`

| Returns the maximum value of the cotnroller. The value is checked on keyframes and the result is maximum of the all channels. This method is mainly used internally.

PajaTypes::int32 get_min_time ( | )`[virtual]`

| Returns the time of the first key.

PajaTypes::float32 get_min_val ( | )`[virtual]`

| Returns the minimum value of the controller. The value is checked on keyframes and the result is minimum of the all channels. This method is mainly used internally.

PajaTypes::uint32 get_num_channels ( | )`[virtual]`

| Returns number of channels this cintroller controls. The channel count depends on the controller type. See also: ControllerTypeE

PajaTypes::uint32 get_start_ort ( | )`[virtual]`

| Returns the start out fo range type.

PajaTypes::uint32 get_type ( | )`[virtual]`

| Returns the type of the controller.

void get_value ( | PajaTypes::ColorC & rVal,
| PajaTypes::int32 i32Time )`[virtual]`

| Returns the interpolated value of the controller at specified time as a color.

void get_value ( | PajaTypes::Vector3C & rVal,
| PajaTypes::int32 i32Time )`[virtual]`

| Returns the interpolated value of the controller at specified time as a 3D vector.

void get_value ( | PajaTypes::Vector2C & rVal,
| PajaTypes::int32 i32Time )`[virtual]`

| Returns the interpolated value of the controller at specified time as a 3D vector.

void get_value ( | PajaTypes::float32 & f32Val,
| PajaTypes::int32 i32Time )`[virtual]`

| Returns the interpolated value of the controller at specified time as a floating point values.

void get_value ( | PajaTypes::int32 & i32Val,
| PajaTypes::int32 i32Time )`[virtual]`

| Returns the interpolated value of the controller at specified time as a integer value.

void get_value ( | PajaTypes::float32 * pValues,
| PajaTypes::int32 i32Time )`[virtual]`

| 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.

virtual PajaTypes::uint32 load ( | FileIO::LoadC * pLoad )`[virtual]`

| Load editable from a Demopaja input stream. Reimplemented from Edit::EditableI.

void prepare ( | )`[virtual]`

| 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.

void restore ( | Edit::EditableI * pBlock )`[virtual]`

| Shallow copy from a editable, see Edit::EditableI::restore(). Reimplemented from Edit::EditableI.

virtual PajaTypes::uint32 save ( | FileIO::SaveC * pSave )`[virtual]`

| Save editable to a Demopaja output stream. Reimplemented from Edit::EditableI.

void set_end_ort ( | PajaTypes::uint32 ui32Ort )`[virtual]`

| Sets the end (time after last key) out of range type.

void set_start_ort ( | PajaTypes::uint32 ui32Ort )`[virtual]`

| Sets the start (time before the first key) out of range type.

void set_type ( | PajaTypes::uint32 ui32Type )`[virtual]`

| 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.

void sort_keys ( | )`[virtual]`

| 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.

The documentation for this class was generated from the following file:

- ControllerC.h