Public Member Functions

ParamDimension Class Reference

This reference page is linked to from the following overview topics: Parameter Tags.


Search for all occurrences

Detailed Description

See also:
Class ParamDimensionBase, Dimension Types.
Description:
Any parameter that can be controlled by a controller has a dimension. This dimension can be considered a unit of measure. It describes its type and its order of magnitude. When a controller needs to display the parameter values (for example in the function curve editor) it converts the value using its parameter dimension Convert() function. It can also convert back using the Unconvert() function.

Some parameters are stored over one range of values and displayed in another. For example parameter that use stdAngleDim store their parameters in radians but display them in degrees. By using stdAngleDim the value is converted to the proper format for display. Some parameter dimensions do not perform any conversion, for example stdWorldDim.

There are several default parameter dims implemented. Listed with each one is the type, convert functions and range of values usually stored (these are not enforced in any way).

If the type of parameter for your plug-in does not fit within any of the dimensions listed here you may simply use defaultDim. This performs no conversions and has no range.

ParamDimension *defaultDim;

Convert() is original value.

UnConvert() is original value.

Range: None.

ParamDimension *stdWorldDim;

The DimType is DIM_WORLD

Convert() return original value.

UnConvert() returns original value.

ParamDimension *stdAngleDim;

The DimType is DIM_ANGLE.

Convert() is RadToDeg()

UnConvert() is DegToRad()

ParamDimension *stdColorDim;

The DimType is DIM_COLOR

Convert() return original value.

UnConvert() returns original value.

Range: 0-1

ParamDimension *stdColor255Dim;

The DimType is DIM_COLOR255

Convert() is value * 255.0f

UnConvert() is value / 255.0f

Range: 0-255

ParamDimension *stdPercentDim;

The DimType is DIM_PERCENT

Convert() is value * 100.0f

UnConvert() is value / 100.0f

Range: 0-100

ParamDimension *stdNormalizedDim;

The DimType is DIM_NORMALIZED

Convert() is original value.

UnConvert() is original value.

Range: 0-1

ParamDimension *stdSegmentsDim;

The DimType is DIM_SEGMENTS

Convert() is original value.

UnConvert() is original value.

ParamDimension *stdTimeDim;

The DimType is DIM_TIME

Convert() is value/GetTicksPerFrame()

UnConvert()is value*GetTicksPerFrame() (see the section Time for details).
If the DimType is custom then the methods below must be implemented. Note: This class is derived from ParamDimensionBase which provides methods DimensionType(), Convert() and Unconvert().

#include <ParamDimension.h>

Inheritance diagram for ParamDimension:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual float  GetDimScale ()
virtual void  SetDimScale ()
virtual MCHAR *  DimensionName ()

Member Function Documentation

virtual float GetDimScale ( ) [inline, virtual]
Remarks:
Returns the dimension scale.
{return 1.0f;}
virtual void SetDimScale ( ) [inline, virtual]
Remarks:
Sets the dimension scale.
{}
virtual MCHAR* DimensionName ( ) [inline, virtual]
Remarks:
Returns the name of the dimension.
{return _M("");}        

ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension
ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension ParamDimension