public static BSShape GetReference(BSScene physicsScene) { // Base compound shapes are not shared so this returns a raw shape. // A built compound shape can be reused in linksets. BSShapeCompound ret = new BSShapeCompound(CreatePhysicalCompoundShape(physicsScene)); CompoundShapes.Add(ret.AddrString, ret); return ret; }
public static bool TryGetCompoundByPtr(BulletShape pShape, out BSShapeCompound outCompound) { lock (CompoundShapes) { string addr = pShape.AddrString; return CompoundShapes.TryGetValue(addr, out outCompound); } }