Class IOrientConstRotation

3DS Max Plug-In SDK

Class IOrientConstRotation

See Also: Class Control, Class FPMixinInterface.

class IOrientConstRotation : public Control, public FPMixinInterface

Description:

This class is available in release 4.0 and later only.

The Orientation Constraint matches the orientation of an object to its target without affecting its position. Multiple weighted targets are supported. This class is an interface to the parameters of this controllers. You can obtain a pointer to the list control interface using; GetIOrientConstInterface(cd). This macro will return (IOrientConstRotation*)(CD)->GetFPInterface(ORIENT_CONSTRAINT_INTERFACE).

ORIENT_ROT_PBLOCK_REF may be used to access the orientation constraint controller's references:

All methods of this class are Implemented by the System.

Methods:

public:

Prototype:

virtual INode* GetNode(int targetNumber)=0;

Remarks:

Gets one of the orientation nodes that the orientation constraint controller targets, specified by targetNumber.

Parameters:

int targetNumber

The node number in the orientation target list to be obtained.

Prototype:

virtual float GetTargetWeight(int targetNumber)=0;

Remarks:

Gets the weight of one of the orientation nodes that the orientation constraint controller targets, specified by targetNumber.

Parameters:

int targetNumber

The node number in the orientation target list to set.

Return Value:

Returns the orientation target weight if the targetNumber is relevant, 0.0f otherwise.

Prototype:

virtual BOOL SetTargetWeight(int targetNumber, float weight)=0;

Remarks:

Sets the weight of one of the orientation nodes that the orientation constraint controller follows, specified by targetNumber.

Parameters:

int targetNumber

The node number in the orientation target list whose weight is to be set.

float weight

The weight to set.

Return Value:

TRUE if there is more than one orientation target in the list and you are trying to set weight, FALSE otherwise.

Prototype:

virtual BOOL AppendTarget(INode *target, float weight=50.0)=0;

Remarks:

Appends the current orientation target list by one and appends the current orient_targ_wtlist (orientation target weightlist) by one.

Parameters:

INode *target

The node that is to be appended to the current orientation target list.

float weight=50.0

This is the weight that is to be assigned to the newly appended orientation target. The default weight is 50.0.

Return Value:

TRUE if the target was appended, otherwise FALSE.

Prototype:

virtual int GetNumTargets()=0;

Remarks:

Returns the number of target nodes in the orientation target list.

Prototype:

virtual BOOL DeleteTarget(int selection)=0;

Remarks:

This method allows you to delete a specified target.

Parameters:

int selection

The node number in the orientation target list to delete.

Return Value:

TRUE if successful, otherwise FALSE.