Libraries.Game.Collision.Narrowphase.ConvexConvexPenetrationSolver Documentation
This class contains actions that will help solve how much one shape has penetrated into another shape.
Inherits from: Libraries.Language.Object
Actions Documentation
BuildHorizon(integer markid, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex w, Libraries.Game.Collision.Narrowphase.ConvexConvexFace f, integer e, Libraries.Containers.Array<Libraries.Game.Collision.Narrowphase.ConvexConvexFace> cf, Libraries.Containers.Array<Libraries.Game.Collision.Narrowphase.ConvexConvexFace> ff)
This action builds a polytope that will be used to calculate the direction that we will need to separate the two colliding objects (penetration direction).
Parameters
- integer markid
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexFace
- integer e
- Libraries.Containers.Array
- Libraries.Containers.Array
Return
integer:
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)
Detach(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face)
This action deletes a face of a polyhedron.
Parameters
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)
EvaluatePenetrationDepth()
This action finds how much did one object has penetrated into another object.
Return
number:
EvaluatePenetrationDepth(number accuracy)
This action finds how much did one object has penetrated into another object.
Parameters
- number accuracy
Return
number:
Failed()
This action returns whether if the penetration solver has successfully found a direction that you should push the two objects so that they are not penetrating anymore.
Return
boolean:
FindBest()
This action returns the face that is closest to a point of interest.
Return
GetCoordinates(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face, Libraries.Compute.Vector3 out)
This action finds where the point of interest is relative to a face.
Parameters
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()
GetIterations()
This action returns how many iterations did this solver run for.
Return
integer:
GetNearest()
This action returns the vertices that makes up a face of a polyhedron that is closest to the origin.
Return
GetNormal()
This action returns the direction that you need to push the two objects away to separate the two objects.
Return
Link(Libraries.Game.Collision.Narrowphase.ConvexConvexFace f0, integer e0, Libraries.Game.Collision.Narrowphase.ConvexConvexFace f1, integer e1)
This action links two faces of a polyhedron together.
Parameters
NewFace(Libraries.Game.Collision.Narrowphase.ConvexConvexVertex a, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex b, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex c)
This action creates a new face using the 3 vertices that is passed in.
Parameters
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
Return
Set(Libraries.Game.Collision.Narrowphase.ConvexConvexDistanceSolver gjk)
This action connects this ConvexConvexPenetrationSolver to a ConvexConvexDistanceSolver.
Parameters
Set(Libraries.Game.Collision.Narrowphase.ConvexConvexFace f, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex a, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex b, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex c)
This action sets up the convex face that is made up of the 3 vertices that you passed in and returning if these 3 vertices can actually make up a face.
Parameters
- Libraries.Game.Collision.Narrowphase.ConvexConvexFace
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
Return
boolean:
Support(Libraries.Compute.Vector3 w)
This action finds the support for w.
Parameters
Return
On this page
Variables TableAction Documentation- BuildHorizon(integer markid, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex w, Libraries.Game.Collision.Narrowphase.ConvexConvexFace f, integer e, Libraries.Containers.Array
cf, Libraries.Containers.Array ff) - Compare(Libraries.Language.Object object)
- Detach(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face)
- Equals(Libraries.Language.Object object)
- EvaluatePenetrationDepth()
- EvaluatePenetrationDepth(number accuracy)
- Failed()
- FindBest()
- GetCoordinates(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face, Libraries.Compute.Vector3 out)
- GetHashCode()
- GetIterations()
- GetNearest()
- GetNormal()
- Link(Libraries.Game.Collision.Narrowphase.ConvexConvexFace f0, integer e0, Libraries.Game.Collision.Narrowphase.ConvexConvexFace f1, integer e1)
- NewFace(Libraries.Game.Collision.Narrowphase.ConvexConvexVertex a, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex b, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex c)
- Set(Libraries.Game.Collision.Narrowphase.ConvexConvexDistanceSolver gjk)
- Set(Libraries.Game.Collision.Narrowphase.ConvexConvexFace f, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex a, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex b, Libraries.Game.Collision.Narrowphase.ConvexConvexVertex c)
- Support(Libraries.Compute.Vector3 w)