Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/particle.h')
-rw-r--r--src/render/particle.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/render/particle.h b/src/render/particle.h
index f2b1788..0370660 100644
--- a/src/render/particle.h
+++ b/src/render/particle.h
@@ -23,9 +23,13 @@ class Particle
public:
Particle(const math::Vector3f &location, const unsigned long timestamp);
Particle(const math::Vector3f &location, const math::Vector3f &velocity, const unsigned long timestamp);
+
+ /* ---- inspectors ----------------------------------------- */
/**
* @brief location of the particle
+ * Depending on the attached setting of the ejector
+ * location can be in world coordinates or in model coordinates,
* */
inline const math::Vector3f &location() const {
return particle_location;
@@ -38,23 +42,39 @@ public:
return particle_velocity;
}
+ /**
+ * @brief radius of the particle
+ * */
const float radius() const
{
return particle_radius;
}
+ /**
+ * @brief alpha value of the particle
+ * */
const float alpha() const
{
return particle_alpha;
}
+
+ /**
+ * @brief rotation of the particle, in radians
+ * */
+ const float rotation() const
+ {
+ return particle_rotation;
+ }
/**
- * @brief creation timestamp
+ * @brief particle creation timestamp
* */
inline const unsigned long timestamp() const {
return particle_timestamp;
}
+ /* ---- mutators ------------------------------------------- */
+
/**
* @brief reference to the location of the particle
* */
@@ -85,21 +105,37 @@ public:
particle_velocity.assign(velocity);
}
+ /**
+ * @brief set the radius of the particle
+ * */
inline void set_radius(const float radius)
{
particle_radius = radius;
}
+ /**
+ * @brief set the alpha value of the particle
+ * */
inline void set_alpha(const float alpha)
{
particle_alpha = alpha;
}
+
+ /**
+ * @brief set the rotation of the particle, in radians
+ * This value is used to rotate the texture when rendering the particle
+ * */
+ inline void set_rotation(const float rotation)
+ {
+ particle_rotation = rotation;
+ }
protected:
math::Vector3f particle_location;
math::Vector3f particle_velocity;
float particle_radius;
float particle_alpha;
+ float particle_rotation;
unsigned long particle_timestamp;
};