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
Summary
Actions Summary Table
Actions | Description |
---|---|
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). |
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
Detach(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face) | This action deletes a face of a polyhedron. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
EvaluatePenetrationDepth() | This action finds how much did one object has penetrated into another object. |
EvaluatePenetrationDepth(number accuracy) | This action finds how much did one object has penetrated into another object. |
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. |
FindBest() | This action returns the face that is closest to a point of interest. |
GetCoordinates(Libraries.Game.Collision.Narrowphase.ConvexConvexFace face, Libraries.Compute.Vector3 out) | This action finds where the point of interest is relative to a face. |
GetHashCode() | This action gets the hash code for an object. |
GetIterations() | This action returns how many iterations did this solver run for. |
GetNearest() | This action returns the vertices that makes up a face of a polyhedron that is closest to the origin. |
GetNormal() | This action returns the direction that you need to push the two objects away to separate the two objects. |
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. |
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. |
Set(Libraries.Game.Collision.Narrowphase.ConvexConvexDistanceSolver gjk) | This action connects this ConvexConvexPenetrationSolver to a ConvexConvexDistanceSolver. |
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. |
Support(Libraries.Compute.Vector3 w) | This action finds the support for w. |
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
- Libraries.Game.Collision.Narrowphase.ConvexConvexVertex
- Libraries.Game.Collision.Narrowphase.ConvexConvexFace
- 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.
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.
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.
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.
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
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
Libraries.Game.Collision.Narrowphase.ConvexConvexFace:
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.
Example Code
Object o
integer hash = o:GetHashCode()
Return
integer: The integer hash code of the object.
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
- Libraries.Game.Collision.Narrowphase.ConvexConvexFace
- Libraries.Game.Collision.Narrowphase.ConvexConvexFace
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
Libraries.Game.Collision.Narrowphase.ConvexConvexFace:
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.