Draws the three axes of a node as colored lines of the given length, parented to it, so its position and orientation can be seen; the default colors are red for X, green for Y and blue for Z.
The node, the axis colors and the axis length
Draws the three axes of several nodes as colored lines of the given length, each set parented
to its node, as drawNode does for one.
The nodes, the axis colors and the axis length
Creates a node at origin turned by the three rotation angles in degrees around X, Y and
Z, inside the coordinate system of parent when one is given.
The optional parent, the origin and the rotation angles in degrees
The new node
Creates a node parented to the root node of the scene, a fresh starting point for building a hierarchy at the world origin.
The new node, whose parent is the scene's root node
Reads the direction a node's local Z axis points in world space, with every parent's rotation applied.
The node
The forward direction as a vector
Reads the direction a node's local X axis points in world space, with every parent's rotation applied.
The node
The right direction as a vector
Reads the direction a node's local Y axis points in world space, with every parent's rotation applied.
The node
The up direction as a vector
Reads where a node's origin is in world space, with every parent's transform applied.
The node
The world position as a point
Reads the rotation of a node in world space, with every parent's rotation applied, as a 4x4 matrix of 16 numbers.
The node
The rotation as a matrix of 16 numbers
Reads the rotation of a node relative to its parent as a 4x4 matrix of 16 numbers; the node
must carry a rotation quaternion, which rotate and setDirection give it.
The node
The rotation as a matrix of 16 numbers
Lists the nodes and meshes parented directly under a node, the ones that move with it.
The node
The direct children
Reads the node a node is parented to, the one it moves with; a top-level node has none.
The node
The parent node
Reads a node's position measured in its own local axes rather than its parent's, which differs once the node is rotated.
The node
The position as a point in the node's local space
Gives the root node of the scene, the top of the hierarchy that createWorldNode parents to.
The root node
Reads a node's rotation relative to its parent as three angles in degrees around X, Y and Z.
The node
The rotation angles in degrees
Turns a node by angle degrees around an axis that passes through position, so the node
orbits that point rather than spinning in place; its children follow.
The node, the point on the axis, the axis direction and the angle in degrees
Turns a node by angle degrees around an axis through its own origin, on top of its current
rotation; its children follow.
The node, the axis direction and the angle in degrees
Moves a node to a point in world space, whatever its parents are; its children follow.
The node and the world position
Turns a node so its local Z axis points along direction; its children follow.
The node and the direction
Parents a node to another so it moves with it from then on, keeping its current place in the world; a null parent detaches it.
The node and the new parent
Moves a node by distance scene units along direction, given in the node's own local axes;
its children follow.
The node, the direction and the distance
Transform nodes: invisible points with a position and an orientation that meshes and other nodes can be parented to, so a whole group moves as one. Building a hierarchy of nodes is how complex arrangements are placed: turn the parent and every child turns with it. The methods here create nodes, read their axes and positions in world or local space, and move, rotate and reparent them; angles are in degrees.