API Docs for: 0.6.1
Show:

Narrowphase Class

Helper class for the World. Generates ContactEquations.

Constructor

Narrowphase

()

Methods

convexConvex

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

Parameters:

convexHeightfield

()

convexParticle

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

Parameters:

convexTrimesh

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

Parameters:

createContactEquation

() ContactEquation

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

Returns:

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

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

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

Parameters:

planeTrimesh

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

Parameters:

sphereBox

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

Parameters:

sphereConvex

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

Parameters:

sphereHeightfield

()

spherePlane

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

Parameters:

sphereSphere

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

Parameters:

sphereTrimesh

(
  • sphereShape
  • trimeshShape
  • spherePos
  • trimeshPos
  • sphereQuat
  • trimeshQuat
  • sphereBody
  • trimeshBody
)

Parameters:

Properties

contactPointPool

Array

Internal storage of pooled contact points.

enableFrictionReduction

Boolean

v3pool

Vec3Pool

Pooled vectors.