BulletSim: massive refactor of shape classes. Removed shape specific code from BSShapeCollection. Using BSShape* classes to hold references to shape. Simplified shape dependency callbacks. Remove 'PreferredShape' methods and have each class specify shape type. Disable compound shape linkset for a later commit that will simplify linkset implementation.

This commit is contained in:
Robert Adams
2013-04-28 14:44:21 -07:00
parent 890cb6a293
commit e5582939fd
20 changed files with 293 additions and 1053 deletions

View File

@@ -79,7 +79,7 @@ private sealed class BulletShapeUnman : BulletShape
: base()
{
ptr = xx;
type = typ;
shapeType = typ;
}
public override bool HasPhysicalShape
{
@@ -91,7 +91,7 @@ private sealed class BulletShapeUnman : BulletShape
}
public override BulletShape Clone()
{
return new BulletShapeUnman(ptr, type);
return new BulletShapeUnman(ptr, shapeType);
}
public override bool ReferenceSame(BulletShape other)
{
@@ -375,7 +375,7 @@ public override BulletShape DuplicateCollisionShape(BulletWorld world, BulletSha
{
BulletWorldUnman worldu = world as BulletWorldUnman;
BulletShapeUnman srcShapeu = srcShape as BulletShapeUnman;
return new BulletShapeUnman(BSAPICPP.DuplicateCollisionShape2(worldu.ptr, srcShapeu.ptr, id), srcShape.type);
return new BulletShapeUnman(BSAPICPP.DuplicateCollisionShape2(worldu.ptr, srcShapeu.ptr, id), srcShape.shapeType);
}
public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape)