public static CompoundShape Create(GImpactMeshShape gImpactMesh, float depth)
 {
     CompoundShape colShape = new CompoundShape();
     using (var cb = new MyInternalTriangleIndexCallback(colShape, gImpactMesh, depth))
     {
         Vector3 aabbMin, aabbMax;
         gImpactMesh.GetAabb(Matrix.Identity, out aabbMin, out aabbMax);
         gImpactMesh.MeshInterface.InternalProcessAllTriangles(cb, aabbMin, aabbMax);
     }
     return colShape;
 }
Exemplo n.º 2
0
        public static CompoundShape Create(GImpactMeshShape gImpactMesh, float depth)
        {
            CompoundShape colShape = new CompoundShape();

            using (var cb = new MyInternalTriangleIndexCallback(colShape, gImpactMesh, depth))
            {
                Vector3 aabbMin, aabbMax;
                gImpactMesh.GetAabb(Matrix.Identity, out aabbMin, out aabbMax);
                gImpactMesh.MeshInterface.InternalProcessAllTriangles(cb, aabbMin, aabbMax);
            }
            return(colShape);
        }
        public static CompoundShape Create(GImpactMeshShape impactMesh, Scalar depth)
        {
            var shape = new CompoundShape();

            using (var callback = new MyInternalTriangleIndexCallback(shape, impactMesh, depth))
            {
                Vector3 aabbMin, aabbMax;
                impactMesh.GetAabb(Matrix.Identity, out aabbMin, out aabbMax);
                impactMesh.MeshInterface.InternalProcessAllTriangles(callback, aabbMin, aabbMax);
            }
            return(shape);
        }