addPointVec method
Add a point into this manifold.
pos position of the manifold
norm Normal vector of the point
penetration depth of the contact
flip flip direction of contact
Implementation
void addPointVec(Vector3 pos, [Vector3? norm, double penetration = 0, bool flip = false]) {
ManifoldPoint p = points[numPoints++];
p.position.setFrom(pos);
p.localPoint1.sub2(pos, body1!.position).applyMatrix3(body1!.rotation );
p.localPoint2.sub2(pos, body2!.position).applyMatrix3(body2!.rotation );
if(norm != null){
p.normal.setFrom(norm);
}
if(flip){
p.normal.inverse();
}
p.normalImpulse = 0;
p.penetration = penetration;
p.warmStarted = false;
}