still recovering from troubled merge

This commit is contained in:
Seth Alves 2015-03-13 18:21:30 -07:00
parent 2345e5a4f9
commit 8481a65fbb

View file

@ -29,7 +29,6 @@ ShapeManager::~ShapeManager() {
btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
if (info.getType() == SHAPE_TYPE_NONE) {
// qDebug() << "OOOOOO type is null";
return NULL;
}
// Very small or large objects are not supported.
@ -37,19 +36,16 @@ btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
const float MIN_SHAPE_DIAGONAL_SQUARED = 3.0e-4f; // 1 cm cube
const float MAX_SHAPE_DIAGONAL_SQUARED = 3.0e4f; // 100 m cube
if (diagonal < MIN_SHAPE_DIAGONAL_SQUARED || diagonal > MAX_SHAPE_DIAGONAL_SQUARED) {
// qDebug() << "OOOOOO too small " << diagonal << MIN_SHAPE_DIAGONAL_SQUARED << MAX_SHAPE_DIAGONAL_SQUARED;
return NULL;
}
DoubleHashKey key = info.getHash();
ShapeReference* shapeRef = _shapeMap.find(key);
if (shapeRef) {
// qDebug() << "OOOOOO ref";
shapeRef->refCount++;
return shapeRef->shape;
}
btCollisionShape* shape = ShapeInfoUtil::createShapeFromInfo(info);
if (shape) {
// qDebug() << "OOOOOO shape";
ShapeReference newRef;
newRef.refCount = 1;
newRef.shape = shape;
@ -72,7 +68,7 @@ bool ShapeManager::releaseShape(const DoubleHashKey& key) {
collectGarbage();
}
}
return;
return true;
} else {
// attempt to remove shape that has no refs
assert(false);
@ -81,7 +77,7 @@ bool ShapeManager::releaseShape(const DoubleHashKey& key) {
// attempt to remove unmanaged shape
assert(false);
}
assert(false);
return false;
}
bool ShapeManager::releaseShape(const ShapeInfo& info) {