Libraries.Game.Physics.ConstraintDescription3D Documentation

This class stores different constraint values that allows us to describe a joint constrain

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetDiagonal()This action returns a number whose reciprocal will be used to scale the impulse change applied to linear velocit
GetHashCode()This action gets the hash code for an object.
GetLinearJointAxis()This action initializes this ConstraintDescription3D such that this class is used to store one constraitn on one rigid body.
GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA, number massInverseB)This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints shared by two different rigid bodie
GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA)This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints on the same rigid bod
GetRelativeVelocity(Libraries.Compute.Vector3 linearVelocityA, Libraries.Compute.Vector3 angularVelocityA, Libraries.Compute.Vector3 linearVelocityB, Libraries.Compute.Vector3 angularVelocityB)This action returns the relative velocities between two 3D objects whose constraints are stored inside this ConstraintDescription3
Initialize(Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodie
Initialize(Libraries.Compute.Vector3 axisInA, Libraries.Compute.Vector3 axisInB, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodie
Initialize(Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Vector3 inertiaInverseA, number massInverseA, Libraries.Compute.Vector3 inertiaInverseB, number massInverseB)relativePosition1: relative position of constraint coordinate system center in world coordinates relativePosition2: relative position of constraint coordinate system center in world coordinates This action intializeds the description such that this ConstraintDescription3D is used for the constraint between two different rigid bodie

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: 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(

Parameters

Return

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

GetDiagonal()

This action returns a number whose reciprocal will be used to scale the impulse change applied to linear velocit

Return

number:

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.

GetLinearJointAxis()

This action initializes this ConstraintDescription3D such that this class is used to store one constraitn on one rigid body. action Initialize(Matrix3 world2A, Vector3 relativePosition1, Vector3 relativePosition2, Vector3 jointAxis, Vector3 inertiaInverseA, number massInverseA) linearJointAxis:Set(jointAxis) aJ:Set(relativePosition1):CrossProduct(jointAxis) world2A:Transform(aJ) bJ:Set(jointAxis) bJ:Scale(-1) Vector3 temp temp:Set(relativePosition2):CrossProduct(bJ) bJ:Set(temp) world2A:Transform(bJ) minvJt0:SetX(inertiaInverseA:GetX() * aJ:GetX()) minvJt0:SetY(inertiaInverseA:GetY() * aJ:GetY()) minvJt0:SetZ(inertiaInverseA:GetZ() * aJ:GetZ()) minvJt1:Set(0, 0, 0) diag = massInverseA + minvJt0:DotProduct(aJ) e

Return

Libraries.Compute.Vector3:

GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA, number massInverseB)

This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints shared by two different rigid bodie

Parameters

Return

number:

GetNonDiagonal(Libraries.Game.Physics.ConstraintDescription3D descriptionB, number massInverseA)

This action returns a number whose reciprocal will be used to scale the impulse change applied to angular velocity if this ConstraintDescription3D describes 2 constraints on the same rigid bod

Parameters

Return

number:

GetRelativeVelocity(Libraries.Compute.Vector3 linearVelocityA, Libraries.Compute.Vector3 angularVelocityA, Libraries.Compute.Vector3 linearVelocityB, Libraries.Compute.Vector3 angularVelocityB)

This action returns the relative velocities between two 3D objects whose constraints are stored inside this ConstraintDescription3

Parameters

Return

number:

Initialize(Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)

This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodie

Parameters

Initialize(Libraries.Compute.Vector3 axisInA, Libraries.Compute.Vector3 axisInB, Libraries.Compute.Vector3 inertiaInverseA, Libraries.Compute.Vector3 inertiaInverseB)

This action initializes this ConstraintDescription3D such that this class is used to store the angular constraint between two rigid bodie

Parameters

Initialize(Libraries.Compute.Matrix3 world2A, Libraries.Compute.Matrix3 world2B, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Compute.Vector3 jointAxis, Libraries.Compute.Vector3 inertiaInverseA, number massInverseA, Libraries.Compute.Vector3 inertiaInverseB, number massInverseB)

relativePosition1: relative position of constraint coordinate system center in world coordinates relativePosition2: relative position of constraint coordinate system center in world coordinates This action intializeds the description such that this ConstraintDescription3D is used for the constraint between two different rigid bodie

Parameters