Libraries.Game.Collision.PhysicsPosition3D Documentation

This class stores coordinate systems in 3D space, where the coordinate system represent the position of the 3D item and the tilt of the 3D item with respect to your screen. NOTE: this class can be seen as the class that stores a 4x4 transformation matrix.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetBasis()This action gets the tilt of the 3D object (the rotational part of the transformation matrix).
GetHashCode()This action gets the hash code for an object.
GetMatrix(Libraries.Compute.Matrix4 matrix)This action returns a 4x4 transformation matrix representation of this PhysicsPosition3D.
GetOrigin()This action gets the position of the 3D object (the 3D object's local origin with respect to the global coordinates).
GetRotation()This action returns a quaternion (another holder of the position and tilt information) that represents the current PhysicsPosition3D.
Inverse(Libraries.Game.Collision.PhysicsPosition3D transform)This action stores the inverse of the transformation matrix passed in.
Inverse()This action calculates the inverse of the transformation matrix stored inside this PhysicsPosition3D.
InverseTransform(Libraries.Compute.Vector3 in, Libraries.Compute.Vector3 out)This action multiplies "Vector3 in" with the inverse of the current PhysicsPosition3D and store the result in "Vector3 out.
Multiply(Libraries.Game.Collision.PhysicsPosition3D transform)This action changes the current PhysicsPosition3D with respect to the current PhysicsPosition3D using the "PhysicsPosition3D transform" passed in.
Multiply(Libraries.Game.Collision.PhysicsPosition3D transform1, Libraries.Game.Collision.PhysicsPosition3D transform2)This action multiplies two transformation matrices together and store the result in the current PhysicsPosition3D.
Set(Libraries.Compute.Matrix4 matrix)This action sets the position of a 3D object using a matrix that contains both the tilt of the object and the position of the 3D object's center with respect to the world center.
Set(Libraries.Compute.Matrix3 matrix)This action sets the tilt of the 3D object and reset the position of the 3D object (the 3D object's local origin) to the global coordinate's origin.
Set(Libraries.Game.Collision.PhysicsPosition3D transform)This action sets the location and the tilt of the 3D object using another PhysicsPosition3D.
Set(Libraries.Compute.Matrix3 basis, Libraries.Compute.Vector3 origin)This action sets the tilt of the 3D object using "Matrix3 basis" and sets the location of the 3D object using "Vector3 origin.
SetRotation(Libraries.Compute.Quaternion quaternion)This action sets the current PhysicsPosition3D using a quaternion that is passed in.
SetToIdentity()This action sets the tilt of the 3D object to be 0 and make the position of the 3D object described by this PhysicsPosition3D to align with the global origin.
Transform(Libraries.Compute.Vector3 vector)This action turns a point/vector (Vector3 vector) that is described relative to the 3D object and change it so that the point/vector is described in the global coordinates.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetBasis()

This action gets the tilt of the 3D object (the rotational part of the transformation matrix).

Return

Libraries.Compute.Matrix3: the tilt of the 3D object.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetMatrix(Libraries.Compute.Matrix4 matrix)

This action returns a 4x4 transformation matrix representation of this PhysicsPosition3D.

Parameters

Return

Libraries.Compute.Matrix4: a 4x4 transformation matrix representation of this PhysicsPosition3D.

GetOrigin()

This action gets the position of the 3D object (the 3D object's local origin with respect to the global coordinates).

Return

Libraries.Compute.Vector3: the center of the 3D object.

GetRotation()

This action returns a quaternion (another holder of the position and tilt information) that represents the current PhysicsPosition3D.

Return

Libraries.Compute.Quaternion: The current position and tilt of the 3D object represented in the form of a quaternion.

Inverse(Libraries.Game.Collision.PhysicsPosition3D transform)

This action stores the inverse of the transformation matrix passed in.

Parameters

Inverse()

This action calculates the inverse of the transformation matrix stored inside this PhysicsPosition3D.

InverseTransform(Libraries.Compute.Vector3 in, Libraries.Compute.Vector3 out)

This action multiplies "Vector3 in" with the inverse of the current PhysicsPosition3D and store the result in "Vector3 out." Mathematically: out = [currT]^(-1) * in

Parameters

Multiply(Libraries.Game.Collision.PhysicsPosition3D transform)

This action changes the current PhysicsPosition3D with respect to the current PhysicsPosition3D using the "PhysicsPosition3D transform" passed in. A mathematical representation is: [currT] = [currT][passedInT].

Parameters

Multiply(Libraries.Game.Collision.PhysicsPosition3D transform1, Libraries.Game.Collision.PhysicsPosition3D transform2)

This action multiplies two transformation matrices together and store the result in the current PhysicsPosition3D. Mathematically: [currT] = [T_1][T_2].

Parameters

Set(Libraries.Compute.Matrix4 matrix)

This action sets the position of a 3D object using a matrix that contains both the tilt of the object and the position of the 3D object's center with respect to the world center.

Parameters

Set(Libraries.Compute.Matrix3 matrix)

This action sets the tilt of the 3D object and reset the position of the 3D object (the 3D object's local origin) to the global coordinate's origin. If you don't want the origin of the 3D object to be reset, please use the action "Set(Matrix3 basis, Vector3 origin)."

Parameters

Set(Libraries.Game.Collision.PhysicsPosition3D transform)

This action sets the location and the tilt of the 3D object using another PhysicsPosition3D.

Parameters

Set(Libraries.Compute.Matrix3 basis, Libraries.Compute.Vector3 origin)

This action sets the tilt of the 3D object using "Matrix3 basis" and sets the location of the 3D object using "Vector3 origin."

Parameters

SetRotation(Libraries.Compute.Quaternion quaternion)

This action sets the current PhysicsPosition3D using a quaternion that is passed in.

Parameters

SetToIdentity()

This action sets the tilt of the 3D object to be 0 and make the position of the 3D object described by this PhysicsPosition3D to align with the global origin.

Transform(Libraries.Compute.Vector3 vector)

This action turns a point/vector (Vector3 vector) that is described relative to the 3D object and change it so that the point/vector is described in the global coordinates.

Parameters