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

# Composition::ParamVector3C Class Reference

3D vector parameter class. More...

`#include <ParamI.h>`

Inheritance diagram for Composition::ParamVector3C:

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::uint32 get_type () const
- virtual void set_controller ( ControllerC* cnt )
- virtual ControllerC* get_controller ()
- virtual void set_min_max ( const PajaTypes::Vector3C& min, const PajaTypes::Vector3C& max )
- virtual const PajaTypes::Vector3C& get_min () const
- virtual const PajaTypes::Vector3C& get_max () const
- virtual void set_increment ( PajaTypes::float32 inc )
- virtual PajaTypes::float32 get_increment () const
- virtual bool get_min_max ( PajaTypes::float32* pMin, PajaTypes::float32* pMax )
- virtual void set_style ( PajaTypes::uint32 style )
- virtual PajaTypes::uint32 get_style () const
- virtual void set_id ( PajaTypes::uint32 id )
- virtual PajaTypes::uint32 get_id () const
- virtual void set_val ( PajaTypes::int32 t, PajaTypes::float32* val )
- virtual void get_val ( PajaTypes::int32 t, PajaTypes::float32* val )
- virtual void set_val ( PajaTypes::int32 t, const PajaTypes::Vector3C& val )
- virtual void get_val ( PajaTypes::int32 t, PajaTypes::Vector3C& val )
- virtual PajaTypes::uint32 save ( FileIO::SaveC* pSave )
- virtual PajaTypes::uint32 load ( FileIO::LoadC* pLoad )

## Static Public Methods

- ParamVector3C* create_new ( GizmoI* pParent, const char* szName, const PajaTypes::Vector3C& rValue, PajaTypes::uint32 ui32ID, PajaTypes::uint32 ui32Style = PARAM_STYLE_EDITBOX, bool bAnimatable = true, const PajaTypes::Vector3C& rMin = PajaTypes::Vector3C(), const PajaTypes::Vector3C& rMax = PajaTypes::Vector3C(), PajaTypes::float32 f32Inc = 0.1f )

## Protected Methods

- ParamVector3C ()
- ParamVector3C ( GizmoI* pParent, const char* name, const PajaTypes::Vector3C& value, PajaTypes::uint32 id, PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool animatable = true, const PajaTypes::Vector3C& min = PajaTypes::Vector3C(), const PajaTypes::Vector3C& max = PajaTypes::Vector3C(), PajaTypes::float32 inc = 0.1f )
- ParamVector3C ( Edit::EditableI* pOriginal )
- virtual ~ParamVector3C ()

## Detailed Description

3D vector parameter class.

The 3D vector parameter can used to control everything where three parameters are enough. This parameter can have extra styles which enables it to be used as a percentage or an angle parameter.

A new 3D vector parameter is created using the create_new() static method.

## Constructor & Destructor Documentation

ParamVector3C ( | )`[protected]`

| Default constructor.

ParamVector3C ( | GizmoI * pParent,
| const char * name,
| const PajaTypes::Vector3C & value,
| PajaTypes::uint32 id,
| PajaTypes::uint32 style = PARAM_STYLE_EDITBOX,
| bool animatable = true,
| const PajaTypes::Vector3C & min = PajaTypes::Vector3C(),
| const PajaTypes::Vector3C & max = PajaTypes::Vector3C(),
| PajaTypes::float32 inc = 0.1f )`[protected]`

| Constructor.

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

| Constructor with reference to the original.

~ParamVector3C ( | )`[protected, virtual]`

| Default destructor.

## Member Function Documentation

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

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

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

  | Creates new datablock, with reference to the original. Parameters:
  pOriginal | Pointer to the original editable. This method is used by the undo system to create a copy of the editable while keeping reference to the original.
The method restore() is used to restore the data from the original copy. Reimplemented from Edit::EditableI.

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

| Creates new parameter. Following default values are used:
                pParent = 0,
                szName = 0,
                rValue = (0, 0, 0),
                ui32ID = 0,
                ui32Style = 0,
                bAnimatable = false,
                rMin = (0, 0, 0),
                rMax = (0, 0, 0),
                f32Inc = 0.1f
See also: create_new Reimplemented from Edit::EditableI.

ParamVector3C * create_new ( | GizmoI * pParent,
| const char * szName,
| const PajaTypes::Vector3C & rValue,
| PajaTypes::uint32 ui32ID,
| PajaTypes::uint32 ui32Style = PARAM_STYLE_EDITBOX,
| bool bAnimatable = true,
| const PajaTypes::Vector3C & rMin = PajaTypes::Vector3C(),
| const PajaTypes::Vector3C & rMax = PajaTypes::Vector3C(),
| PajaTypes::float32 f32Inc = 0.1f )`[static]`

  | Creates a new 3D vector parameter. Parameters:
  pParent | Pointer to the parent gizmo.
  szName | The name of the parameter as NULL terminated string.
  rValue | Start value of the parameter.
  ui32ID | ID of the parameter.
  ui32Style | The style of the parameter. Must be PARAM_STYLE_EDITBOX. In addition PARAM_STYLE_PERCENT or PARAM_STYLE_ANGLE can be set. Default PARAM_STYLE_EDITBOX.
  bAnimatable | If set true the parameter is animatable, else it's not (you may use PARAM_ANIMATABLE or PARAM_NOT_ANIMATABLE too). Default true.
  rMin | The minimum of the parameter value range. Default (0, 0, 0).
  rMax | The maximum of the parameter value range. Default (0, 0, 0).
  f32Inc | The increment of the value spinner in type-in. Default 0.1.
