mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
remove commented out cruft
This commit is contained in:
parent
123d73783b
commit
3239c259f9
2 changed files with 0 additions and 86 deletions
|
@ -91,86 +91,3 @@ btCollisionShape* ShapeInfoUtil::createShapeFromInfo(const ShapeInfo& info) {
|
|||
}
|
||||
return shape;
|
||||
}
|
||||
|
||||
/*
|
||||
const DoubleHashKey& ShapeInfo::computeHash() {
|
||||
if (_hash.isNull()) {
|
||||
// compute hash1
|
||||
// TODO?: provide lookup table for hash/hash2 of _type rather than recompute?
|
||||
int primeIndex = 0;
|
||||
_doubleHashKey._hash = DoubleHashKey::hashFunction((uint32_t)_type, primeIndex++);
|
||||
_doubleHashKey._hash2 = DoubleHashKey::hashFunction2((uint32_t)_type());
|
||||
|
||||
if (getData()) {
|
||||
// if externalData exists we use that to continue the hash
|
||||
|
||||
// compute hash
|
||||
uint32_t hash = _doubleHashKey._hash;
|
||||
const QVector<glm::vec3>& data = getData();
|
||||
|
||||
glm::vec3 tmpData;
|
||||
int numData = data.size();
|
||||
for (int i = 0; i < numData; ++i) {
|
||||
tmpData = data[i];
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
// NOTE: 0.49f is used to bump the float up almost half a millimeter
|
||||
// so the cast to int produces a round() effect rather than a floor()
|
||||
uint32_t floatHash =
|
||||
DoubleHashKey::hashFunction((uint32_t)(tmpData[j] * MILLIMETERS_PER_METER + copysignf(1.0f, tmpData[j]) * 0.49f), primeIndex++);
|
||||
hash ^= floatHash;
|
||||
}
|
||||
}
|
||||
_doubleHashKey._hash = (int32_t)hash;
|
||||
|
||||
// compute hash2
|
||||
hash = _doubleHashKey._hash2;
|
||||
for (int i = 0; i < numData; ++i) {
|
||||
tmpData = data[i];
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
// NOTE: 0.49f is used to bump the float up almost half a millimeter
|
||||
// so the cast to int produces a round() effect rather than a floor()
|
||||
uint32_t floatHash =
|
||||
DoubleHashKey::hashFunction2((uint32_t)(tmpData[j] * MILLIMETERS_PER_METER + copysignf(1.0f, tmpData[j]) * 0.49f));
|
||||
hash += ~(floatHash << 17);
|
||||
hash ^= (floatHash >> 11);
|
||||
hash += (floatHash << 4);
|
||||
hash ^= (floatHash >> 7);
|
||||
hash += ~(floatHash << 10);
|
||||
hash = (hash << 16) | (hash >> 16);
|
||||
}
|
||||
}
|
||||
_doubleHashKey._hash2 = (uint32_t)hash;
|
||||
} else {
|
||||
// this shape info has no external data so we just use extents to continue hash
|
||||
// compute hash1
|
||||
uint32_t hash = _doubleHashKey._hash;
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
// NOTE: 0.49f is used to bump the float up almost half a millimeter
|
||||
// so the cast to int produces a round() effect rather than a floor()
|
||||
uint32_t floatHash =
|
||||
DoubleHashKey::hashFunction((uint32_t)(_halfExtents[j] * MILLIMETERS_PER_METER + copysignf(1.0f, _halfExtents[j]) * 0.49f), primeIndex++);
|
||||
hash ^= floatHash;
|
||||
}
|
||||
_doubleHashKey._hash = (uint32_t)hash;
|
||||
|
||||
// compute hash2
|
||||
hash = _doubleHashKey._hash2;
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
// NOTE: 0.49f is used to bump the float up almost half a millimeter
|
||||
// so the cast to int produces a round() effect rather than a floor()
|
||||
uint32_t floatHash =
|
||||
DoubleHashKey::hashFunction2((uint32_t)(_halfExtents[j] * MILLIMETERS_PER_METER + copysignf(1.0f, _halfExtents[j]) * 0.49f));
|
||||
hash += ~(floatHash << 17);
|
||||
hash ^= (floatHash >> 11);
|
||||
hash += (floatHash << 4);
|
||||
hash ^= (floatHash >> 7);
|
||||
hash += ~(floatHash << 10);
|
||||
hash = (hash << 16) | (hash >> 16);
|
||||
}
|
||||
_doubleHashKey._hash2 = (uint32_t)hash;
|
||||
}
|
||||
}
|
||||
|
||||
return _doubleHashKey;
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <btBulletDynamicsCommon.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include <DoubleHashKey.h>
|
||||
#include <ShapeInfo.h>
|
||||
|
||||
// translates between ShapeInfo and btShape
|
||||
|
@ -25,8 +24,6 @@ namespace ShapeInfoUtil {
|
|||
|
||||
btCollisionShape* createShapeFromInfo(const ShapeInfo& info);
|
||||
|
||||
//DoubleHashKey computeHash(const ShapeInfo& info);
|
||||
|
||||
// TODO? just use bullet shape types everywhere?
|
||||
int toBulletShapeType(int shapeInfoType);
|
||||
int fromBulletShapeType(int bulletShapeType);
|
||||
|
|
Loading…
Reference in a new issue