3ds Max C++ API Reference
IGameConstraint Class Referenceabstract

Simple wrapper class for constraints. More...

#include <IGameControl.h>

+ Inheritance diagram for IGameConstraint:

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. More...
 
virtual IGameNodeGetConstraintNodes (int index)=0
 Get the constraint Node. More...
 
virtual float GetConstraintWeight (int nodeIndex)=0
 Get the influence of the bone. More...
 
virtual int GetLinkConstBeginFrame (int index)=0
 Get the start frame for the Link constraint. More...
 
virtual ConstraintType GetConstraintType ()=0
 Get the type of Constraint. More...
 
- Public Member Functions inherited from IExportEntity
virtual ~IExportEntity ()
 Destructor. More...
 
virtual IPropertyContainerGetIPropertyContainer ()
 Retrieve the Property Container. More...
 
virtual bool IsEntitySupported ()
 Is the Entity directly supported. More...
 
virtual const MCHARGetClassName ()=0
 Retrieves the name of the entity class. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

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.

Member Enumeration Documentation

◆ ConstraintType

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.

499  {
500  IGAME_PATH,
502  IGAME_LOOKAT,
504  IGAME_LINK,
505  IGAME_UNKNOWN,
506  };
@ IGAME_UNKNOWN
Unknown Constraint.
Definition: IGameControl.h:505
@ IGAME_LOOKAT
look At Constraint
Definition: IGameControl.h:502
@ IGAME_ORIENTATION
Orientation Constraint.
Definition: IGameControl.h:501
@ IGAME_LINK
A TM link constraint.
Definition: IGameControl.h:504
@ IGAME_PATH
Path Constraint.
Definition: IGameControl.h:500
@ IGAME_POSITION
Position Constraint.
Definition: IGameControl.h:503

Member Function Documentation

◆ NumberOfConstraintNodes()

virtual int NumberOfConstraintNodes ( )
pure virtual

Number of constraining Node.

The number of nodes in use by the Constraint system

Returns
The number of nodes

◆ GetConstraintNodes()

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
indexThe index of the node to retrieve
Returns
A pointer to IGameNode

◆ GetConstraintWeight()

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
nodeIndexThe node index to query
Returns
The weight value

◆ GetLinkConstBeginFrame()

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
indexThe node index
Returns
The start frame for the node queried.

◆ GetConstraintType()

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