Narrowphase Class
Helper class for the World. Generates ContactEquations.
Constructor
Narrowphase
()
Item Index
Methods
Properties
Methods
convexConvex
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
convexHeightfield
()
convexParticle
(
-
result
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
result
Array -
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
convexTrimesh
(
-
result
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
result
Array -
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
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
ArrayArray of body indices
-
p2
ArrayArray of body indices
-
world
World -
result
ArrayArray to store generated contacts
-
oldcontacts
ArrayOptional. Array of reusable contact objects
particlePlane
(
-
result
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
result
Array -
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
particleSphere
(
-
result
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
result
Array -
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
planeBox
(
-
result
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
result
Array -
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
planeConvex
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
planeTrimesh
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
sphereBox
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
sphereConvex
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
sphereHeightfield
()
spherePlane
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
sphereSphere
(
-
si
-
sj
-
xi
-
xj
-
qi
-
qj
-
bi
-
bj
Parameters:
-
si
Shape -
sj
Shape -
xi
Vec3 -
xj
Vec3 -
qi
Quaternion -
qj
Quaternion -
bi
Body -
bj
Body
sphereTrimesh
(
-
sphereShape
-
trimeshShape
-
spherePos
-
trimeshPos
-
sphereQuat
-
trimeshQuat
-
sphereBody
-
trimeshBody
Parameters:
-
sphereShape
Shape -
trimeshShape
Shape -
spherePos
Vec3 -
trimeshPos
Vec3 -
sphereQuat
Quaternion -
trimeshQuat
Quaternion -
sphereBody
Body -
trimeshBody
Body
Properties
contactPointPool
Array
Internal storage of pooled contact points.