Libraries.Game.Collision.Narrowphase.SimplexVertex2D Documentation

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

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

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

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(

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 clas

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

Return

integer:

GetIndexB()

This action returns the index of supportB on shape

Return

integer:

GetSupport()

This action gets the support point on the Minkowski difference of the two shape

Return

Libraries.Compute.Vector2:

GetSupportA()

This action returns a support point on shape A in global coordinate

Return

Libraries.Compute.Vector2:

GetSupportB()

This action gets a support point on shape B in global coordinate

Return

Libraries.Compute.Vector2:

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

This action sets this SimplexVertex2D class with another SimplexVertex2

Parameters

SetBarycentricCoordinate(number coordinate)

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

Parameters

SetIndexA(integer index)

This action sets the index of supportA on shape

Parameters

SetIndexB(integer index)

This action sets the index of supportB on shape

Parameters

SetSupport(Libraries.Compute.Vector2 support)

This action sets the support point on the Minkowski difference of the two shape

Parameters

SetSupportA(Libraries.Compute.Vector2 support)

This action sets a support point on shape A in global coordinate

Parameters

SetSupportB(Libraries.Compute.Vector2 support)

This action sets a support point on shape B in global coordinate

Parameters