mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 03:26:15 +02:00
Fix bad static const inside class.
This commit is contained in:
parent
e2204ab78e
commit
df740dd82a
3 changed files with 5 additions and 4 deletions
|
@ -37,7 +37,7 @@ void CollisionInfo::apply() {
|
|||
// NOTE: Shape::computeEffectiveMass() has side effects: computes and caches partial Lagrangian coefficients
|
||||
Shape* shapeA = const_cast<Shape*>(_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<Shape*>(_shapeB);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue