Class ILinkCtrl
See Also: Class Control.
class ILinkCtrl : public Control, public FPMixinInterface
Description:
This class is available in release 2.0 and later only.
This class represents the interface to the Link Controller. You can obtain a pointer to the link controller interface using; GetLinkConstInterface(cd). This macro will return
(LinkConstTransform*)(CD)->GetFPInterface(LINK_CONSTRAINT_INTERFACE).
Developers may use the following values to access the references of the Link controller.
LINKCTRL_CONTROL_REF
The TM controller
LINKCTRL_FIRSTPARENT_REF
The index of the first parent node.
LINKCTRL_PBLOCK_REF
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.
This method returns the number of parents (links).
Prototype:
virtual TimeValue GetLinkTime(int i)=0;
Remarks:
Returns the start time associated with the 'i-th' link.
Parameters:
int i
Specifies which parent (link).
Prototype:
virtual void SetLinkTime(int i, TimeValue t)=0;
Remarks:
Sets the start time associated with the 'i-th' link. See LinkTimeChanged() below. Note: This method also sorts the indices according to increasing time values.
Parameters:
int i
Specifies which parent (link).
TimeValue t
The time to set.
Prototype:
virtual void LinkTimeChanged()=0;
Remarks:
This method should be called after changing link times. Note: This method also sorts the indices according to increasing time values.
Prototype:
virtual void AddNewLink(INode *node,TimeValue t)=0;
Remarks:
Adds a new link at the specified time.
Parameters:
INode *node
Points to the node of the link to add.
TimeValue t
The time to change to this link.
Prototype:
virtual void DeleteTarget(int selection)=0;
Remarks:
This method will delete the specified link.
Parameters:
int selection
Specifies which link to delete.
Prototype:
virtual int GetFrameNumber(int targetNumber)=0;
Remarks:
This method returns the start frame of the specified target.
Parameters:
int targetNumber
The target number for which to get the start frame.
Prototype:
virtual BOOL SetFrameNumber(int targetNumber, int frameNumber)=0;
Remarks:
This method is available in release 4.0 and later only.
This method allows you to set the start frame of the specified target.
Parameters:
int targetNumber
The target number for which to set the start frame.
int frameNumber
The time value.
Return Value:
TRUE if the start frame is set, otherwise FALSE.
Prototype:
virtual BOOL SetTarget(INode *target, int targetNumber)=0;
Remarks:
This method is available in release 4.0 and later only.
Sets one of the link nodes that the link constraint controller targets, specified by targetNumber. If targetNumber is greater than the number of targets in the current list, it returns a FALSE. In this case use the function AppendTarget.
Parameters:
INode *target
Points to the node to follow
int targetNumber
The node number in the link target list to be set.
Return Value:
TRUE if successful, otherwise FALSE.
Prototype:
virtual BOOL AddTarget(INode *target, int frameNo)=0;
Remarks:
This method is available in release 4.0 and later only.
This method allows you to append a target.
Parameters:
INode *target
The target node to append.
int frameNo
The frame time.
Return Value:
TRUE if the target was appended, otherwise FALSE.
Prototype:
virtual INode* GetNode(int targetNumber)=0;
Remarks:
This method is available in release 4.0 and later only.
This method returns one of the link nodes that the link constraint controller targets, specified by targetNumber.
Parameters:
int targetNumber
The node number in the link target list to be obtained.