jit.anim.node
Description
The jit.anim.node object represents a transformation (position, orientation and scale) in 3D space. OpenGL objects bind to a jit.anim.node and receive position, rotate, and scale attributes. In addition, parent-child relationships can be established in a hierarchical transformation structure, where child jit.anim.node objects are transformed relative to their parents.
Examples

Discussion
Messages are provided that allow for translating, rotating and scaling relative to the current transform in either local space, parent space, or absolute world space. Additional attributes are provided for advanced control when a jit.anim.node is bound to a jit.gl.camera.
Attributes
anchor [3 floats]
Adjust the node anchor (pivot) position (default = 0 0 0). This is the position around which the node will rotate.
anim [symbol]
Parent anim_node name
animmode [symbol]
Set both turnmode and movemode attributes (default = parent).
Possible values:
'local'
( transform relative to local axis )
'parent'
( transform relative to parent axis )
'world'
( transform relative to world axis )
automatic [int]
Enable automatic updates from draw context (default = 1).
direction [3 floats]
One way to set the orientation. The node will orient so that it's local Z axis will align with the axis provided. (default = 0 0 1)
inherit_position [int]
Enable inheriting of position values from the parent node (default = 1).
inherit_rotate [int]
Enable inheriting of rotation values from the parent node (default = 1).
inherit_scale [int]
Enable inheriting of scale values from the parent node (default = 1).
invtransform [16 floats]
Retrieve the inverse world transform
locklook [int]
Force the node to remain pointed at the lookat value, ignoring orientation messages and attributes (default = 0).
lockplane [int]
Cause translation values of the specified plane to be set to zero for
Possible values:
0 = 'none'
1 = 'x-plane'
2 = 'y-plane'
3 = 'z-plane'
lookat [3 floats]
One way to set the orientation. The node will orient so that it's local Z points to the 3D position provided. (default = 0 0 0)
movemode [symbol]
Determines which space the
Possible values:
'local'
( move relative to local axis )
'parent'
( Move relative to parent axis )
'world'
( Move relative to world axis )
name [symbol]
The instance name. Ob3ds can set their anim attribute to this value to bind to this node.
parentpos [3 floats]
Set by the node named by the anim attribute. Specifies a position in 3D space that will be concatenated with the local position to derive the world position. (default = 0 0 0)
parentquat [4 floats]
Set by the node named by the anim attribute. Specifies a quaternion orientation that will be concatenated with the local orientation to derive the world orientation. (default = 0 0 0 1)
parentrot [4 floats]
Set by the node named by the anim attribute. Specifies an angle-axis orientation that will be concatenated with the local orientation to derive the world orientation. (default = 0 0 0 1)
parentscale [3 floats]
Set by the node named by the anim attribute. Specifies a scale value that will be concatenated with the local scale to derive the world scale. (default = 1 1 1)
position [3 floats]
Specifies a position in 3D space. This position is relative to the position provided by the parent node. (default = 0 0 0)
quat [4 floats]
Specifies a quaternion orientation in 3D space. This orientation is relative to the orientation provided by the parent node. (default = 0 0 0 1)
rotate [4 floats]
Specifies an angle-axis orientation in 3D space. This orientation is relative to the orientation provided by the parent node. (default = 0 0 0 1)
rotate_order [symbol]
Set the order rotations are applied for the rotatexyz attribute (default = auto). E.G. if set to xyz , the object is first rotated around its X axis, then Y, and finally Z. The default of auto implements yzx ordering. To replicate Max 5, use zyx . If an ob3d is bound, this will override the rotate_order inherited from its jit.gl.render context.
Possible values:
'auto'
'xyz'
'xzy'
'yxz'
'yzx'
'zxy'
'zyx'
rotatexyz [3 floats]
Specifies an Euler orientation in 3D space. This orientation is relative to the orientation provided by the parent node. (default = 0 0 0)
scale [3 floats]
The local 3D scaling factor in the form x y z (default = 1. 1. 1.)
transform [16 floats]
Get and set the full local 4x4 matrix transformation.
tripod [int]
Force the node to orient itself as if mounted on a tripod. Y-axis turnmode (default = 0).
values are applied in world-space regardless ofturnmode [symbol]
Determines which space the
Possible values:
'local'
( Rotate relative to local axis )
'parent'
( Rotate relative to parent axis )
'world'
( Rotate relative to world axis )
worlddir [3 floats]
Retrieve the worldspace direction vector.
worldpos [3 floats]
A position in 3D space that is derived from the local position and parent position. (default = 0 0 0)
worldquat [4 floats]
An orientation in 3D space that is derived from the local orientation and the parent orientation. (default = 0 0 0 1)
worldrot [4 floats]
An orientation in 3D space that is derived from the local orientation and the parent orientation. (default = 0 0 0 1)
worldscale [3 floats]
A scaling value in 3D space that is derived from the local scale and the parent scale. (default = 1 1 1)
worldtransform [16 floats]
The full world transformation
Common Box Attributes
Messages
bang
anim_grow
Arguments
y [float]
z [float]
anim_move
Arguments
y [float]
z [float]
anim_reset
anim_turn
Arguments
y [float]
z [float]
concat
grow
Arguments
y [float]
z [float]
localtoworld
Arguments
y [float]
z [float]
localtoworld_quat
Arguments
y [float]
z [float]
w [float]
move
Arguments
y [float]
z [float]
reset
turn
Arguments
y [float]
z [float]
update_node
worldtolocal
Arguments
y [float]
z [float]
worldtolocal_quat
Arguments
y [float]
z [float]
w [float]
See Also
Name | Description |
---|---|
jit.anim.drive | |
jit.anim.path | |
jit.gl.camera |