TransformComponent

Component that holds a GameObject’s world transformation information.  Also has some helper functions for transforming between local and world coordinates.

Summary
TransformComponentComponent that holds a GameObject’s world transformation information.
Functions
NKWorldToLocalPositionTransforms a world position to local space of this transform component.
NKWorldToLocalDirectionTransforms a directional vector from world space to local space of this transform component.
NKWorldToLocalVectorTransforms a vector from world space to local space of this transform component.
NKWorldToLocalOrienTransforms a world orientation to local space of this transform component.
NKLocalToWorldPositionTransforms a position from local space to world space.
NKLocalToWorldDirectionTransforms a local directional vector to world space.
NKLocalToWorldVectorTransforms a vector from local space to world space.
NKLocalToWorldOrienTransformed a local orientation to world orientation.

Functions

NKWorldToLocalPosition

Transforms a world position to local space of this transform component.  The position will be affected by scale.

Paramaters

vec3A position in world space

Returns

vec3The transformed position in local space to this transform

NKWorldToLocalDirection

Transforms a directional vector from world space to local space of this transform component.  Scale is ignored.

Paramaters

vec3A directional vector in world space

Returns

vec3The directional vector transformed into local space

NKWorldToLocalVector

Transforms a vector from world space to local space of this transform component.  Vector will be affected by scale.

Paramaters

vec3The vector in world space

Returns

vec3The vector transformed into local space

NKWorldToLocalOrien

Transforms a world orientation to local space of this transform component.

Paramaters

quatOrientation in world space

Returns

quatThe Orientation transformed into local space.

NKLocalToWorldPosition

Transforms a position from local space to world space.  Position will be affected by scale.

Paramaters

vec3The position in local space.

Returns

vec3The transformed position into world space.

NKLocalToWorldDirection

Transforms a local directional vector to world space.  Ignores scale.

Paramaters

vec3Directoinal vector in local space

Returns

vec3The transformed directional vector in world space

NKLocalToWorldVector

Transforms a vector from local space to world space.  The vector will be affected by scale.

Paramaters

vec3The vector in local space

Returns

vec3The transformed vector in world space

NKLocalToWorldOrien

Transformed a local orientation to world orientation.

Paramaters

quatLocal orientation

Returns

quatWorld orientation.
Close