Setting Up the Parameter Block

Several of the controls used allow animated values. For example, the radius, and segments parameters may be animated. The developer uses a parameter block to store these values. The developer must define the parameter block descriptor which describes the properties of each parameter.

class  ParamBlockDescID {
 public:
  ParamType type;
  UserType *user;
  BOOLanimatable;
  DWORDid;
 };

This class is initialized by passing four values per parameter. These values are:

  1. ParamType type - The Parameter Type - The following are the types which may be used:
  2. TYPE_INT - Integers values.
  3. TYPE_FLOAT - Floating point values.
  4. TYPE_POINT3 - Point values.
  5. TYPE_RGBA - Color values - Red, Green, and Blue.
  6. TYPE_BOOL - Boolean values.
  7. UserType* user - This value is NOT USED - it must always be passed as NULL.
  8. BOOL animatable - This is a flag indicating if the parameter may be animated or not. Pass TRUE if the value may be animated and FALSE if just a constant value should be stored.
  9. DWORD id - This is an ID assigned to each parameter. This is used for backwards compatibility if you change the parameter block structure in the future. There is a mechanism that allows older format parameter blocks to be converted to a newer format using these IDs to match corresponding parameters between the new and old format. This is described below under Backwards Compatibility.