Narrowphase class

Helper class for the World. Generates ContactEquations. @todo Sphere-ConvexPolyhedron contacts @todo Contact reduction @todo should move methods to prototype

Constructors

Narrowphase(World world)

Properties

contactPointPool List<ContactEquation>
Internal storage of pooled contact points
getter/setter pair
convexHeightfieldFaceList List<int>
getter/setter pair
currentContactMaterial ContactMaterial
getter/setter pair
enableFrictionReduction bool
getter/setter pair
frictionEquationPool List<FrictionEquation>
getter/setter pair
frictionResult List<FrictionEquation>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
result List<ContactEquation>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sphereBoxSides List<Vec3>
final
v3pool Vec3Pool
getter/setter pair
world World
getter/setter pair

Methods

boxBox(Box si, Box sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxConvex(Box si, ConvexPolyhedron sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxHeightfield(Box si, Heightfield sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxParticle(Box si, Particle sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxTrimesh(Box si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
convexConvex(ConvexPolyhedron si, ConvexPolyhedron sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false, List<int>? faceListA, List<int>? faceListB]) bool
convexHeightfield(ConvexPolyhedron si, Heightfield sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
convexParticle(ConvexPolyhedron sj, Particle si, Vec3 xj, Vec3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
convexTrimesh(ConvexPolyhedron si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false, List<int>? faceListA, List<int>? faceListB]) bool
createContactEquation(Body bi, Body bj, Shape si, Shape sj, [Shape? overrideShapeA, Shape? overrideShapeB]) ContactEquation
Make a contact object, by using the internal pool or creating a one.
createFrictionEquationsFromContact(ContactEquation contactEquation, List<FrictionEquation> outArray) bool
createFrictionFromAverage(int numContacts) → void
Take the average N latest contact point on the plane.
cylinderTrimesh(Cylinder si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
getCollisionType(ShapeType a, ShapeType b) CollisionType?
getContacts(List<Body> p1, List<Body> p2, World world, List<ContactEquation> result, List<ContactEquation> oldcontacts, List<FrictionEquation> frictionResult, List<FrictionEquation> frictionPool) → void
Generate all contacts between a list of body pairs @param p1 Array of body indices @param p2 Array of body indices @param result Array to store generated contacts @param oldcontacts Optional. Array of reusable contact objects
heightfieldCylinder(Heightfield sj, Cylinder si, Vec3 xj, Vec3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
particleCylinder(Particle si, Cylinder sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
particleTrimesh(Particle si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
particleTrimesh1(Particle si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeBox(Plane si, Box sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeConvex(Plane si, ConvexPolyhedron sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeParticle(Plane sj, Particle si, Vec3 xj, Vec3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeTrimesh(Plane planeShape, Trimesh sj, Vec3 planePos, Vec3 xj, Quaternion planeQuat, Quaternion qj, Body planeBody, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereBox(Sphere si, Box sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereConvex(Sphere si, ConvexPolyhedron sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereHeightfield(Sphere si, Heightfield sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereParticle(Sphere sj, Particle si, Vec3 xj, Vec3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
spherePlane(Sphere si, Plane sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereSphere(Sphere si, Sphere sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereTrimesh(Sphere si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
toString() String
A string representation of this object.
inherited
trimeshTrimesh(Trimesh si, Trimesh sj, Vec3 xi, Vec3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](CollisionType type) → dynamic