Public Types | Public Member Functions

IGameConstraint Class Reference

Search for all occurrences

Detailed Description

Simple wrapper class for constraints.

A unified wrapper around the various constraints that are available in 3ds Max. There is access to the type of constraint in use, plus easier access to the constraints. If further access it needed, the IPropertyContainer interface can be used and additions made to property file used to access other data, as the source for these constraints is available in the SDK.

#include <IGameControl.h>

Inheritance diagram for IGameConstraint:
Inheritance graph
[legend]

List of all members.

Public Types

enum   ConstraintType {
  IGAME_PATH, IGAME_ORIENTATION, IGAME_LOOKAT, IGAME_POSITION,
  IGAME_LINK, IGAME_UNKNOWN
}
 

Various 3ds Max Constraints.

More...

Public Member Functions

virtual int  NumberOfConstraintNodes ()=0
  Number of constraining Node.
virtual IGameNode GetConstraintNodes (int index)=0
  Get the constraint Node.
virtual float  GetConstraintWeight (int nodeIndex)=0
  Get the influence of the bone.
virtual int  GetLinkConstBeginFrame (int index)=0
  Get the start frame for the Link constraint.
virtual ConstraintType  GetConstraintType ()=0
  Get the type of Constraint.

Member Enumeration Documentation

Various 3ds Max Constraints.

These are the constraints supported by IGame

Enumerator:
IGAME_PATH 

Path Constraint.

IGAME_ORIENTATION 

Orientation Constraint.

IGAME_LOOKAT 

look At Constraint

IGAME_POSITION 

Position Constraint.

IGAME_LINK 

A TM link constraint.

IGAME_UNKNOWN 

Unknown Constraint.


Member Function Documentation

virtual int NumberOfConstraintNodes ( ) [pure virtual]

Number of constraining Node.

The number of nodes in use by the Constraint system

Returns:
The number of nodes
virtual IGameNode* GetConstraintNodes ( int  index ) [pure virtual]

Get the constraint Node.

The actual node of the index passed in that is working in the system

Parameters:
index The index of the node to retrieve
Returns:
A pointer to IGameNode
virtual float GetConstraintWeight ( int  nodeIndex ) [pure virtual]

Get the influence of the bone.

This is the weight, or influence the specified node has in the constraint system. The index used here is the same as the index used in IGameConstraint::GetConstraintNodes, otherwise the weights will not match. This has no effect for a Link Constraint

Parameters:
nodeIndex The node index to query
Returns:
The weight value
virtual int GetLinkConstBeginFrame ( int  index ) [pure virtual]

Get the start frame for the Link constraint.

This specifies when the link for the n'th node will start.

Parameters:
index The node index
Returns:
The start frame for the node queried.
virtual ConstraintType GetConstraintType ( ) [pure virtual]

Get the type of Constraint.

This defines the actual constraint being used on the controller

Returns:
The type of max constraint. It can be one ConstraintType enum

IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint
IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint IGameConstraint