Libraries.Game.Collision.Narrowphase.ConvexConvexSimplexSolver Documentation
This action finds the closest point on a object to the origin.
Inherits from: Libraries.Language.Object
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 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.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
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.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
FullSimplex()
This action returns whether you have a tetrahedron as your current simplex.
Return
boolean:
GetCachedPointA()
GetCachedPointB()
GetCachedVector()
This action returns the maximum distance from the origin to a vertex in the simplex.
Return
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetLastW()
GetNumberOfVertices()
This action returns the number of vertices there is in a simplex.
Return
number:
GetSimplexPointsP()
GetSimplexPointsQ()
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.
Return
GetSimplexVectorW()
InSimplex(Libraries.Compute.Vector3 w)
This action tests whether a vertex is inside the current simplex.
Parameters
Return
boolean:
IsCachedValidClosest()
if they are on opposite sides of the plane
Return
boolean:
MaxVertex()
This action returns the maximum distance from the origin to a vertex in the simplex.
Return
number:
NeedsUpdate()
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:
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
- integer index
Reset()
This action resets the ConvexConvexSimplexSolver.
SetCachedPointA(Libraries.Compute.Vector3 point)
This action saves the closest vertex to the origin inside the "Vector3 v."
Parameters
SetCachedPointB(Libraries.Compute.Vector3 point)
This action returns whether you have a tetrahedron as your current simplex.
Parameters
SetCachedValidClosest(boolean flag)
if they are both on the plane
Parameters
- boolean flag
SetCachedVector(Libraries.Compute.Vector3 vector)
This action temporarily stores a vertex on the current simplex that is closest to the origin.
Parameters
SetLastW(Libraries.Compute.Vector3 vector)
SetNeedsUpdate(boolean flag)
This action ignores the vertices that are unused inside a ConvexConvesSubSimplexClosestResult class, which can hold up to 4 vertices.
Parameters
- boolean flag
SetNumberOfVertices(integer numberOfVertices)
This action sets the number of vertices there is in a simplex.
Parameters
- integer numberOfVertices
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:
On this page
Variables TableAction Documentation- AddVertex(Libraries.Compute.Vector3 w, Libraries.Compute.Vector3 p, Libraries.Compute.Vector3 q)
- BackupClosest(Libraries.Compute.Vector3 v)
- Closest(Libraries.Compute.Vector3 v)
- Compare(Libraries.Language.Object object)
- ComputePoints(Libraries.Compute.Vector3 p1, Libraries.Compute.Vector3 p2)
- EmptySimplex()
- Equals(Libraries.Language.Object object)
- FullSimplex()
- GetCachedPointA()
- GetCachedPointB()
- GetCachedVector()
- GetHashCode()
- GetLastW()
- GetNumberOfVertices()
- GetSimplexPointsP()
- GetSimplexPointsQ()
- GetSimplexVectorW()
- InSimplex(Libraries.Compute.Vector3 w)
- IsCachedValidClosest()
- MaxVertex()
- NeedsUpdate()
- ReduceVertices(Libraries.Game.Collision.Narrowphase.ConvexConvexSubSimplexClosestResult usedVerts)
- RemoveVertex(integer index)
- Reset()
- 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)
- UpdateClosestVectorAndPoints()