Class IPosConstPosition

3DS Max Plug-In SDK

Class IPosConstPosition

See Also: Class Control, Class FPMixinInterface.

class IPosConstPosition : public Control, public FPMixinInterface

Description:

This class is available in release 4.0 and later only.

This class represents the interface to the Position Constraint. You can obtain a pointer to the position constraint interface using; GetIPosConstInterface(cd). This macro will return

(IPosConstPosition*)(CD)->GetFPInterface(POS_CONSTRAINT_INTERFACE).

POSPOS_PBLOCK_REF may be used to access the position 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 position nodes that the position constraint controller targets, specified by targetNumber.

Parameters:

int targetNumber

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

Prototype:

virtual float GetTargetWeight(int targetNumber)=0;

Remarks:

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

Parameters:

int targetNumber

The node number in the position target list to set.

Return Value:

Returns the position 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 position nodes that the position constraint controller follows, specified by targetNumber.

Parameters:

int targetNumber

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

float weight

The weight to set.

Return Value:

TRUE if there is more than one position 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 position target list by one and appends.

Parameters:

INode *target

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

float weight=50.0

This is the weight that is to be assigned to the newly appended position 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 position 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 position target list to delete.

Return Value:

TRUE if successful, otherwise FALSE.