INTRODUCTION TO MOTIONLINKS

A motionlink connects a source of position and orientation information to a target that will move corresponding to the data read from the source object. Normally the source object of a motionlink will be a sensor but it could also be path. The target types for a motionlink can be a viewpoint, movable, transform, or nodepath. The information for a motionlink is stored in a WTmotionlink object.

Motionlinks are extremely easy to create, enable, disable, and delete. While these are not the only functions that work with motionlinks they are the ones we will cover here.

Creating a new motionlink

WTmotionlink_new

Creates a new motionlink object and connects a target to a source of position/orientation information.

SYNTAX:

WTmotionlink *WTmotionlink_new(void *source, void *target, int SOURCE_TYPE, int TARGET_TYPE);

ARGUMENTS:

source -- The source of the position/orientation information this can be a pointer to a sensor or path.
target --
The target of the position/orientation information this can be a pointer to a viewpoint, movable, transform,
or nodepath
SOURCE_TYPE --
One of the predefined types WTSOURCE_SENSOR or WTSOURCE_PATH
TARGET_TYPE --
One of the predefined types WTTARGET_VIEWPOINT, WTTARGET_MOVABLE, WTTARGET_TRANSFORM, or WTTARGET_NODEPATH

RETURN TYPE:

A pointer to a type WTmotionlink

 

Assignment 11

project definition:

 

 

 

Enabling as Disabling Motionlinks

Every motionlink as an enabled property that can be set to TRUE or FALSE. By disabling the motionlink the target is no longer update with the source information. This is an easy way for the user to remove a link and still keep it around for future use. A good example of this would be toggling the mouse between navigation mode and pick mode.

 

WTmotionlink_enable

Enables and disables a motionlink

SYNTAX:

void WTmotionlink_enable(WTmotionlink *link, FLAG enabled);

ARGUMENTS:

link -- The motionlink in question
enabled --
If this argument is TRUE then the link is enables if FALSE then the motionlink is disabled

RETURN TYPE:

void

 

 

Assignment 12

project definition: