public CollisionResponse(CollistionDetails CollistionDetail) { this.CollisionForceVector = CollistionDetail.hitforcevector; this.CollisionPoint3D = CollistionDetail.intersectionPoint; this.PlaneNormal = CollistionDetail.PlaneNormal; FrictionForce = new Friction( CollistionDetail.DistanceFromCenterOfMass, CollisionForceVector ); }
public bool IsIn(Point3D l0, Vector3D l, out CollistionDetails CollisionFound) { CollisionFound = new CollistionDetails(); if (IsLineIntersection(l0, l, out CollisionFound.intersectionPoint)) { if (IsPointIn(CollisionFound.intersectionPoint)) { Vector3D u = Vector3D.DotProduct(l, this.planeNormal) * this.planeNormal; Vector3D w = l - u; CollisionFound.hitforcevector = w - u; CollisionFound.PlaneNormal = planeNormal; return(true); } } return(false); }
public bool IsIn(Point3D l0, Vector3D l, out CollistionDetails CollisionFound) { return(this.CollisionCheck.IsIn(l0, l, out CollisionFound)); }