From 06e1d4a8bc02a32defc48b2f8ef2fff104a09e7c Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 3 Sep 2014 13:16:49 -0700 Subject: [PATCH] init Shape::_mass in all ctors --- libraries/shared/src/Shape.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libraries/shared/src/Shape.h b/libraries/shared/src/Shape.h index 52369139c0..345d69d8e4 100644 --- a/libraries/shared/src/Shape.h +++ b/libraries/shared/src/Shape.h @@ -81,17 +81,22 @@ public: protected: // these ctors are protected (used by derived classes only) - Shape(Type type) : _type(type), _owningEntity(NULL), _boundingRadius(0.f), _translation(0.f), _rotation() { + Shape(Type type) : _type(type), _owningEntity(NULL), + _boundingRadius(0.f), _translation(0.f), + _rotation(), _mass(MAX_SHAPE_MASS) { _id = getNextID(); } - Shape(Type type, const glm::vec3& position) - : _type(type), _owningEntity(NULL), _boundingRadius(0.f), _translation(position), _rotation() { + Shape(Type type, const glm::vec3& position) : + _type(type), _owningEntity(NULL), + _boundingRadius(0.f), _translation(position), + _rotation(), _mass(MAX_SHAPE_MASS) { _id = getNextID(); } - Shape(Type type, const glm::vec3& position, const glm::quat& rotation) - : _type(type), _owningEntity(NULL), _boundingRadius(0.f), _translation(position), _rotation(rotation) { + Shape(Type type, const glm::vec3& position, const glm::quat& rotation) : _type(type), _owningEntity(NULL), + _boundingRadius(0.f), _translation(position), + _rotation(rotation), _mass(MAX_SHAPE_MASS) { _id = getNextID(); }