mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-21 07:09:15 +02:00
commit
98967189ac
2 changed files with 9 additions and 1 deletions
|
@ -92,6 +92,10 @@ Particle::Particle(const ParticleID& particleID, const ParticleProperties& prope
|
||||||
_script = DEFAULT_SCRIPT;
|
_script = DEFAULT_SCRIPT;
|
||||||
_inHand = NOT_IN_HAND;
|
_inHand = NOT_IN_HAND;
|
||||||
_shouldDie = false;
|
_shouldDie = false;
|
||||||
|
_modelURL = DEFAULT_MODEL_URL;
|
||||||
|
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||||
|
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||||
|
_modelScale = DEFAULT_MODEL_SCALE;
|
||||||
|
|
||||||
setProperties(properties);
|
setProperties(properties);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +128,10 @@ void Particle::init(glm::vec3 position, float radius, rgbColor color, glm::vec3
|
||||||
_script = updateScript;
|
_script = updateScript;
|
||||||
_inHand = inHand;
|
_inHand = inHand;
|
||||||
_shouldDie = false;
|
_shouldDie = false;
|
||||||
|
_modelURL = DEFAULT_MODEL_URL;
|
||||||
|
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||||
|
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||||
|
_modelScale = DEFAULT_MODEL_SCALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Particle::setMass(float value) {
|
void Particle::setMass(float value) {
|
||||||
|
|
|
@ -56,13 +56,13 @@ const float DEFAULT_RADIUS = 0.1f / TREE_SCALE;
|
||||||
const float MINIMUM_PARTICLE_ELEMENT_SIZE = (1.0f / 100000.0f) / TREE_SCALE; // smallest size container
|
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 glm::vec3 DEFAULT_GRAVITY(0, (-9.8f / TREE_SCALE), 0);
|
||||||
const QString DEFAULT_SCRIPT("");
|
const QString DEFAULT_SCRIPT("");
|
||||||
|
const QString DEFAULT_MODEL_URL("");
|
||||||
const glm::vec3 DEFAULT_MODEL_TRANSLATION(0, 0, 0);
|
const glm::vec3 DEFAULT_MODEL_TRANSLATION(0, 0, 0);
|
||||||
const glm::quat DEFAULT_MODEL_ROTATION(0, 0, 0, 0);
|
const glm::quat DEFAULT_MODEL_ROTATION(0, 0, 0, 0);
|
||||||
const float DEFAULT_MODEL_SCALE = 1.0f;
|
const float DEFAULT_MODEL_SCALE = 1.0f;
|
||||||
const bool IN_HAND = true; // it's in a hand
|
const bool IN_HAND = true; // it's in a hand
|
||||||
const bool NOT_IN_HAND = !IN_HAND; // it's not 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
|
/// 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
|
/// 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
|
/// particle properties via JavaScript hashes/QScriptValues
|
||||||
|
|
Loading…
Reference in a new issue