BEPUphysics.CollisionShapes.ConvexShapes.ConvexHullShape.ConvexHullShape C# (CSharp) Method

ConvexHullShape() public method

Constructs a new convex hull shape. The point set will be recentered on the local origin. If that offset is needed, use the other constructor which outputs the computed center.
Thrown when the point set is empty.
public ConvexHullShape ( IList vertices ) : System
vertices IList Point set to use to construct the convex hull.
return System
        public ConvexHullShape(IList<Vector3> vertices)
        {
            if (vertices.Count == 0)
                throw new ArgumentException("Vertices list used to create a ConvexHullShape cannot be empty.");

            var surfaceVertices = CommonResources.GetVectorList();
            ComputeCenter(vertices, surfaceVertices);
            this.vertices = new RawList<Vector3>(surfaceVertices);
            CommonResources.GiveBack(surfaceVertices);

            OnShapeChanged();
        }

Same methods

ConvexHullShape::ConvexHullShape ( IList vertices, Vector3 &center ) : System
ConvexHullShape::ConvexHullShape ( IList vertices, Vector3 &center, IList outputHullTriangleIndices, IList outputUniqueSurfaceVertices ) : System