Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
ModuleConstraint Class Reference

This class implements a constraint object in Clarisse.
A constaint is an embedded object that modifies the matrix of an item. More...

Inheritance diagram for ModuleConstraint:
ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Types

enum  XformModifier {
  XFORM_MODIFIER_NONE =0,
  XFORM_MODIFIER_TRANSLATE =1,
  XFORM_MODIFIER_ROTATE =2,
  XFORM_MODIFIER_SCALE =4,
  XFORM_MODIFIER_ALL =XFORM_MODIFIER_TRANSLATE|XFORM_MODIFIER_ROTATE|XFORM_MODIFIER_SCALE
}
 

Public Member Functions

bool apply_constraint (const ModuleSceneItemInfo &item, GMathMatrix4x4d &global_xform) const
 Applies the constraint: computes the global matrix of the item.
 
bool apply_constraint_at (const double &time, const ModuleSceneItemInfo &item, GMathMatrix4x4d &global_xform) const
 Applies the constraint at a specified time.
 
short get_xform_modifier () const
 Returns which component of the xform is altered by the constraint.
 

Protected Member Functions

virtual void module_constructor (OfObject &object)
 

Additional Inherited Members

- Static Public Member Functions inherited from ModuleObject
static ResourceID declare_resource (const char *tag)
 
static ResourceID declare_resource (const CoreString &tag)
 
static bool declare_resource (ResourceID id, const char *tag)
 
static bool declare_resource (ResourceID id, const CoreString &tag)
 
static ResourceID get_resource_id (const char *tag)
 
static ResourceID get_resource_id (const CoreString &tag)
 
static const char * get_resource_tag (ResourceID id)
 

Detailed Description

This class implements a constraint object in Clarisse.
A constaint is an embedded object that modifies the matrix of an item.

Member Function Documentation

bool ModuleConstraint::apply_constraint ( const ModuleSceneItemInfo item,
GMathMatrix4x4d &  global_xform 
) const

Applies the constraint: computes the global matrix of the item.

Parameters
[in]itemScene item information.
[out]global_xformOutput matrix.
bool ModuleConstraint::apply_constraint_at ( const double &  time,
const ModuleSceneItemInfo item,
GMathMatrix4x4d &  global_xform 
) const

Applies the constraint at a specified time.

Parameters
[in]timeTime at which the constraint needs to be evaluated.
[in]itemScene item information.
[out]global_xformOutput matrix.