IJiggle Class Reference
 
 
 
IJiggle Class Reference

#include <ispringctrl.h>

Inheritance diagram for IJiggle:
FPMixinInterface FPInterface BaseInterface InterfaceServer MaxHeapOperators

Class Description

See also:
Class FPMixinInterface, Class SpringSys , Class INode

Description:
This class represents the interface to the Spring Controller and comes in two different flavors, the JIGGLE_POS_CLASS_ID for the position spring controller and JIGGLE_P3_CLASS_ID for the Point3 spring controller.

All methods of this class are Implemented by the System.

Data Members:
SpringSys* partsys;

A pointer to the spring system class.

Public Types

enum   {
  get_mass, set_mass, get_drag, set_drag,
  get_tension, set_tension, get_dampening, set_dampening,
  add_spring, get_spring_count, remove_spring_by_index, remove_spring,
  get_spring_system
}

Public Member Functions

BEGIN_FUNCTION_MAP  FN_0 (get_mass, TYPE_FLOAT, GetMass)
  VFN_1 (set_mass, SetMass, TYPE_FLOAT)
  FN_0 (get_drag, TYPE_FLOAT, GetDrag)
  VFN_1 (set_drag, SetDrag, TYPE_FLOAT)
  FN_1 (get_tension, TYPE_FLOAT, GetTension, TYPE_INDEX)
  VFN_2 (set_tension, SetTension, TYPE_INDEX, TYPE_FLOAT)
  FN_1 (get_dampening, TYPE_FLOAT, GetDampening, TYPE_INDEX)
  VFN_2 (set_dampening, SetDampening, TYPE_INDEX, TYPE_FLOAT)
  FN_1 (add_spring, TYPE_BOOL, AddSpring, TYPE_INODE)
  FN_0 (get_spring_count, TYPE_INT, GetSpringCount)
  VFN_1 (remove_spring_by_index, RemoveSpring, TYPE_INDEX)
  VFN_1 (remove_spring, RemoveSpring, TYPE_INODE)
END_FUNCTION_MAP FPInterfaceDesc GetDesc ()
virtual SpringSys GetSpringSystem ()=0
virtual float  GetMass ()=0
virtual void  SetMass (float mass, bool update=true)=0
virtual float  GetDrag ()=0
virtual void  SetDrag (float drag, bool update=true)=0
virtual float  GetTension (int index)=0
virtual void  SetTension (int index, float tension, int absolute=1, bool update=true)=0
virtual float  GetDampening (int index)=0
virtual void  SetDampening (int index, float dampening, int absolute=1, bool update=true)=0
virtual BOOL  AddSpring (INode *node)=0
virtual INT  GetSpringCount ()=0
virtual void  RemoveSpring (int which)=0
virtual void  RemoveSpring (INode *node)=0

Public Attributes

SpringSys partsys

Member Enumeration Documentation


Member Function Documentation

BEGIN_FUNCTION_MAP FN_0 ( get_mass  ,
TYPE_FLOAT  ,
GetMass   
)
VFN_1 ( set_mass  ,
SetMass  ,
TYPE_FLOAT   
)
FN_0 ( get_drag  ,
TYPE_FLOAT  ,
GetDrag   
)
VFN_1 ( set_drag  ,
SetDrag  ,
TYPE_FLOAT   
)
FN_1 ( get_tension  ,
TYPE_FLOAT  ,
GetTension  ,
TYPE_INDEX   
)
VFN_2 ( set_tension  ,
SetTension  ,
TYPE_INDEX  ,
TYPE_FLOAT   
)
FN_1 ( get_dampening  ,
TYPE_FLOAT  ,
GetDampening  ,
TYPE_INDEX   
)
VFN_2 ( set_dampening  ,
SetDampening  ,
TYPE_INDEX  ,
TYPE_FLOAT   
)
FN_1 ( add_spring  ,
TYPE_BOOL  ,
AddSpring  ,
TYPE_INODE   
)
FN_0 ( get_spring_count  ,
TYPE_INT  ,
GetSpringCount   
)
VFN_1 ( remove_spring_by_index  ,
RemoveSpring  ,
TYPE_INDEX   
)
VFN_1 ( remove_spring  ,
RemoveSpring  ,
TYPE_INODE   
)
END_FUNCTION_MAP FPInterfaceDesc* GetDesc ( ) [virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

virtual SpringSys* GetSpringSystem ( ) [pure virtual]
Remarks:
This method returns the pointer to the associated spring system object.
virtual float GetMass ( ) [pure virtual]
Remarks:
This method returns the mass value.
virtual void SetMass ( float  mass,
bool  update = true 
) [pure virtual]
Remarks:
This method allows you to set the mass value.
Parameters:
float mass

The mass you wish to set.

bool update=true

This flag initiates an update if set to TRUE.
virtual float GetDrag ( ) [pure virtual]
Remarks:
This method returns the drag value.
virtual void SetDrag ( float  drag,
bool  update = true 
) [pure virtual]
Remarks:
This method allows you to set the drag value.
Parameters:
float drag

The drag you wish to set.

bool update=true

This flag initiates an update if set to TRUE.
virtual float GetTension ( int  index ) [pure virtual]
Remarks:
This method returns the tension for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.
virtual void SetTension ( int  index,
float  tension,
int  absolute = 1,
bool  update = true 
) [pure virtual]
Remarks:
This method allows you to set the tension for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

float tension

The tension you wish to set.

int absolute=1

The flag defining whether the tension is absolute or relative.

bool update=true

This flag initiates an update if set to TRUE.
virtual float GetDampening ( int  index ) [pure virtual]
Remarks:
This method returns the dampening value for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.
virtual void SetDampening ( int  index,
float  dampening,
int  absolute = 1,
bool  update = true 
) [pure virtual]
Remarks:
This method allows you to set the dampening value for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

float dampening

The tension you wish to set.

int absolute=1

The flag defining whether the tension is absolute or relative.

bool update=true

This flag initiates an update if set to TRUE.
virtual BOOL AddSpring ( INode node ) [pure virtual]
Remarks:
This method allows you to add a spring.
Parameters:
INode *node

A pointer to the node.
Returns:
TRUE if the spring was added, otherwise FALSE.
virtual INT GetSpringCount ( ) [pure virtual]
Remarks:
This method returns the current number of springs in the system.
virtual void RemoveSpring ( int  which ) [pure virtual]
Remarks:
This method allows you to remove a spring from the system.
Parameters:
int which

The index of the spring in the system to remove.
virtual void RemoveSpring ( INode node ) [pure virtual]
Remarks:
This method allows you to remove a spring from the system.
Parameters:
INode *node

A pointer to the node you wish to remove.

Member Data Documentation