Libraries.Game.Physics.Joints.CustomizableJoint3D Documentation

This class is a class that allows a joint to have the ability to rotate around any axis and move anywhere in 3D space. The angular limit in the x-direction is from -pi to pi; y-direction is from -pi/2 to pi/2; z-direction is from -pi/2 to pi/2.

Inherits from: Libraries.Game.Physics.Joints.Joint3D, Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
BuildAngularJacobian(integer jacobianAngularIndex, Libraries.Compute.Vector3 jointAxisW)This action finds values that are useful for calculating the angular difference between the two objects.
BuildJacobian()This action calls the BuildAngularJacobian and BuildLinearJacobian.
BuildLinearJacobian(integer jacobianLinearIndex, Libraries.Compute.Vector3 normalWorld, Libraries.Compute.Vector3 pivotAInW, Libraries.Compute.Vector3 pivotBInW)This action finds the values that are useful to calculate if the two objects are within the position limits.
CalculateAnchorPosition()This action calculates the center of the system that composes of object A and object B.
CalculateAngleInfo()This action calculates the angular difference between object A and object B.
CalculateTransforms()This action calculates the angular difference and position difference of the joint between objects A and B.
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.
GetAngle(integer axisIndex)This action returns the relative angle.
GetAppliedImpulse()This action returns the amount of impulse that should be applied to the items in the joints to allow them to continue to be joined.
GetAxis(integer axisIndex)This action returns the rotational axis in global coordinates.
GetCalculatedTransformA()This action returns the position and tilt of the object A.
GetCalculatedTransformB()This action returns the position and tilt of the object B.
GetEdgeA()This action returns the first JointEdge3D stored inside this Joint3D.
GetEdgeB()This action returns the second JointEdge3D stored inside this Joint3D.
GetFrameOffsetA()This action returns the position and tilt of the joint relative to object A.
GetFrameOffsetB()This action returns the position and tilt of the joint relative to object B.
GetHashCode()This action gets the hash code for an object.
GetInformation(Libraries.Game.Physics.CollisionSolverInformation3D information)
GetItemA()This action returns the first 3D item that is joined by this Joint3D.
GetItemB()This action returns the second 3D item that is joined by this Joint3D.
GetNext()This action gets you the next information about a joint (stored in another Joint3D) inside a linked list of Joint3Ds.
GetPrevious()This action gets you the previous information about a joint (stored in another Joint3D) inside a linked list of Joint3Ds.
GetRotationalLimitMotor(integer index)This action returns the angular limit.
GetTranslationalLimitMotor()This action returns the position limit.
GetType()This action returns the type of joint that you have.
InCollisionGroup()This action returns whether this joint is been accounted for in a collision group.
Initialize(Libraries.Interface.Item3D itemA, Libraries.Interface.Item3D itemB, Libraries.Game.Collision.PhysicsPosition3D positionA, Libraries.Game.Collision.PhysicsPosition3D positionB, boolean useLinearReferenceFrameA)This action initializes the joint.
IsLimited(integer limitIndex)This action returns if one of the axis is limited in position.
MatrixToEulerXYZ(Libraries.Compute.Matrix3 mat, Libraries.Compute.Vector3 xyz)This action converts a rotational matrix to a another representation of rotation: Euler angles.
SetAngularLowerLimit(Libraries.Compute.Vector3 angularLower)This action sets the lower angular limit.
SetAngularUpperLimit(Libraries.Compute.Vector3 angularUpper)This action sets the upper angular limit.
SetAppliedImpulse(number impulse)This action sets the amount of impulse that should be applied to the items in the joints to allow them to continue to be joined.
SetEdgeA(Libraries.Game.Physics.Joints.JointEdge3D edgeA)This action sets the first JointEdge3D stored inside this Joint3D.
SetEdgeB(Libraries.Game.Physics.Joints.JointEdge3D edgeB)This action sets the second JointEdge3D stored inside this Joint3D.
SetInCollisionGroup(boolean flag)This action sets whether this joint is been accounted for in a collision group.
SetItemA(Libraries.Interface.Item3D item)This action sets the first 3D item that is joined by this Joint3D.
SetItemB(Libraries.Interface.Item3D item)This action sets the second 3D item that is joined by this Joint3D.
SetLimit(integer axis, number lo, number hi)This action sets the position limit of the one of the axis.
SetLinearLowerLimit(Libraries.Compute.Vector3 linearLower)This action sets the lower position limit.
SetLinearUpperLimit(Libraries.Compute.Vector3 linearUpper)This action sets the upper position limit.
SetNext(Libraries.Game.Physics.Joints.Joint3D next)This action lets you store another information about a joint (stored in another Joint3D) as a next link to the current Joint3D.
SetPrevious(Libraries.Game.Physics.Joints.Joint3D previous)This action lets you store another information about a joint (stored in another Joint3D) as a previous link to the current Joint3D.
SetType(integer type)This action sets the type of joint that you have.
SolveJoint(number localtimeStep)This action solves the constraint of this joint and make sure that objects A and B is able to move accordint to the joint constraint applied.
TestAngularLimitMotor(integer axisIndex)This action tests if the relative angle between the two objects is within the angular limit that we defined.
getMatrixElement(Libraries.Compute.Matrix3 mat, integer index)This action returns a number inside a matrix.
updateRHS(number timeStep)

