Options
All
  • Public
  • Public/Protected
  • All
Menu

A distance proxy is used by the GJK algorithm. It encapsulates any shape.

Hierarchy

  • b2DistanceProxy

Index

Constructors

constructor

Properties

m_count

m_count: number

Count

m_radius

m_radius: number

Radius

m_vertices

m_vertices: b2Vec2[]

Verticies

Methods

GetSupport

  • GetSupport(d: b2Vec2): number
  • Get the supporting vertex index in the given direction.

    Parameters

    • d: b2Vec2

      Direction to look for the supporting vertex.

    Returns number

    Supporting vertex index.

GetSupportVertex

  • Get the supporting vertex in the given direction.

    Parameters

    • d: b2Vec2

      Direction to look for the supporting vertex.

    Returns b2Vec2

    Supporting vertex.

GetVertex

  • GetVertex(index: number): b2Vec2
  • Get a vertex by index. Used by b2Distance.

    Parameters

    • index: number

      Vetex's index.

    Returns b2Vec2

    Vertex at the given index.

GetVertexCount

  • GetVertexCount(): number
  • Get the vertex count.

    Returns number

    The number of vertices. (m_vertices.length)

Set

  • Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.

    Parameters

    • shape: b2Shape

      Shape to initialize the distance proxy.

    Returns void

Generated using TypeDoc