Математика

Физика

Химия

Биология

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

transform (property)

Usage

member(whichCastmember).node(whichNode).transform

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

Property

member(whichCastmember).model(whichModel).bonesPlayer.\

bone[boneID].transform

member(whichCastmember).model(whichModel).bonesPlayer.\

bone[boneID].transform.transformProperty

Description

3D property and command; allows you to get or set the transform associated with a particular

node or a specific bone within a model using the bonesPlayer modifier. As a command,

transform provides access to the various commands and properties of the transform object. A

node can be a camera, group, light or model object.

For node objects, this property defaults to the identity transform. A node’s transform defines the

position, rotation and scale of the node relative to is parent object. If a node’s parent is the World

group object, then the transform property of the node has the same value as is returned by the

getWorldTransform() command.

transform (property) 1057

For bones within models using the bonesPlayer modifier, this property defaults in value to the

transform assigned to the bone upon creation of the model file. The transform of a bone

represents the bone’s rotation relative to its parent bone and its position relative to its original

joint position. The original joint position is determine upon creation of the model file.

You can use the following transform commands and properties with the transform property of

node objects:

Note: This section only contains summaries, see the individual entries for more detailed information.

• preScale applies scaling before the current positional, rotational, and scale offsets held by

the transform.

• preTranslate applies a translation before the current positional, rotational, and scale offsets

held by the transform.

• preRotate applies a rotation before the current positional, rotational, and scale offsets held by

the transform.

• scale (command) applies scaling after the current positional, rotational, and scale offsets held

by the transform.

• scale (transform) allows you to get or set the degree of scaling of the transform.

• translate applies a translation after the current positional, rotational, and scale offsets held

by the transform.

• rotate applies a rotation after the current positional, rotational, and scale offsets held by

the transform.

• position (transform) allows you to get or set the positional offset of the transform.

• rotation (transform) allows you to get or set the rotational offset of the transform.

If you want to modify the transform property of a bone within a model, then you must store a

copy of the original transform of the bone, modify the stored copy using the above commands

and properties, then reset the bone’s transform property so that it is equal to the modified

transform. For example:

t = member(“character”).model(“biped”).bonesPlayer.bone[38].\

transform.duplicate()

t.translate(25,0,-3)

member(“character”).model(“biped”).bonesPlayer.bone[38].\

transform = t

Parameters

None.

Example

This Lingo shows the transform of the model box, followed by the position and rotation

properties of the transform:

put member("3d world").model("box").transform

-- 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").transform.position

-- vector(-94.1448, 119.0128, 0.0000)

put member("3d world").model("box").transform.rotation

--vector(0.0000, 0.0000, 0.0000)

Назад

 

 

Hosted by uCoz