Libraries.Game.Physics.CollisionPositionConstraint Documentation

This class is used internally by CollisionSolver2D.

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.
GetHashCode()This action gets the hash code for an object.
GetIndexA()This action returns the group index of object A.
GetIndexB()This action returns the group index of object B.
GetInverseInertiaA()This action returns (1/mass moment of inertia of A).
GetInverseInertiaB()This action returns (1/mass moment of inertia of B).
GetInverseMassA()This action returns (1/massA).
GetInverseMassB()This action returns (1/massB).
GetLocalCenterA()This action returns 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.
GetLocalNormal()This action returns the direction to apply forces that will cause the two objects that have collided to separate.
GetLocalPoint(integer index)This action returns a collision point at an index of interest.
GetLocalPoint()This action returns the collision point from the perspective of the reference object.
GetLocalPoints()This action returns the array that contains the vectors that represents the collision points from the perspective of the incident object.
GetPointCount()This action returns the length of the array "localPoints.
GetRadiusA()This action returns the effective radius of object A.
GetRadiusB()This action returns the effective radius of object B.
GetType()This action returns the type of "LocalCollisionPoints2D," possible choices are CIRCLES, FACE_A, FACE_B.
SetIndexA(integer index)This action sets the group index of object A.
SetIndexB(integer index)This action sets the group index of object B.
SetInverseInertiaA(number inverseInertia)This action sets (1/mass moment of inertia of A).
SetInverseInertiaB(number inverseInertia)This action sets (1/mass moment of inertia of B).
SetInverseMassA(number inverseMass)This action sets (1/massA).
SetInverseMassB(number inverseMass)This action sets (1/massB).
SetLocalCenterA(Libraries.Compute.Vector2 localCenter)This action sets 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.
SetLocalNormal(Libraries.Compute.Vector2 normal)This action sets the direction to apply forces that will cause the two objects that have collided to separate.
SetLocalPoint(Libraries.Compute.Vector2 point)This action sets the collision point from the perspective of the reference object.
SetPointCount(integer pointCount)This action sets the length of the array "localPoints.
SetRadiusA(number radius)This action sets the effective radius of object A.
SetRadiusB(number radius)This action sets the effective radius of object B.
SetType(integer type)This action sets the type of "LocalCollisionPoints2D," possible choices are CIRCLES, FACE_A, FACE_B.

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 (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.

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.

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

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

SetIndexB(integer index)

This action sets the group index of object B.

Parameters

SetInverseInertiaA(number inverseInertia)

This action sets (1/mass moment of inertia of A).

Parameters

SetInverseInertiaB(number inverseInertia)

This action sets (1/mass moment of inertia of B).

Parameters

SetInverseMassA(number inverseMass)

This action sets (1/massA).

Parameters

SetInverseMassB(number inverseMass)

This action sets (1/massB).

Parameters

SetLocalCenterA(Libraries.Compute.Vector2 localCenter)

This action sets the center of object A with respect to object A's local coordinates.

Parameters

SetLocalCenterB(Libraries.Compute.Vector2 localCenter)

This action sets the center of object B with respect to object B's local coordinates.

Parameters

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

SetLocalPoint(Libraries.Compute.Vector2 point)

This action sets the collision point from the perspective of the reference object.

Parameters

SetPointCount(integer pointCount)

This action sets the length of the array "localPoints."

Parameters

SetRadiusA(number radius)

This action sets the effective radius of object A.

Parameters

SetRadiusB(number radius)

This action sets the effective radius of object B.

Parameters

SetType(integer type)

This action sets the type of "LocalCollisionPoints2D," possible choices are CIRCLES, FACE_A, FACE_B.

Parameters