Libraries.Game.Collision.Narrowphase.SimplexVertex2D Documentation

This class records the support points between shapes A and B. This class is used internally by Simplex2D.

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.
GetBarycentricCoordinate()This action gets the barycentric coordinate that is multiplied to the support points stored in the current SimplexVertex2D class.
GetHashCode()This action gets the hash code for an object.
GetIndexA()This action returns the index of supportA on shape A.
GetIndexB()This action returns the index of supportB on shape B.
GetSupport()This action gets the support point on the Minkowski difference of the two shapes.
GetSupportA()This action returns a support point on shape A in global coordinates.
GetSupportB()This action gets a support point on shape B in global coordinates.
Set(Libraries.Game.Collision.Narrowphase.SimplexVertex2D vertex)This action sets this SimplexVertex2D class with another SimplexVertex2D.
SetBarycentricCoordinate(number coordinate)This action sets the barycentric coordinate that is multiplied to the support points stored in the current SimplexVertex2D class.
SetIndexA(integer index)This action sets the index of supportA on shape A.
SetIndexB(integer index)This action sets the index of supportB on shape B.
SetSupport(Libraries.Compute.Vector2 support)This action sets the support point on the Minkowski difference of the two shapes.
SetSupportA(Libraries.Compute.Vector2 support)This action sets a support point on shape A in global coordinates.
SetSupportB(Libraries.Compute.Vector2 support)This action sets a support point on shape B in global coordinates.

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.

GetBarycentricCoordinate()

This action gets the barycentric coordinate that is multiplied to the support points stored in the current SimplexVertex2D class.

Return

number:

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 index of supportA on shape A.

Return

integer:

GetIndexB()

This action returns the index of supportB on shape B.

Return

integer:

GetSupport()

This action gets the support point on the Minkowski difference of the two shapes.

Return

Libraries.Compute.Vector2:

GetSupportA()

This action returns a support point on shape A in global coordinates.

Return

Libraries.Compute.Vector2:

GetSupportB()

This action gets a support point on shape B in global coordinates.

Return

Libraries.Compute.Vector2:

Set(Libraries.Game.Collision.Narrowphase.SimplexVertex2D vertex)

This action sets this SimplexVertex2D class with another SimplexVertex2D.

Parameters

SetBarycentricCoordinate(number coordinate)

This action sets the barycentric coordinate that is multiplied to the support points stored in the current SimplexVertex2D class.

Parameters

SetIndexA(integer index)

This action sets the index of supportA on shape A.

Parameters

SetIndexB(integer index)

This action sets the index of supportB on shape B.

Parameters

SetSupport(Libraries.Compute.Vector2 support)

This action sets the support point on the Minkowski difference of the two shapes.

Parameters

SetSupportA(Libraries.Compute.Vector2 support)

This action sets a support point on shape A in global coordinates.

Parameters

SetSupportB(Libraries.Compute.Vector2 support)

This action sets a support point on shape B in global coordinates.

Parameters