C4 Engine
C4 Engine API Documentation

Node::SetNodeTransform

Defined in:  C4Node.h
Sets a node's local transform.
Prototype

void SetNodeTransform(const Transform4D& transform);

void SetNodeTransform(const Matrix3D& matrix, const Point3D& position);

void SetNodeTransform(const Vector3D& c1, const Vector3D& c2, const Vector3D& c3, const Point3D& c4);

Parameters
transform The new local transform.
matrix The new upper-left 3 × 3 portion of the local transform.
position The new local position.
c1 The first column of the 4D transform.
c2 The second column of the 4D transform.
c3 The third column of the 4D transform.
c4 The fourth column of the 4D transform.
Description
The SetNodeTransform function sets a node's local transform. This transform represents the change in coordinates between a node's local coordinate system (object space) and the coordinate system of its immediate parent node.

After the node transform has been set, the world transform returned by the Transformable::GetWorldTransform function is not valid until the node is updated. To cause a node to be updated, the Node::InvalidateNode function should be called after altering its transform. The node will then be updated the next time the World Manager processes the scene containing it or when the Node::UpdateNode function is explicitly called for the node.
Special Considerations
The SetNodeTransform function should not be called for any node under the control of the physics simulation through a RigidBodyController. Instead, the RigidBodyController::SetRigidBodyTransform function should be called.
See Also

Node::GetNodeTransform

Node::SetNodeMatrix3D

Node::SetNodePosition

Transformable::GetWorldTransform

Transform4D