Libraries.Game.Collision.Narrowphase.SimplexCache2D Documentation

This class records the vertices from shapes A and B that are invovled in the current simplex of the Minkowski difference of the shapes so that Distance2D class can just refer to this SimplexCache to find the vertices instead of having to extract these information from Simplex2D clas

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.
GetCount()This action returns what kind of simplex is currently being used.
GetHashCode()This action gets the hash code for an object.
GetIndexA()This action returns the indices of the vertices of object A that is inside the current simple
GetIndexB()This action returns the indices of the vertices of object B that is inside the current simple
GetMetric()This action gets the denominator to normalize the barycentric coordinates with.
Set(Libraries.Game.Collision.Narrowphase.SimplexCache2D simplexCache)This action sets the current SimplexCache2D class with another SimplexCache2D objec
SetCount(integer count)This action sets what kind of simplex is currently being used.
SetMetric(number metric)This action sets the denominator to normalize the barycentric coordinates with.

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.

GetCount()

This action returns what kind of simplex is currently being used. 1: a point simplex. 2: a line simplex. 3: a triangle simple

Return

integer:

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 indices of the vertices of object A that is inside the current simple

Return

Libraries.Containers.Array:

GetIndexB()

This action returns the indices of the vertices of object B that is inside the current simple

Return

Libraries.Containers.Array:

GetMetric()

This action gets the denominator to normalize the barycentric coordinates with. For a point, don't need to normalize. For a line, the barycentric coordinates are normalized by the length of the line. For a triangle, the barycentric coordinates are normalized by the area of the triangl

Return

number:

Set(Libraries.Game.Collision.Narrowphase.SimplexCache2D simplexCache)

This action sets the current SimplexCache2D class with another SimplexCache2D objec

Parameters

SetCount(integer count)

This action sets what kind of simplex is currently being used. 1: a point simplex. 2: a line simplex. 3: a triangle simple

Parameters

SetMetric(number metric)

This action sets the denominator to normalize the barycentric coordinates with. For a point, don't need to normalize. For a line, the barycentric coordinates are normalized by the length of the line. For a triangle, the barycentric coordinates are normalized by the area of the triangl

Parameters