Libraries.Game.Physics.Joints.BallAndSocketJoint3D Documentation
This class is a joint that is similar to the joint between a person's shoulder and arm, where the arm can freely rotate about the shoulder.
Inherits from: Libraries.Game.Physics.Joints.Joint3D, Libraries.Language.Object
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.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
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.
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.
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetInformation(Libraries.Game.Physics.CollisionSolverInformation3D information)
This action returns the type of joint that you have.
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.
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.Compute.Vector3 pivotInA, Libraries.Compute.Vector3 pivotInB)
This action initializes the joint.
Parameters
- Libraries.Interface.Item3D: The first item.
- Libraries.Interface.Item3D: The second item.
- Libraries.Compute.Vector3: The location of the joint relative to the first item.
- Libraries.Compute.Vector3: The location of the joint relative to the second item.
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
- number impulse: The amount of impulse that should be applied to the items
SetEdgeA(Libraries.Game.Physics.Joints.JointEdge3D edgeA)
This action sets the first JointEdge3D stored inside this Joint3D.
Parameters
- Libraries.Game.Physics.Joints.JointEdge3D: The first JointEdge3D stored inside this Joint3D.
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
- boolean flag: True if the joint has been assigned to a collision group.
SetItemA(Libraries.Interface.Item3D item)
This action sets the first 3D item that is joined by this Joint3D.
Parameters
- Libraries.Interface.Item3D: 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.
Parameters
- Libraries.Interface.Item3D: The second 3D item that is joined by this Joint3D.
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
- Libraries.Game.Physics.Joints.Joint3D: The next joint.
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
- Libraries.Game.Physics.Joints.Joint3D: The previous joint.
SetType(integer type)
This action sets the type of joint that you have. BallAndSocket = 0, Hinge = 1, Customizable = 2, Slider = 3
Parameters
- integer type: 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. This action is used internally.
Parameters
- number timeStep
UpdateRHS(number timeStep)
this is the error projected on the normal
Parameters
- number timeStep
On this page
Variables TableAction Documentation- BuildJacobian()
- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetAppliedImpulse()
- GetEdgeA()
- GetEdgeB()
- GetHashCode()
- GetInformation(Libraries.Game.Physics.CollisionSolverInformation3D information)
- GetItemA()
- GetItemB()
- GetNext()
- GetPrevious()
- GetType()
- InCollisionGroup()
- Initialize(Libraries.Interface.Item3D itemA, Libraries.Interface.Item3D itemB, Libraries.Compute.Vector3 pivotInA, Libraries.Compute.Vector3 pivotInB)
- SetAppliedImpulse(number impulse)
- SetEdgeA(Libraries.Game.Physics.Joints.JointEdge3D edgeA)
- SetEdgeB(Libraries.Game.Physics.Joints.JointEdge3D edgeB)
- SetInCollisionGroup(boolean flag)
- SetItemA(Libraries.Interface.Item3D item)
- SetItemB(Libraries.Interface.Item3D item)
- SetNext(Libraries.Game.Physics.Joints.Joint3D next)
- SetPrevious(Libraries.Game.Physics.Joints.Joint3D previous)
- SetType(integer type)
- SolveJoint(number timeStep)
- UpdateRHS(number timeStep)