From 53e7cd7797e5f02900eef96e45c3475f08cbd7b5 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 5 Feb 2014 10:16:43 -0800 Subject: [PATCH 1/2] fix particle init --- libraries/particles/src/Particle.cpp | 8 ++++++++ libraries/particles/src/Particle.h | 1 + 2 files changed, 9 insertions(+) diff --git a/libraries/particles/src/Particle.cpp b/libraries/particles/src/Particle.cpp index 69ad2c03fc..d9f0beb81a 100644 --- a/libraries/particles/src/Particle.cpp +++ b/libraries/particles/src/Particle.cpp @@ -92,6 +92,10 @@ Particle::Particle(const ParticleID& particleID, const ParticleProperties& prope _script = DEFAULT_SCRIPT; _inHand = NOT_IN_HAND; _shouldDie = false; + _modelURL = DEFAULT_MODEL_URL; + _modelTranslation = DEFAULT_MODEL_TRANSLATION; + _modelRotation = DEFAULT_MODEL_ROTATION; + _modelScale = DEFAULT_MODEL_SCALE; setProperties(properties); } @@ -124,6 +128,10 @@ void Particle::init(glm::vec3 position, float radius, rgbColor color, glm::vec3 _script = updateScript; _inHand = inHand; _shouldDie = false; + _modelURL = DEFAULT_MODEL_URL; + _modelTranslation = DEFAULT_MODEL_TRANSLATION; + _modelRotation = DEFAULT_MODEL_ROTATION; + _modelScale = DEFAULT_MODEL_SCALE; } void Particle::setMass(float value) { diff --git a/libraries/particles/src/Particle.h b/libraries/particles/src/Particle.h index 6d22e75810..0f01e943f7 100644 --- a/libraries/particles/src/Particle.h +++ b/libraries/particles/src/Particle.h @@ -56,6 +56,7 @@ const float DEFAULT_RADIUS = 0.1f / TREE_SCALE; const float MINIMUM_PARTICLE_ELEMENT_SIZE = (1.0f / 100000.0f) / TREE_SCALE; // smallest size container const glm::vec3 DEFAULT_GRAVITY(0, (-9.8f / TREE_SCALE), 0); const QString DEFAULT_SCRIPT(""); +const QString DEFAULT_MODEL_URL(""); const glm::vec3 DEFAULT_MODEL_TRANSLATION(0, 0, 0); const glm::quat DEFAULT_MODEL_ROTATION(0, 0, 0, 0); const float DEFAULT_MODEL_SCALE = 1.0f; From 76bc4564ad2744619e77604c420ab362b7628664 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 5 Feb 2014 10:24:00 -0800 Subject: [PATCH 2/2] push to force rebuild --- libraries/particles/src/Particle.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/particles/src/Particle.h b/libraries/particles/src/Particle.h index 0f01e943f7..84efdd2916 100644 --- a/libraries/particles/src/Particle.h +++ b/libraries/particles/src/Particle.h @@ -63,7 +63,6 @@ const float DEFAULT_MODEL_SCALE = 1.0f; const bool IN_HAND = true; // it's in a hand const bool NOT_IN_HAND = !IN_HAND; // it's not in a hand - /// A collection of properties of a particle used in the scripting API. Translates between the actual properties of a particle /// and a JavaScript style hash/QScriptValue storing a set of properties. Used in scripting to set/get the complete set of /// particle properties via JavaScript hashes/QScriptValues