Libraries.Game.Physics.CollisionPositionConstraint Documentation
This class is used internally by CollisionSolver2D.
Inherits from: Libraries.Language.Object
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.
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)
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()
GetIndexA()
This action returns the group index of object A.
Return
integer: the group index of object A.
GetIndexB()
This action returns the group index of object B.
Return
integer: the group index of object B.
GetInverseInertiaA()
This action returns (1/mass moment of inertia of A).
Return
number: the (1/mass moment of inertia of A) value.
GetInverseInertiaB()
This action returns (1/mass moment of inertia of B).
Return
number: (1/mass moment of inertia of B) value.
GetInverseMassA()
This action returns (1/massA).
Return
number: (1/massA).
GetInverseMassB()
This action returns (1/massB).
Return
number: the (1/massB) value.
GetLocalCenterA()
This action returns the center of object A with respect to object A's local coordinates.
Return
Libraries.Compute.Vector2: the center of object A with respect to object A's local coordinates.
GetLocalCenterB()
This action returns the center of object B with respect to object B's local coordinates.
Return
Libraries.Compute.Vector2: the center of object B with respect to object B's local coordinates.
GetLocalNormal()
This action returns the direction to apply forces that will cause the two objects that have collided to separate.
Return
Libraries.Compute.Vector2: the local normal vector.
GetLocalPoint(integer index)
This action returns a collision point at an index of interest.
Parameters
- integer index: The index of interest.
Return
Libraries.Compute.Vector2: a collision point.
GetLocalPoint()
This action returns the collision point from the perspective of the reference object.
Return
Libraries.Compute.Vector2: the collision point.
GetLocalPoints()
This action returns the array that contains the vectors that represents the collision points from the perspective of the incident object.
Return
Libraries.Containers.Array: an array of collision points.
GetPointCount()
This action returns the length of the array "localPoints."
Return
integer: the length of the array "localPoints."
GetRadiusA()
This action returns the effective radius of object A.
Return
number: the effective radius of object A.
GetRadiusB()
This action returns the effective radius of object B.
Return
number: the effective radius of object B.
GetType()
This action returns the type of "LocalCollisionPoints2D," possible choices are CIRCLES, FACE_A, FACE_B.
Return
integer: the type of collision.
SetIndexA(integer index)
This action sets the group index of object A.
Parameters
- integer index: The group index of object A.
SetIndexB(integer index)
This action sets the group index of object B.
Parameters
- integer index: The group index of object B.
SetInverseInertiaA(number inverseInertia)
This action sets (1/mass moment of inertia of A).
Parameters
- number inverseInertia: The (1/mass moment of inertia of A) value.
SetInverseInertiaB(number inverseInertia)
This action sets (1/mass moment of inertia of B).
Parameters
- number inverseInertia: The (1/mass moment of inertia of B) value.
SetInverseMassA(number inverseMass)
This action sets (1/massA).
Parameters
- number inverseMass: The (1/massA) value.
SetInverseMassB(number inverseMass)
This action sets (1/massB).
Parameters
- number inverseMass: The (1/massB) value.
SetLocalCenterA(Libraries.Compute.Vector2 localCenter)
This action sets the center of object A with respect to object A's local coordinates.
Parameters
- Libraries.Compute.Vector2: The center of object A with respect to object A's local coordinates.
SetLocalCenterB(Libraries.Compute.Vector2 localCenter)
This action sets the center of object B with respect to object B's local coordinates.
Parameters
- Libraries.Compute.Vector2: The center of object B with respect to object B's local coordinates.
SetLocalNormal(Libraries.Compute.Vector2 normal)
This action sets the direction to apply forces that will cause the two objects that have collided to separate.
Parameters
- Libraries.Compute.Vector2: The local normal vector.
SetLocalPoint(Libraries.Compute.Vector2 point)
This action sets the collision point from the perspective of the reference object.
Parameters
- Libraries.Compute.Vector2: The collision point.
SetPointCount(integer pointCount)
This action sets the length of the array "localPoints."
Parameters
- integer pointCount: The length of the array "localPoints."
SetRadiusA(number radius)
This action sets the effective radius of object A.
Parameters
- number radius: The effective radius of object A.
SetRadiusB(number radius)
This action sets the effective radius of object B.
Parameters
- number radius: The effective radius of object B.
SetType(integer type)
This action sets the type of "LocalCollisionPoints2D," possible choices are CIRCLES, FACE_A, FACE_B.
Parameters
- integer type: The type of collision.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetHashCode()
- GetIndexA()
- GetIndexB()
- GetInverseInertiaA()
- GetInverseInertiaB()
- GetInverseMassA()
- GetInverseMassB()
- GetLocalCenterA()
- GetLocalCenterB()
- GetLocalNormal()
- GetLocalPoint(integer index)
- GetLocalPoint()
- GetLocalPoints()
- GetPointCount()
- GetRadiusA()
- GetRadiusB()
- GetType()
- SetIndexA(integer index)
- SetIndexB(integer index)
- SetInverseInertiaA(number inverseInertia)
- SetInverseInertiaB(number inverseInertia)
- SetInverseMassA(number inverseMass)
- SetInverseMassB(number inverseMass)
- SetLocalCenterA(Libraries.Compute.Vector2 localCenter)
- SetLocalCenterB(Libraries.Compute.Vector2 localCenter)
- SetLocalNormal(Libraries.Compute.Vector2 normal)
- SetLocalPoint(Libraries.Compute.Vector2 point)
- SetPointCount(integer pointCount)
- SetRadiusA(number radius)
- SetRadiusB(number radius)
- SetType(integer type)