BEPUphysics.CollisionShapes.CompoundShape.CompoundShape C# (CSharp) Method

CompoundShape() public method

Constructs a compound shape.
public CompoundShape ( IList shapes ) : System
shapes IList Shape entries used to create the compound.
return System
        public CompoundShape(IList<CompoundShapeEntry> shapes)
        {
            if (shapes.Count > 0)
            {
                Vector3 center = ComputeCenter(shapes);
                this.shapes = new RawList<CompoundShapeEntry>(shapes);
                for (int i = 0; i < this.shapes.Count; i++)
                {
                    this.shapes.Elements[i].LocalTransform.Position -= center;
                }
            }
            else
            {
                throw new Exception("Compound shape must have at least 1 subshape.");
            }
        }

Same methods

CompoundShape::CompoundShape ( IList shapes, System.Vector3 &center ) : System