Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult Documentation

This class stores the result from the calculation in the class ConvexConvexSimplexSolver. Therefore, this class contains what is a closest point from a point of interest to a point, or a line, or a triangle, or a tetrahedron (and we classify all these shapes under the term Simplex

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.
Degenerate()This action lets you know if a simplex is degenerate or not.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetBarycentricCoordinates()This action gets the numbers that will describe where the point of interest is with respect to the simple
GetClosestPointOnSimplex()This action returns where the closest point on a simplex is to the point of interes
GetHashCode()This action gets the hash code for an object.
IsValid()This action checks if the closest point calculation is valid or no
Reset()This action resets all of the variables inside this clas
SetBarycentricCoordinates(number a, number b, number c, number d)This action sets the numbers that will describe where the point of interest is with respect to the simple
SetClosestPointOnSimplex(Libraries.Compute.Vector3 point)This action sets where the closest point on a simplex is to the point of interes
SetDegenerate(boolean flag)This action sets if a simplex is degenerate or not.
SetUsedVertexA(boolean flag)This action sets whether the point of interest is close to vertex A or no
SetUsedVertexB(boolean flag)This action sets whether the point of interest is close to vertex B or no
SetUsedVertexC(boolean flag)This action sets whether the point of interest is close to vertex C or no
SetUsedVertexD(boolean flag)This action sets whether the point of interest is close to vertex D or no
UsedVertexA()This action lets you know whether the point of interest is close to vertex A or no
UsedVertexB()This action lets you know whether the point of interest is close to vertex B or no
UsedVertexC()This action lets you know whether the point of interest is close to vertex C or no
UsedVertexD()This action lets you know whether the point of interest is close to vertex D or no
UsedVerticesReset()This action resets all vertices so that none of them are use

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.

Degenerate()

This action lets you know if a simplex is degenerate or not. For example, a degeneration triangle would have vertices A, B, C with two of these vertices being the same poin

Return

boolean:

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.

GetBarycentricCoordinates()

This action gets the numbers that will describe where the point of interest is with respect to the simple

Return

Libraries.Containers.Array:

GetClosestPointOnSimplex()

This action returns where the closest point on a simplex is to the point of interes

Return

Libraries.Compute.Vector3:

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.

IsValid()

This action checks if the closest point calculation is valid or no

Return

boolean:

Reset()

This action resets all of the variables inside this clas

SetBarycentricCoordinates(number a, number b, number c, number d)

This action sets the numbers that will describe where the point of interest is with respect to the simple

Parameters

SetClosestPointOnSimplex(Libraries.Compute.Vector3 point)

This action sets where the closest point on a simplex is to the point of interes

Parameters

SetDegenerate(boolean flag)

This action sets if a simplex is degenerate or not. For example, a degeneration triangle would have vertices A, B, C with two of these vertices being the same poin

Parameters

SetUsedVertexA(boolean flag)

This action sets whether the point of interest is close to vertex A or no

Parameters

SetUsedVertexB(boolean flag)

This action sets whether the point of interest is close to vertex B or no

Parameters

SetUsedVertexC(boolean flag)

This action sets whether the point of interest is close to vertex C or no

Parameters

SetUsedVertexD(boolean flag)

This action sets whether the point of interest is close to vertex D or no

Parameters

UsedVertexA()

This action lets you know whether the point of interest is close to vertex A or no

Return

boolean:

UsedVertexB()

This action lets you know whether the point of interest is close to vertex B or no

Return

boolean:

UsedVertexC()

This action lets you know whether the point of interest is close to vertex C or no

Return

boolean:

UsedVertexD()

This action lets you know whether the point of interest is close to vertex D or no

Return

boolean:

UsedVerticesReset()

This action resets all vertices so that none of them are use