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
Actions | Description |
---|---|
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 simplex. |
GetClosestPointOnSimplex() | This action returns where the closest point on a simplex is to the point of interest. |
GetHashCode() | This action gets the hash code for an object. |
IsValid() | This action checks if the closest point calculation is valid or not. |
Reset() | This action resets all of the variables inside this class. |
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 simplex. |
SetClosestPointOnSimplex(Libraries.Compute.Vector3 point) | This action sets where the closest point on a simplex is to the point of interest. |
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 not. |
SetUsedVertexB(boolean flag) | This action sets whether the point of interest is close to vertex B or not. |
SetUsedVertexC(boolean flag) | This action sets whether the point of interest is close to vertex C or not. |
SetUsedVertexD(boolean flag) | This action sets whether the point of interest is close to vertex D or not. |
UsedVertexA() | This action lets you know whether the point of interest is close to vertex A or not. |
UsedVertexB() | This action lets you know whether the point of interest is close to vertex B or not. |
UsedVertexC() | This action lets you know whether the point of interest is close to vertex C or not. |
UsedVertexD() | This action lets you know whether the point of interest is close to vertex D or not. |
UsedVerticesReset() | This action resets all vertices so that none of them are used. |
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 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
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 point.
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
- Libraries.Language.Object: The to be compared.
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 simplex.
Return
GetClosestPointOnSimplex()
This action returns where the closest point on a simplex is to the point of interest.
Return
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 not.
Return
boolean:
Reset()
This action resets all of the variables inside this class.
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 simplex.
Parameters
SetClosestPointOnSimplex(Libraries.Compute.Vector3 point)
This action sets where the closest point on a simplex is to the point of interest.
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 point.
Parameters
SetUsedVertexA(boolean flag)
This action sets whether the point of interest is close to vertex A or not.
Parameters
SetUsedVertexB(boolean flag)
This action sets whether the point of interest is close to vertex B or not.
Parameters
SetUsedVertexC(boolean flag)
This action sets whether the point of interest is close to vertex C or not.
Parameters
SetUsedVertexD(boolean flag)
This action sets whether the point of interest is close to vertex D or not.
Parameters
UsedVertexA()
This action lets you know whether the point of interest is close to vertex A or not.
Return
boolean:
UsedVertexB()
This action lets you know whether the point of interest is close to vertex B or not.
Return
boolean:
UsedVertexC()
This action lets you know whether the point of interest is close to vertex C or not.
Return
boolean:
UsedVertexD()
This action lets you know whether the point of interest is close to vertex D or not.
Return
boolean:
UsedVerticesReset()
This action resets all vertices so that none of them are used.