varregion: add plumbing to pass region size from Scene down to the

physics engine.
Older physics engines will default to the legacy region size.
Update BulletSim to use the new region size information.
This commit is contained in:
Robert Adams
2013-11-04 22:10:54 -08:00
parent cd1a23fc14
commit f2810bf03a
9 changed files with 41 additions and 17 deletions

View File

@@ -165,14 +165,15 @@ public class BulletConstraint
// than making copies.
public class BulletHMapInfo
{
public BulletHMapInfo(uint id, float[] hm) {
public BulletHMapInfo(uint id, float[] hm, float pSizeX, float pSizeY) {
ID = id;
heightMap = hm;
terrainRegionBase = OMV.Vector3.Zero;
minCoords = new OMV.Vector3(100f, 100f, 25f);
maxCoords = new OMV.Vector3(101f, 101f, 26f);
minZ = maxZ = 0f;
sizeX = sizeY = 256f;
sizeX = pSizeX;
sizeY = pSizeY;
}
public uint ID;
public float[] heightMap;