Class IPathPosition

3DS Max Plug-In SDK

Class IPathPosition

See Also: Class Control, Class INode.

class IPathPosition : public Control, public FPMixinInterface

Description:

This class is available in release 2.0 and later only.

This class represents the interface to the Path Position Controller. You can obtain a pointer to the path position controller interface using; GetIPathConstInterface(cd). This macro will return

(IPathPosition*)(CD)->GetFPInterface(PATH_CONSTRAINT_INTERFACE).

PATHPOS_PATH_REF may be used to access the position constraint controller's references and PATHPOS_PBLOCK_REF to reference the parameter block.

All methods of this class are Implemented by the System.

Methods:

public:

Prototype:

virtual int GetNumTargets()=0;

Remarks:

This method is available in release 4.0 and later only.

Returns the number of nodes in the path list.

Prototype:

virtual INode* GetNode(int targetNumber)=0;

Remarks:

This method is available in release 4.0 and later only.

Gets one of the path nodes that the path controller follows, specified by targetNumber.

Parameters:

int targetNumber

The node number in the path list to be obtained.

Prototype:

virtual float GetTargetWeight(int targetNumber)=0;

Remarks:

This method is available in release 4.0 and later only.

Gets the weight of one of the path nodes that the path controller follows, specified by targetNumber, and time t. If the targetNumber is not relevant then 0.0f is returned.

Parameters:

int targetNumber

The node number in the path list whose weight is to be obtained.

Prototype:

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

Remarks:

This method is available in release 4.0 and later only.

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

Parameters:

int targetNumber

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

float weight

The weight to assign.

Return Value:

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

Prototype:

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

Remarks:

This method is available in release 4.0 and later only.

Appends the current path list by one and appends the current weight list by one.

Parameters:

INode *target

The node that is to be appended to the current path list.

float weight=50.0

The weight to be assigned to the newly appended path.

Prototype:

virtual BOOL DeleteTarget(int selection)=0;

Remarks:

This method is available in release 4.0 and later only.

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.

Prototype:

virtual void SetFollow(BOOL f)=0;

Remarks:

This method allows you to set the follow flag.

Parameters:

BOOL f

TRUE for on, FALSE for off.

 

Prototype:

virtual BOOL GetFollow()=0;

Remarks:

This method returns the state of the follow flag. TRUE if on; FALSE if off.

Prototype:

virtual void SetBankAmount(float a)=0;

Remarks:

Sets the bank amount parameter.

Bank and tracking are scaled in the UI.

The bank values are scaled in the user interface. The following macros may be used to convert to and from the UI values.

#define BANKSCALE 100.0f

#define FromBankUI(a) ((a)*BANKSCALE)

#define ToBankUI(a)  ((a)/BANKSCALE)

Parameters:

float a

The bank amount.

Prototype:

virtual float GetBankAmount()=0;

Remarks:

Returns the bank amount setting. See the remarks in SetBankAmount() above.

Prototype:

virtual void SetBank(BOOL b)=0;

Remarks:

Sets the bank parameter to on or off.

Parameters:

BOOL b

TRUE for on; FALSE for off.

Prototype:

virtual BOOL GetBank()=0;

Remarks:

Returns the on/off state of the bank parameter. TRUE if on; FALSE if off.

Prototype:

virtual void SetTracking(float t)=0;

Remarks:

Sets the smoothness parameter.

The smoothing (tracking) values are scaled in the user interface. The following macros may be used to convert to and from the UI values.

#define TRACKSCALE 0.04f

#define FromTrackUI(a) ((a)*TRACKSCALE)

#define ToTrackUI(a) ((a)/TRACKSCALE)

Parameters:

float t

The smoothness setting.

Prototype:

virtual float GetTracking()=0;

Remarks:

Returns the smoothness setting. See remarks in SetTracking() above.

Prototype:

virtual void SetAllowFlip(BOOL f)=0;

Remarks:

Sets the state of the 'Allow Upside Down' parameter.

Parameters:

BOOL f

TRUE for on; FALSE for off.

Prototype:

virtual BOOL GetAllowFlip()=0;

Remarks:

Returns the state of the 'Allow Upside Down' parameter.

Return Value:

TRUE for on; FALSE for off.

Prototype:

virtual void SetConstVel(BOOL cv)=0;

Remarks:

Sets the state of the 'Constant Velocity' parameter.

Parameters:

BOOL cv

TRUE for on; FALSE for off.

Prototype:

virtual BOOL GetConstVel()=0;

Remarks:

Returns the state of the 'Constant Velocity' parameter.

Return Value:

TRUE for on; FALSE for off.

Prototype:

virtual void SetFlip(BOOL onOff)=0;

Remarks:

Sets the state of the 'Flip' parameter.

Parameters:

BOOL onOff

TRUE for on; FALSE for off.

Prototype:

virtual BOOL GetFlip()=0;

Remarks:

Returns the state of the 'Flip' parameter.

Return Value:

TRUE for on; FALSE for off.

Prototype:

virtual void SetAxis(int axis)=0;

Remarks:

Set the state of the axis parameter.

Parameters:

int axis

The axis setting. One of the following values:

0: X axis.

1: Y axis.

2: Z axis.

Prototype:

virtual int GetAxis()=0;

Remarks:

Returns the axis setting.

Return Value:

One of the following values:

0: X axis.

1: Y axis.

2: Z axis.

Prototype:

virtual void SetLoop(BOOL l)=0;

Remarks:

This method allows you to set the state of the loop flag.

Parameters:

BOOL l

TRUE for on; FALSE for off.

Prototype:

virtual BOOL GetLoop()=0;

Remarks:

Returns the state of the loop flag.

Return Value:

TRUE for on; FALSE for off.

Prototype:

virtual void SetRelative(BOOL rel)=0;

Remarks:

This method allows you to set the state of the relative/absolute flag.

Parameters:

BOOL rel

TRUE to set to relative; FALSE to set to absolute.

Prototype:

virtual BOOL GetRelative()=0;

Remarks:

Returns the state of the relative/absolute flag.

Return Value:

TRUE if relative is on; FALSE is off (i.e. absolute).