Narrowphase class

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

Constructors

Narrowphase.new(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<Vector3>
final
v3pool Vec3Pool
getter/setter pair
world World
getter/setter pair

Methods

boxBox(Box si, Box sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxConvex(Box si, ConvexPolyhedron sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxHeightfield(Box si, Heightfield sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxParticle(Box si, Particle sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
boxTrimesh(Box si, Trimesh sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
convexConvex(ConvexPolyhedron si, ConvexPolyhedron sj, Vector3 xi, Vector3 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.
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
heightfieldConvex(ConvexPolyhedron si, Heightfield sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
heightfieldParticle(Heightfield si, Particle sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
particleConvex(ConvexPolyhedron sj, Particle si, Vector3 xj, Vector3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
particleTrimesh(Particle si, Trimesh sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeBox(Plane si, Box sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeConvex(Plane si, ConvexPolyhedron sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeParticle(Plane sj, Particle si, Vector3 xj, Vector3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
planeTrimesh(Plane planeShape, Trimesh sj, Vector3 planePos, Vector3 xj, Quaternion planeQuat, Quaternion qj, Body planeBody, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereBox(Sphere si, Box sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereConvex(Sphere si, ConvexPolyhedron sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereHeightfield(Sphere si, Heightfield sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereParticle(Sphere sj, Particle si, Vector3 xj, Vector3 xi, Quaternion qj, Quaternion qi, Body bj, Body bi, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
spherePlane(Sphere si, Plane sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereSphere(Sphere si, Sphere sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false]) bool
sphereTrimesh(Sphere si, Trimesh sj, Vector3 xi, Vector3 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
trimeshConvex(ConvexPolyhedron si, Trimesh sj, Vector3 xi, Vector3 xj, Quaternion qi, Quaternion qj, Body bi, Body bj, [Shape? rsi, Shape? rsj, bool justTest = false, List<int>? faceListA, List<int>? faceListB]) bool
trimeshTrimesh(Trimesh si, Trimesh sj, Vector3 xi, Vector3 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