Libraries.Game.Collision.Narrowphase.ConvexConvexSimplexSolver Documentation

This action finds the closest point on a object to the origin.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
AddVertex(Libraries.Compute.Vector3 w, Libraries.Compute.Vector3 p, Libraries.Compute.Vector3 q)This action updates the simplex.
BackupClosest(Libraries.Compute.Vector3 v)This action saves the closest vertex to the origin inside the "Vector3 v.
Closest(Libraries.Compute.Vector3 v)This action temporarily stores a vertex on the current simplex that is closest to the origin.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
ComputePoints(Libraries.Compute.Vector3 p1, Libraries.Compute.Vector3 p2)This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later.
EmptySimplex()This action returns whether you have a simplex currently or not.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
FullSimplex()This action returns whether you have a tetrahedron as your current simplex.
GetCachedPointA()
GetCachedPointB()
GetCachedVector()
GetHashCode()This action gets the hash code for an object.
GetLastW()
GetNumberOfVertices()This action returns the number of vertices there is in a simplex.
GetSimplexPointsP()
GetSimplexPointsQ()
GetSimplexVectorW()
InSimplex(Libraries.Compute.Vector3 w)This action tests whether a vertex is inside the current simplex.
IsCachedValidClosest()
MaxVertex()This action returns the maximum distance from the origin to a vertex in the simplex.
NeedsUpdate()
ReduceVertices(Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult usedVerts)This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertices.
RemoveVertex(integer index)This action removes a vertex from a simplex (which is the umbrella term for a point, a line, a triangle, or a tetrahedron).
Reset()This action resets the ConvexConvexSimplexSolver.
SetCachedPointA(Libraries.Compute.Vector3 point)
SetCachedPointB(Libraries.Compute.Vector3 point)
SetCachedValidClosest(boolean flag)
SetCachedVector(Libraries.Compute.Vector3 vector)
SetLastW(Libraries.Compute.Vector3 vector)
SetNeedsUpdate(boolean flag)
SetNumberOfVertices(integer numberOfVertices)This action sets the number of vertices there is in a simplex.
UpdateClosestVectorAndPoints()This action updates the vertex on the current simplex that is closest to the origin and also updates the closest point from the current simplex to the origin.

Actions Documentation

AddVertex(Libraries.Compute.Vector3 w, Libraries.Compute.Vector3 p, Libraries.Compute.Vector3 q)

This action updates the simplex.

Parameters

BackupClosest(Libraries.Compute.Vector3 v)

This action saves the closest vertex to the origin inside the "Vector3 v."

Parameters

Closest(Libraries.Compute.Vector3 v)

This action temporarily stores a vertex on the current simplex that is closest to the origin.

Parameters

Return

boolean:

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

ComputePoints(Libraries.Compute.Vector3 p1, Libraries.Compute.Vector3 p2)

This action calls the action UpdateClosestVectorAndPoints and stores two different points temporarily to be used later. These two points can be anything that you know you will need later.

Parameters

EmptySimplex()

This action returns whether you have a simplex currently or not.

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(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

FullSimplex()

This action returns whether you have a tetrahedron as your current simplex.

Return

boolean:

GetCachedPointA()

Return

Libraries.Compute.Vector3

GetCachedPointB()

Return

Libraries.Compute.Vector3

GetCachedVector()

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.

GetLastW()

Return

Libraries.Compute.Vector3

GetNumberOfVertices()

This action returns the number of vertices there is in a simplex.

Return

number:

GetSimplexPointsP()

Return

Libraries.Containers.Array

GetSimplexPointsQ()

Return

Libraries.Containers.Array

GetSimplexVectorW()

Return

Libraries.Containers.Array

InSimplex(Libraries.Compute.Vector3 w)

This action tests whether a vertex is inside the current simplex.

Parameters

Return

boolean:

IsCachedValidClosest()

Return

boolean

MaxVertex()

This action returns the maximum distance from the origin to a vertex in the simplex.

Return

number:

NeedsUpdate()

Return

boolean

ReduceVertices(Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult usedVerts)

This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertices.

Parameters

RemoveVertex(integer index)

This action removes a vertex from a simplex (which is the umbrella term for a point, a line, a triangle, or a tetrahedron).

Parameters

Reset()

This action resets the ConvexConvexSimplexSolver.

SetCachedPointA(Libraries.Compute.Vector3 point)

Parameters

SetCachedPointB(Libraries.Compute.Vector3 point)

Parameters

SetCachedValidClosest(boolean flag)

Parameters

SetCachedVector(Libraries.Compute.Vector3 vector)

Parameters

SetLastW(Libraries.Compute.Vector3 vector)

Parameters

SetNeedsUpdate(boolean flag)

Parameters

SetNumberOfVertices(integer numberOfVertices)

This action sets the number of vertices there is in a simplex.

Parameters

UpdateClosestVectorAndPoints()

This action updates the vertex on the current simplex that is closest to the origin and also updates the closest point from the current simplex to the origin.

Return

boolean: