Математика

Физика

Химия

Биология

Техника и    технологии

getWorldTransform()

Usage

member(whichCastmember).node(whichNode).getWorldTransform()

member(whichCastmember).node(whichNode).getWorldTransform().\

position

member(whichCastmember).node(whichNode).getWorldTransform().\

rotation

member(whichCastmember).node(whichNode).getWorldTransform().scale

Description

3D command; returns the world-relative transform of the model, group, camera, or light

represented by node.

The transform property of a node is calculated relative to the transform of the node’s parent, and

is therefore parent-relative. The getWorldTransform() command calculates the node’s transform

relative to the origin of the 3D world, and is therefore world-relative.

Use member(whichCastmember).node(whichNode).getWorldTransform().position to find

the position property of the node’s world-relative transform. You can also use worldPosition as a

shortcut for getWorldTransform().position.

Use member(whichCastmember).node(whichNode).getWorldTransform().rotation to find

the rotation property of the node’s world-relative transform.

Use member(whichCastmember).node(whichNode).getWorldTransform().scale to find the

scale property of the node’s world-relative transform.

These properties can be tested but not set.

348 Chapter 12: Methods

Example

This statement shows the world-relative transform of the model named Box, followed by its

position and rotation properties:

put member("3d world").model("Box").getworldTransform()

-- transform(1.000000,0.000000,0.000000,0.000000, \

0.000000,1.000000,0.000000,0.000000, \

0.000000,0.000000,1.000000,0.000000, - \

94.144844,119.012825,0.000000,1.000000)

put member("3d world").model("Box"). getworldTransform().position

-- vector(-94.1448, 119.0128, 0.0000)

put member("3d world").model("Box"). getworldTransform().rotation

--vector(0.0000, 0.0000, 0.0000)

Назад

 

 

Hosted by uCoz