API Docs for: 0.6.1
Show:

Narrowphase Class

Helper class for the World. Generates ContactEquations.

Constructor

Narrowphase

()

Methods

convexConvex

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

convexParticle

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

getContacts

(
  • p1
  • p2
  • world
  • result
  • oldcontacts
)

Generate all contacts between a list of body pairs

Parameters:

  • p1 Array

    Array of body indices

  • p2 Array

    Array of body indices

  • world World
  • result Array

    Array to store generated contacts

  • oldcontacts Array

    Optional. Array of reusable contact objects

makeResult

() ContactEquation

Make a contact object, by using the internal pool or creating a new one.

Returns:

particlePlane

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

particleSphere

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

planeBox

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

planeConvex

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

sphereBox

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

sphereConvex

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

sphereHeightfield

()

sphereHeightfield

()

spherePlane

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

sphereSphere

(
  • result
  • si
  • sj
  • xi
  • xj
  • qi
  • qj
  • bi
  • bj
)

Parameters:

Properties

contactPointPool

Array

Internal storage of pooled contact points.

v3pool

Vec3Pool

Pooled vectors.