LookAt_Constraint interfaces:

This class is an interface to the LookAt Constraint rotation controller.

Interface: constraints

Methods

<node>getTarget <index>index

This method will return a pointer to a node of one of the Look-At nodes that the Look-At constraint controller targets, specified by targetNumber.

<index>index: The node number in the Look-At target list to be obtained.

<boolean>setTarget <node>target <index>index

Sets one of the Look-At nodes that the Look-At constraint controller targets, by targetNumber. If targetNumber is greater than the number of targets in the current list, it returns false. In this case use the function AppendTarget. Returns true if successful; False otherwise.

<node>target: Points to the node to follow.

<index>index: The node number in the Look-At target list to be set.

<float>getWeight <index>index <time>time

Gets the weight of one of the Look-At nodes that the Look-At constraint controller targets, specified by targetNumber, and time t.

<index>index : The node number in the Look-At target list whose weight is to be obtained.

<time>time: The time at which the weight is to be obtained. The weights are animatable.

<boolean>setWeight <float>weight <index>index <time>time

Sets the weight of one of the Look-At nodes that the Look-At constraint controller follows, specified by targetNumber, and time t. Returns true if there is more than one Look-At targets in the list and you are trying to set weight, False otherwise.

<float>weight : The weight to set.

<index>index : The node number in the Look-At target list whose weight is to be set.

<time>time: The time at which the weight is to be set. The weights are animatable.

<integer>getNumTargets()

Returns the number of nodes in the list of nodes to look at.

<void>appendWeightedTarget <node>target <float>weight

Appends the current Look-At target list by one and appends the current Look-At target weightlist by one.

<node>target : The node that is to be appended to the current Look-At target list.

<float>weight: This is the weight that is to be assigned to the newly appended Look-At target. The default weight is 50.0.

<boolean>appendTarget <node>target

Appends the current Look-At target list by one and appends the current Look-At target weightlist by one.

<node>target: The node that is to be appended to the current Look-At target list.

<boolean>getRelative()

Gets the relative/absolute mode corresponding to the "Keep Initial Offset" checkbox in the UI.

<boolean>getUpnodeWorld()

Returns true if the "World" checkbox is on; False if off.

<boolean>getStoUpAxisFlip()

Returns true if the "selected" axis flip checkbox is on; False if off.

<boolean>getTargetAxisFlip()

Returns true if the "source" axis flip checkbox is on; False if off.

<boolean>getSetOrient()

Returns true if the orientation flag is set, False if off.

<boolean>getTargetAxis()

Gets the selection corresponding to the "Select LookAt Axis" button in the UI. Obtains which of the source axes is required to coincide with the target axis. This method returns one of the following values:

0: If the target axis coincides with the x axis of the source object.

1: If the target axis coincides with the y axis of the source object.

2: If the target axis coincides with the z axis of the source object.

<boolean>getUpNodeAxis()

Gets the selection corresponding to the "Source/Upnode Alignment: Aligned to UpNode Axis:" radiobutton in the UI. Obtains which of the upnode axes is required to align with a specified source axis. This method returns one of the following values:

0: If the upnode x axis coincides with a specified source object.

1: If the upnode y axis coincides with a specified source object.

2: If the upnode z axis coincides with a specified source object.

<boolean>getStoUPAxis()

Gets the selection corresponding to the "Source/Upnode Alignment: Aligned to UpNode Axis:" radiobutton in the UI. Obtains which of the source axes is required to align with a specified upnode axis. This method returns one of the following values:

0: If the source x axis coincides with a specified upnode axis.

1: If the source y axis coincides with a specified upnode axis.

2: If the source z axis coincides with a specified upnode axis.

<void>setRelative <boolean>rel

This method allows you to set the "relative" flag.

<boolean>rel: True to set the relative flag, otherwise False.

<void>setUpnodeWorld <boolean>upnode

This method allows you to set the "World" flag.

<boolean>upnode: True to set the world flag, otherwise false.

<void>setTargetAxisFlip <boolean>staxflip

This method allows you to set the "source" flip axis flag.

<boolean>staxflip: True to set the source flip axis flag, otherwise false.

<void>setStoUPAxisFlip <boolean>ssuaflip

This method allows you to set the "selected" axis flip flag.

<boolean>ssuaflip: True to set the selected axis flip flag, otherwise false.

<void>setSetOrient <boolean>ssorient

This method allows you to set the orientation flag.

<boolean>ssorient: True to set the orientation flag, otherwise false.

<void>setResetOrient()

Resets to zero the amount of orientation offset, effected through the "Set Orientation" feature.

<void>setTargetAxis <integer>staxis

Sets the selection corresponding to the "Set Orientation" button in the UI. Specifies which of the source axes is required to coincide with the target axis.

<integer>staxis:

0: if TargetAxis coincides with the X axis of the source object.

1: if TargetAxis coincides with the Y axis of the source object.

2: if TargetAxis coincides with the Z axis of the source object

<void>setUpNodeAxis <integer>sunaxis

Sets the selection corresponding to the "Source/Upnode Alignment: Aligned to UpNode Axis:" radiobutton in the UI. Specifies which of the upnode axes is required to align with a specified source axis.

<integer>sunaxis:

0: if the upnode X axis coincides with a specified source axis.

1: if the upnode Y axis coincides with a specified source axis.

2: if the upnode Z axis coincides with a specified source axis.

<void>setStoUPAxis <integer>ssuaxis

Sets the selection corresponding to the "Source/Upnode Alignment: Aligned to UpNode Axis:" radiobutton in the UI. Specifies which of the source axes is required to align with a specified upnode axis.

<integer>ssuaxis:

0: if the source X axis coincides with a specified upnode axis.

1: if the source Y axis coincides with a specified upnode axis.

2: if the source Z axis coincides with a specified upnode axis.

<boolean>GetVLisAbs()

Gets the ViewLine relative/absolute mode corresponding to the "Keep ViewLine Length Absolute" checkbox in the UI. When Viewline Length is absolute, the "ViewLine Length" spinner sets the length of the ViewLine. A negative length implies that starting from the source object the line travels opposite to the direction of the target object. The source/target distance has no effect on the ViewLine length in this mode. If the "Keep ViewLine Length Absolute" checkbox is unchecked, the ViewLine length is determined from the spinner value, which is interpreted as a percentage of the source/target distance. Returns true if the ViewLine length is absolute, false otherwise.

<void>SetVLisAbs <boolean>rel

Sets the relative/absolute mode corresponding to the "Keep ViewLine Length Absolute" checkbox in the UI.

<boolean>rel: True if "Keep ViewLine Length Absolute" is active (checked), false otherwise.

<void>deleteTarget <integer>targetNumber

This method allows you to delete a specified target.

<integer>targetNumber: The zero based node number in the list of nodes the controller looks at.

See also Class IlookAtConstRotation, in the SDK Help file accompanying this product.