Libraries.Game.Physics.Joints.HingeJoint3D Documentation

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

Summary

Actions Summary Table

ActionsDescription
BuildJacobian()This action is called by the Collision Solver to gather information on the joint before calling the SolveJoint action.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
EnableAngularMotor(boolean enableMotor, number targetVelocity, number maxMotorImpulse)This actions lets the hinge joint rotate on its own or stop the hinge joint to rotate on its own.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAFrame(Libraries.Game.Collision.PhysicsPosition3D outputFrame)This action returns the location of the joint relative to object A.
GetAngularOnly()This action returns whether you only care about the angular constraint for this hinge joint or not.
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.
GetBFrame(Libraries.Game.Collision.PhysicsPosition3D outputFrame)This action returns the location of the joint relative to object B.
GetEdgeA()This action returns the first JointEdge3D stored inside this Joint3D.
GetEdgeB()This action returns the second JointEdge3D stored inside this Joint3D.
GetEnableAngularMotor()This action returns whether there is a motor on the hinge joint to let it rotate on its own.
GetHashCode()This action gets the hash code for an object.
GetHingeAngle()This action calculates how much the rotating objects have moved relative to their original configuration.
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.
GetLimitSign()This action returns whether the angular limits has been reached.
GetLowerLimit()This action returns the lower angle value that the hinge can rotate to.
GetMaxMotorImpulse()This action returns the maximum force that will be applied to the hinge for it to rotate.
GetMotorTargetVelocity()This action returns the velocity at which the motor will rotate about.
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.
GetSolveLimit()This action returns whether the angular limits has been reached.
GetType()This action returns the type of joint that you have.
GetUpperLimit()This action returns the upper angle value that the hinge can rotate to.
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.Compute.Vector3 pivotInA, Libraries.Compute.Vector3 pivotInB, Libraries.Compute.Vector3 axisInA, Libraries.Compute.Vector3 axisInB)This action initializes the joint.
SetAngularOnly(boolean angularOnly)This action sets whether you want to only solve for the angular constaints set by the hinge joint or not.
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.
SetBiasFactor(number bias)This action changes the bias factor of the hinge joint.
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(number low, number high, number softness, number bias, number relaxation)This action sets the range of angles that the hinge can rotate to.
SetLimit(number low, number high)This action sets the range of angles that the hinge can rotate to.
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 timeStep)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.
updateRHS(number timeStep)solve angular positional correcti

Actions Documentation

BuildJacobian()

This action is called by the Collision Solver to gather information on the joint before calling the SolveJoint action. 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.

EnableAngularMotor(boolean enableMotor, number targetVelocity, number maxMotorImpulse)

This actions lets the hinge joint rotate on its own or stop the hinge joint to rotate on its own.

Parameters

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.

GetAFrame(Libraries.Game.Collision.PhysicsPosition3D outputFrame)

This action returns the location of the joint relative to object A.

Parameters

Return

Libraries.Game.Collision.PhysicsPosition3D:

GetAngularOnly()

This action returns whether you only care about the angular constraint for this hinge joint or not.

Return

boolean:

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.

GetBFrame(Libraries.Game.Collision.PhysicsPosition3D outputFrame)

This action returns the location of the joint relative to object B.

Parameters

Return

Libraries.Game.Collision.PhysicsPosition3D:

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.

GetEnableAngularMotor()

This action returns whether there is a motor on the hinge joint to let it rotate on its own.

Return

boolean:

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.

GetHingeAngle()

This action calculates how much the rotating objects have moved relative to their original configuration.

Return

number: how much the rotating objects have moved relative to their original configuration.

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.

GetLimitSign()

This action returns whether the angular limits has been reached.

Return

number:

GetLowerLimit()

This action returns the lower angle value that the hinge can rotate to.

Return

number:

GetMaxMotorImpulse()

This action returns the maximum force that will be applied to the hinge for it to rotate.

Return

number:

GetMotorTargetVelocity()

This action returns the velocity at which the motor will rotate about.

Return

number:

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.

GetSolveLimit()

This action returns whether the angular limits has been reached.

Return

boolean:

GetType()

This action returns the type of joint that you have.

Return

integer: the type of joint that you have.

GetUpperLimit()

This action returns the upper angle value that the hinge can rotate to.

Return

number:

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.Compute.Vector3 pivotInA, Libraries.Compute.Vector3 pivotInB, Libraries.Compute.Vector3 axisInA, Libraries.Compute.Vector3 axisInB)

This action initializes the joint.

Parameters

SetAngularOnly(boolean angularOnly)

This action sets whether you want to only solve for the angular constaints set by the hinge joint or not.

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

SetBiasFactor(number bias)

This action changes the bias factor of the hinge joint.

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(number low, number high, number softness, number bias, number relaxation)

This action sets the range of angles that the hinge can rotate to.

Parameters

SetLimit(number low, number high)

This action sets the range of angles that the hinge can rotate to.

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 timeStep)

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

updateRHS(number timeStep)

solve angular positional correcti

Parameters