BulletSim: uplevel FixedShapeKey out of ShapeData structure (since it is getting simplified out of existance someday) and update all the references to same.

This commit is contained in:
Robert Adams
2012-11-20 11:30:22 -08:00
parent d6db0d5740
commit 65e55ada87
3 changed files with 22 additions and 20 deletions

View File

@@ -58,7 +58,7 @@ public abstract class BSShape
{
// an avatar capsule is close to a native shape (it is not shared)
ret = BSShapeNative.GetReference(physicsScene, prim, PhysicsShapeType.SHAPE_AVATAR,
ShapeData.FixedShapeKey.KEY_CAPSULE);
FixedShapeKey.KEY_CAPSULE);
physicsScene.DetailLog("{0},BSShape.GetShapeReference,avatarCapsule,shape={1}", prim.LocalID, ret);
}
@@ -123,14 +123,14 @@ public class BSShapeNative : BSShape
{
}
public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim,
PhysicsShapeType shapeType, ShapeData.FixedShapeKey shapeKey)
PhysicsShapeType shapeType, FixedShapeKey shapeKey)
{
// Native shapes are not shared and are always built anew.
return new BSShapeNative(physicsScene, prim, shapeType, shapeKey);
}
private BSShapeNative(BSScene physicsScene, BSPhysObject prim,
PhysicsShapeType shapeType, ShapeData.FixedShapeKey shapeKey)
PhysicsShapeType shapeType, FixedShapeKey shapeKey)
{
ShapeData nativeShapeData = new ShapeData();
nativeShapeData.Type = shapeType;