private static List <CollisionPlaneVector> ConvertCollisionPlanes(MqoObject collisionObject) { var vertices = collisionObject.Vertices.Select(vertex => ConvertVertex(vertex)).ToList(); var faces = new List <Face>(); for (short i = 0; i < collisionObject.Faces.Count; i++) { var face = collisionObject.Faces[i]; faces.Add(ConvertFace(face, vertices, i)); } return(faces.Select(face => face.CollisionPlaneVector).ToList()); }
private static CollisionVolume ConvertCollisionVolume(MqoObject collisionObject, int collisionPlaneCount) { var df2Vertices = collisionObject.Vertices.Select(vertex => ConvertVertex(vertex)).ToList(); return(new CollisionVolume(CollisionVolumeType.Normal, df2Vertices, collisionPlaneCount)); }