clear points for non-hull shapes

This commit is contained in:
Seth Alves 2015-03-25 15:21:28 -07:00
parent 719dae61a9
commit dd9290bd59

View file

@ -23,6 +23,7 @@ void ShapeInfo::clear() {
void ShapeInfo::setParams(ShapeType type, const glm::vec3& halfExtents, QString url) {
_type = type;
_points.clear();
switch(type) {
case SHAPE_TYPE_NONE:
_halfExtents = glm::vec3(0.0f);
@ -56,6 +57,7 @@ void ShapeInfo::setBox(const glm::vec3& halfExtents) {
_url = "";
_type = SHAPE_TYPE_BOX;
_halfExtents = halfExtents;
_points.clear();
_doubleHashKey.clear();
}
@ -63,6 +65,7 @@ void ShapeInfo::setSphere(float radius) {
_url = "";
_type = SHAPE_TYPE_SPHERE;
_halfExtents = glm::vec3(radius, radius, radius);
_points.clear();
_doubleHashKey.clear();
}
@ -70,6 +73,7 @@ void ShapeInfo::setEllipsoid(const glm::vec3& halfExtents) {
_url = "";
_type = SHAPE_TYPE_ELLIPSOID;
_halfExtents = halfExtents;
_points.clear();
_doubleHashKey.clear();
}
@ -87,6 +91,7 @@ void ShapeInfo::setCapsuleY(float radius, float halfHeight) {
_url = "";
_type = SHAPE_TYPE_CAPSULE_Y;
_halfExtents = glm::vec3(radius, halfHeight, radius);
_points.clear();
_doubleHashKey.clear();
}