diff --git a/libraries/shared/src/CollisionInfo.cpp b/libraries/shared/src/CollisionInfo.cpp index c76c99e747..e862a22f4a 100644 --- a/libraries/shared/src/CollisionInfo.cpp +++ b/libraries/shared/src/CollisionInfo.cpp @@ -37,7 +37,7 @@ void CollisionInfo::apply() { // NOTE: Shape::computeEffectiveMass() has side effects: computes and caches partial Lagrangian coefficients Shape* shapeA = const_cast(_shapeA); float massA = shapeA->computeEffectiveMass(_penetration, _contactPoint); - float massB = Shape::MAX_MASS; + float massB = MAX_SHAPE_MASS; float totalMass = massA + massB; if (_shapeB) { Shape* shapeB = const_cast(_shapeB); diff --git a/libraries/shared/src/Ragdoll.cpp b/libraries/shared/src/Ragdoll.cpp index 833bcdb607..1d24e74864 100644 --- a/libraries/shared/src/Ragdoll.cpp +++ b/libraries/shared/src/Ragdoll.cpp @@ -49,7 +49,7 @@ float FixedConstraint::enforce() { void FixedConstraint::setPoint(VerletPoint* point) { assert(point); _point = point; - _point->_mass = Shape::MAX_MASS; + _point->_mass = MAX_SHAPE_MASS; } void FixedConstraint::setAnchor(const glm::vec3& anchor) { diff --git a/libraries/shared/src/Shape.h b/libraries/shared/src/Shape.h index 8d4c1898b5..09ed30a116 100644 --- a/libraries/shared/src/Shape.h +++ b/libraries/shared/src/Shape.h @@ -17,9 +17,10 @@ class PhysicsEntity; +const float MAX_SHAPE_MASS = 1.0e18f; // something less than sqrt(FLT_MAX) + class Shape { public: - static const float MAX_MASS = 1.0e18f; // something less than sqrt(FLT_MAX) enum Type{ UNKNOWN_SHAPE = 0, @@ -29,7 +30,7 @@ public: LIST_SHAPE }; - Shape() : _type(UNKNOWN_SHAPE), _owningEntity(NULL), _boundingRadius(0.f), _translation(0.f), _rotation(), _mass(MAX_MASS) { } + Shape() : _type(UNKNOWN_SHAPE), _owningEntity(NULL), _boundingRadius(0.f), _translation(0.f), _rotation(), _mass(MAX_SHAPE_MASS) { } virtual ~Shape() {} int getType() const { return _type; }