API Docs for: GoblinPhysics
Show:

SupportPoint Class

Holds a point on the edge of a Minkowski difference along with that point's witnesses and the direction used to find the point

Constructor

SupportPoint

(
  • witness_a
  • witness_b
  • point
)

Parameters:

  • witness_a Vec3

    Point in first object used to find the supporting point

  • witness_b Vec3

    Point in the second object ued to find th supporting point

  • point Vec3

    The support point on the edge of the Minkowski difference

Item Index

Methods

classifyVertex

(
  • vertex
)
Number

Determines if a vertex is in front of or behind the face

Parameters:

  • vertex Vec3

    Vertex to classify

Returns:

Number: If greater than 0 then `vertex' is in front of the face

EPA

(
  • simplex
)
Goblin.ContactDetails

Performs the Expanding Polytope Algorithm a GJK simplex

Parameters:

  • simplex Goblin.GjkEpa2.Simplex

    Simplex generated by the GJK algorithm

Returns:

Goblin.ContactDetails:

findSupportPoint

(
  • object_a
  • object_b
  • direction
  • gjk_point
)

Finds the extant point on the edge of the Minkowski difference for object_a - object_b in direction

Parameters:

  • object_a Goblin.RigidBody

    First object in the search

  • object_b Goblin.RigidBody

    Second object in the search

  • direction Vec3

    Direction to find the extant point in

  • gjk_point Goblin.GjkEpa.SupportPoint

    SupportPoint class to store the resulting point & witnesses in

GJK

(
  • object_a
  • object_b
)
Goblin.ContactDetails | Boolean

Perform GJK algorithm against two objects. Returns a ContactDetails object if there is a collision, else null

Parameters:

  • object_a Goblin.RigidBody
  • object_b Goblin.RigidBody

Returns:

Goblin.ContactDetails | Boolean: Returns null if no collision, else a ContactDetails object