public ConvexHullShape(List <Vector3> vertices) { List <JVector> jvertices = new List <JVector>(vertices.Count); for (int i = 0; i < vertices.Count; ++i) { Vector3 v = vertices[i]; jvertices.Add(new JVector(v.X, v.Y, v.Z)); } convexHullShape = new Jitter.Collision.Shapes.ConvexHullShape(jvertices); }
public ConvexHullShape(List <Vector3> vertices, Matrix4 inertia, float mass) { List <JVector> jvertices = new List <JVector>(vertices.Count); for (int i = 0; i < vertices.Count; ++i) { Vector3 v = vertices[i]; jvertices.Add(new JVector(v.X, v.Y, v.Z)); } JMatrix jinertia = Util.ToJitter(inertia); convexHullShape = new ConvexHullShape2(jvertices, jinertia, mass); }