CSLConstraint Class Reference

Describes a constraint. More...

#include <Constraint.h>

Inheritance diagram for CSLConstraint:

CSLTemplate CSIBCNode List of all members.

Public Types

enum   EConstraintType {
  SI_SCALING,
  SI_ORIENTATION,
  SI_DIRECTION,
  SI_POSITION,
  SI_INTEREST,
  SI_UP_VECTOR,
  SI_PREFERED_AXIS
}

Public Member Functions

  CSLConstraint (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate, EConstraintType in_ConstraintType)
virtual  ~CSLConstraint ()
CSLModel GetReference ()
EConstraintType  GetConstraintType ()
SI_Error  AddConstrainingObject (CSLModel *in_pConstrainingObject)
SI_Int  GetConstrainingObjectCount ()
CSLModel **  ConstrainingObjects ()
SI_Error  RemoveConstrainingObject (SI_Int in_nIndex)
SI_Error  RemoveConstrainingObject (CSLModel *in_pConstrainingObject)
SI_Error  ClearConstrainingObjects ()
CSLConstraint CreateUpVector ()
CSLConstraint UpVector ()
SI_Error  DestroyUpVector ()
CSLConstraint ConnectUpVector (CSLConstraint *in_pUpVector)
CSLModel ConnectConstrainingObject (CSLModel *in_pModel)
virtual SI_Error  Synchronize ()
virtual ETemplateType  Type ()

Detailed Description

Describes a constraint.


Member Enumeration Documentation

enum EConstraintType

The EConstraintType enum contains possible types for a constraint

Enumerator:
SI_SCALING  Scaling constraint.
SI_ORIENTATION  Orientation constraint.
SI_DIRECTION  Direction constraint.
SI_POSITION  Position constraint.
SI_INTEREST  Interest constraint.
SI_UP_VECTOR  Up Vector constraint.
SI_PREFERED_AXIS  Prefered Axis constraint.


Constructor & Destructor Documentation

CSLConstraint ( CSLScene in_pScene,
CSLModel in_pModel,
CdotXSITemplate in_pTemplate,
EConstraintType  in_ConstraintType  
)

Constructor

Parameters:
in_pScene  Pointer to the scene containing the constraint
in_pModel  Pointer to the model containing the constraint
in_pTemplate  Pointer to the CdotXSITemplate containing the constraint
Returns:
an instance of CSLConstraint

virtual ~CSLConstraint (  )  [virtual]

Destructor


Member Function Documentation

CSLModel* GetReference (  ) 

Return the reference model of the constraint.

Returns:
CSLModel* Pointer to the reference model.

EConstraintType GetConstraintType (  ) 

Return the type of the constraint.

Returns:
EConstraintType Type of constraint.

SI_Error AddConstrainingObject ( CSLModel in_pConstrainingObject  ) 

Add a new constraining object to the constraint.

Parameters:
in_pConstrainingObject  Pointer to the constraining object.
Returns:
SI_Error Error code.

SI_Int GetConstrainingObjectCount (  ) 

Return the number of constraining objects in the constraint.

Returns:
SI_Int Number of constraining objects.

CSLModel** ConstrainingObjects (  ) 

Return an array of all constraining objects in the constraint.

Returns:
CSLBaseMaterial** Array of pointers to model objects.

SI_Error RemoveConstrainingObject ( SI_Int  in_nIndex  ) 

Remove a single constraining object from the constraint.

Parameters:
in_nIndex  Index of the constraining object to remove.
Returns:
SI_Error Error code.

SI_Error RemoveConstrainingObject ( CSLModel in_pConstrainingObject  ) 

Remove a single constraining object from the constraint.

Parameters:
in_pConstrainingObject  Pointer to the constraining object (model) to remove.
Returns:
SI_Error Error code.

SI_Error ClearConstrainingObjects (  ) 

Remove all constraining objects from the constraint.

Returns:
SI_Error Error code.

CSLConstraint* CreateUpVector (  ) 

Create a up vector constraint on the constraint.

Returns:
CSLConstraint* Newly creates constraint object.

CSLConstraint* UpVector (  ) 

Return the up vector constraint of the constraint.

Returns:
CSLConstraint* Pointer to a constraint object.

SI_Error DestroyUpVector (  ) 

Destroy the up vector constraint of the constraint.

Returns:
SI_Error Error code.

CSLConstraint* ConnectUpVector ( CSLConstraint in_pUpVector  ) 

Connects with an up vector constraint

Parameters:
in_pUpVector  the up vector constraint to connect to
Returns:
CSLConstraint* the up vector constraint

CSLModel* ConnectConstrainingObject ( CSLModel in_pModel  ) 

Connects with a constraining object

Parameters:
in_pModel  the constraining object to connect to
Returns:
CSLModel* the constraining model

virtual SI_Error Synchronize (  )  [virtual]

Synchronizes this constraint instance with its IO layer representation

Returns:
SI_Error
Return values:
SI_SUCCESS  this function always returns SI_SUCCESS

Reimplemented from CSLTemplate.

virtual ETemplateType Type (  )  [inline, virtual]

Get the template type

Returns:
ETemplateType the template type of the constraint

Implements CSLTemplate.


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