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

MobileMeshShape() public method

Constructs a new mobile mesh shape.
public MobileMeshShape ( Vector3 vertices, int indices, AffineTransform localTransform, MobileMeshSolidity solidity ) : BEPUphysics.DataStructures
vertices Vector3 Vertices of the mesh.
indices int Indices of the mesh.
localTransform BEPUutilities.AffineTransform Local transform to apply to the shape.
solidity MobileMeshSolidity Solidity state of the shape.
return BEPUphysics.DataStructures
        public MobileMeshShape(Vector3[] vertices, int[] indices, AffineTransform localTransform, MobileMeshSolidity solidity)
        {
            this.solidity = solidity;
            var data = new TransformableMeshData(vertices, indices, localTransform);
            ShapeDistributionInformation distributionInfo;
            ComputeShapeInformation(data, out distributionInfo);

            for (int i = 0; i < surfaceVertices.Count; i++)
            {
                Vector3.Subtract(ref surfaceVertices.Elements[i], ref distributionInfo.Center, out surfaceVertices.Elements[i]);
            }
            triangleMesh = new TriangleMesh(data);

            ComputeSolidSidedness();
        }

Same methods

MobileMeshShape::MobileMeshShape ( Vector3 vertices, int indices, AffineTransform localTransform, MobileMeshSolidity solidity, ShapeDistributionInformation &distributionInfo ) : BEPUphysics.DataStructures