Universe.Physics.BulletSPlugin.BSAPIXNA.CreateTerrainShape C# (CSharp) Method

CreateTerrainShape() public method

public CreateTerrainShape ( uint id, System.Vector3 size, float minHeight, float maxHeight, float heightMap, float scaleFactor, float collisionMargin ) : BulletShape
id uint
size System.Vector3
minHeight float
maxHeight float
heightMap float
scaleFactor float
collisionMargin float
return BulletShape
        public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight,
            float[] heightMap,
            float scaleFactor, float collisionMargin)
        {
            const int upAxis = 2;
            HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y,
                heightMap, scaleFactor,
                minHeight, maxHeight, upAxis,
                false);
  //          terrainShape.SetMargin(collisionMargin + 0.5f);
            terrainShape.SetMargin(collisionMargin);
            terrainShape.SetUseDiamondSubdivision(true);
            terrainShape.SetUserPointer(id);
            return new BulletShapeXNA(terrainShape, BSPhysicsShapeType.SHAPE_TERRAIN);
        }
BSAPIXNA