Actions Documentation

BuildAngularJacobian(integer jacobianAngularIndex, Libraries.Compute.Vector3 jointAxisW)

This action finds values that are useful for calculating the angular difference between the two objects. This action is used internally.

Parameters

BuildJacobian()

This action calls the BuildAngularJacobian and BuildLinearJacobian. This action is called by the Collision Solver to gather information on the joint before calling the SolveJoint action. This action is used internally.

BuildLinearJacobian(integer jacobianLinearIndex, Libraries.Compute.Vector3 normalWorld, Libraries.Compute.Vector3 pivotAInW, Libraries.Compute.Vector3 pivotBInW)

This action finds the values that are useful to calculate if the two objects are within the position limits. This action is used internally.

Parameters

CalculateAnchorPosition()

This action calculates the center of the system that composes of object A and object B. This action is used internally.

CalculateAngleInfo()

This action calculates the angular difference between object A and object B. This action is used internally.

CalculateTransforms()

This action calculates the angular difference and position difference of the joint between objects A and B. This action is used internally.

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 (smaller)

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(t)

Parameters

Return

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

GetAngle(integer axisIndex)

This action returns the relative angle.

Parameters

Return

number: the relative angle.

GetAppliedImpulse()

This action returns the amount of impulse that should be applied to the items in the joints to allow them to continue to be joined.

Return

number: the amount of impulse that should be applied to the items.

GetAxis(integer axisIndex)

This action returns the rotational axis in global coordinates.

Parameters

Return

Libraries.Compute.Vector3: the rotational axis in global coordinates.

GetCalculatedTransformA()

This action returns the position and tilt of the object A.

Return

Libraries.Game.Collision.PhysicsPosition3D: the position and tilt of the object A.

GetCalculatedTransformB()

This action returns the position and tilt of the object B.

Return

Libraries.Game.Collision.PhysicsPosition3D: the position and tilt of the object B.

GetEdgeA()

This action returns the first JointEdge3D stored inside this Joint3D.

Return

Libraries.Game.Physics.Joints.JointEdge3D: the first JointEdge3D stored inside this Joint3D.

GetEdgeB()

This action returns the second JointEdge3D stored inside this Joint3D.

Return

Libraries.Game.Physics.Joints.JointEdge3D: the second JointEdge3D stored inside this Joint3D.

GetFrameOffsetA()

This action returns the position and tilt of the joint relative to object A.

Return

Libraries.Game.Collision.PhysicsPosition3D: the position and tilt of the joint relative to object A.

GetFrameOffsetB()

This action returns the position and tilt of the joint relative to object B.

Return

Libraries.Game.Collision.PhysicsPosition3D: the position and tilt of the joint relative to object B.

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.

GetInformation(Libraries.Game.Physics.CollisionSolverInformation3D information)

Parameters

GetItemA()

This action returns the first 3D item that is joined by this Joint3D.

Return

Libraries.Interface.Item3D: the first 3D item that is joined by this Joint3D.

GetItemB()

This action returns the second 3D item that is joined by this Joint3D.

Return

Libraries.Interface.Item3D: the second 3D item that is joined by this Joint3D.

GetNext()

This action gets you the next information about a joint (stored in another Joint3D) inside a linked list of Joint3Ds.

Return

Libraries.Game.Physics.Joints.Joint3D: the next joint.