If minimum and maximum of the range are same no range checking is used. The only type-in style is editbox. If PARAM_STYLE_PERCENT is set, percent marks are used in the GUI, and also the values are multiplied by 100 before displayed. That is, the value for 100% is 1.0. If PARAM_STYLE_ANGLE is set, the angle mark is shown in the GUI. The value is not scaled. Example: This example creates new parameter. The name of the parameter is "Position", it's default value is (0, 0, 0) and it's ID is ID_POSITION (constant defined by the plugin writer), the type-in style is editbox, the parameter can be animated, and no range is defined. Spinner increment is default 0.1.
                m_pParamPos = ParamVector3C::create_new( this, "Position", Vector3C(), ID_POSITION,
                                                            PARAM_STYLE_EDITBOX, PARAM_ANIMATABLE );

virtual ControllerC* get_controller ( | )`[virtual]`

| Returns the conroller attached to the parameter. NULL is returned if the parameter cannot be animated. Reimplemented from Composition::ParamI.

virtual PajaTypes::uint32 get_id ( | ) const`[virtual]`

| Returns the ID of the parameter. Reimplemented from Composition::ParamI.

virtual PajaTypes::float32 get_increment ( | ) const`[virtual]`

| Returns the spinner increment. Reimplemented from Composition::ParamI.

const PajaTypes::Vector3C & get_max ( | ) const`[virtual]`

| Returns the maximum of the value range.

const PajaTypes::Vector3C & get_min ( | ) const`[virtual]`

| Returns the minimum of the value range.

virtual bool get_min_max ( | PajaTypes::float32 * pMin,
| PajaTypes::float32 * pMax )`[virtual]`

  | Returns the range of the parameter. Parameters:
  pMin | pointer to a array of maximum of KEY_MAXCHANNEL floats.
  pMax | pointer to a array of maximum of KEY_MAXCHANNEL floats.
If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats. Returns: true if the range is valid, false if the range is not used. Reimplemented from Composition::ParamI.

virtual PajaTypes::uint32 get_style ( | ) const`[virtual]`

| Returns the style of the parameter. Reimplemented from Composition::ParamI.

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

| Returns the type of the parameter. Reimplemented from Composition::ParamI.

void get_val ( | PajaTypes::int32 t,
| PajaTypes::Vector3C & val )`[virtual]`

| Gets the value of the parameter at specified time.

virtual void get_val ( | PajaTypes::int32 t,
| PajaTypes::float32 * val )`[virtual]`

  | Returns the value of the parameter. Parameters:
  pVal | pointer to a array of maximum of KEY_MAXCHANNEL floats. If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats. If The parameter is animated, interpolated value is returned.
Reimplemented from Composition::ParamI.

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

| Serialize the parameter from a Demopaja input stream. Reimplemented from Composition::ParamI.

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

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

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

| Serialize the parameter to a Demopaja output stream. Reimplemented from Composition::ParamI.

virtual void set_controller ( | ControllerC * cnt )`[virtual]`

| Sets the controller of the parameter. Reimplemented from Composition::ParamI.

virtual void set_id ( | PajaTypes::uint32 id )`[virtual]`

| Sets the ID of the parmeter. Reimplemented from Composition::ParamI.

virtual void set_increment ( | PajaTypes::float32 inc )`[virtual]`

| Sets the spinner increment of the parameter. The spinner increment is the smallest value the parameter is meant to control. For 1/10th accuracy use spinner increment of 0.1. The spinner increment is used in the spinners of the type-ins and also to draw the values in the GUI. Reimplemented from Composition::ParamI.

void set_min_max ( | const PajaTypes::Vector3C & min,
| const PajaTypes::Vector3C & max )`[virtual]`

| Sets the range of the parameter.

virtual void set_style ( | PajaTypes::uint32 style )`[virtual]`

| Sets the style of the parameter. Reimplemented from Composition::ParamI.

void set_val ( | PajaTypes::int32 t,
| const PajaTypes::Vector3C & val )`[virtual]`

| Sets the value of the parameter at specified time.

virtual void set_val ( | PajaTypes::int32 t,
| PajaTypes::float32 * val )`[virtual]`

  | Sets the value of the parameter. Parameters:
  pVal | pointer to a array of maximum of KEY_MAXCHANNEL floats. If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats. If the parameter is animated a new keyframe is created or existing is updated.
Reimplemented from Composition::ParamI.

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

- ParamI.h