GetPrevious()

This action gets you the previous information about a joint (stored in another Joint3D) inside a linked list of Joint3Ds.

Return

Libraries.Game.Physics.Joints.Joint3D: the previous joint.

GetRotationalLimitMotor(integer index)

This action returns the angular limit.

Parameters

Return

Libraries.Game.Physics.Joints.RotationalLimitMotor3D: the angular limit stored inside a RotationalLimitMotor3D object.

GetTranslationalLimitMotor()

This action returns the position limit.

Return

Libraries.Game.Physics.Joints.TranslationalLimitMotor3D: the position limit stored inside a TranslationalLimitMotor3D object.

GetType()

This action returns the type of joint that you have.

Return

integer: the type of joint that you have.

InCollisionGroup()

This action returns whether this joint is been accounted for in a collision group.

Return

boolean: true when the joint has already been assigned to a collision group, false if the joint is not

Initialize(Libraries.Interface.Item3D itemA, Libraries.Interface.Item3D itemB, Libraries.Game.Collision.PhysicsPosition3D positionA, Libraries.Game.Collision.PhysicsPosition3D positionB, boolean useLinearReferenceFrameA)

This action initializes the joint.

Parameters

IsLimited(integer limitIndex)

This action returns if one of the axis is limited in position.

Parameters

Return

boolean: false if the axis is not limited, true if the axis is limited.

MatrixToEulerXYZ(Libraries.Compute.Matrix3 mat, Libraries.Compute.Vector3 xyz)

This action converts a rotational matrix to a another representation of rotation: Euler angles. This action is used internally.

Parameters

Return

boolean: false if this conversion was unsuccessful, true if this conversion was successful.

SetAngularLowerLimit(Libraries.Compute.Vector3 angularLower)

This action sets the lower angular limit.

Parameters

SetAngularUpperLimit(Libraries.Compute.Vector3 angularUpper)

This action sets the upper angular limit.

Parameters

SetAppliedImpulse(number impulse)

This action sets the amount of impulse that should be applied to the items in the joints to allow them to continue to be joined.

Parameters

SetEdgeA(Libraries.Game.Physics.Joints.JointEdge3D edgeA)

This action sets the first JointEdge3D stored inside this Joint3D.

Parameters

SetEdgeB(Libraries.Game.Physics.Joints.JointEdge3D edgeB)

This action sets the second JointEdge3D stored inside this Joint3D.

Parameters

SetInCollisionGroup(boolean flag)

This action sets whether this joint is been accounted for in a collision group.

Parameters

SetItemA(Libraries.Interface.Item3D item)

This action sets the first 3D item that is joined by this Joint3D.

Parameters

SetItemB(Libraries.Interface.Item3D item)

This action sets the second 3D item that is joined by this Joint3D.

Parameters

SetLimit(integer axis, number lo, number hi)

This action sets the position limit of the one of the axis.

Parameters

SetLinearLowerLimit(Libraries.Compute.Vector3 linearLower)

This action sets the lower position limit.

Parameters

SetLinearUpperLimit(Libraries.Compute.Vector3 linearUpper)

This action sets the upper position limit.

Parameters

SetNext(Libraries.Game.Physics.Joints.Joint3D next)

This action lets you store another information about a joint (stored in another Joint3D) as a next link to the current Joint3D.

Parameters

SetPrevious(Libraries.Game.Physics.Joints.Joint3D previous)

This action lets you store another information about a joint (stored in another Joint3D) as a previous link to the current Joint3D.

Parameters

SetType(integer type)

This action sets the type of joint that you have. BallAndSocket = 0, Hinge = 1, Customizable = 2, Slider = 3

Parameters

SolveJoint(number localtimeStep)

This action solves the constraint of this joint and make sure that objects A and B is able to move accordint to the joint constraint applied. This action is used internally.

Parameters

TestAngularLimitMotor(integer axisIndex)

This action tests if the relative angle between the two objects is within the angular limit that we defined. This action is used internally.

Parameters

Return

boolean: false if outside of limit, true if within limit.

getMatrixElement(Libraries.Compute.Matrix3 mat, integer index)

This action returns a number inside a matrix. This action is used internally.

Parameters

Return

number: the matrix value at row number "index mod 3" and column number "index/3"

updateRHS(number timeStep)

Parameters