Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-11-23 22:13:03 +0000
committerStijn Buys <ingar@osirion.org>2008-11-23 22:13:03 +0000
commitd01664f17503d52d4be1c31e099065da0d38d7f3 (patch)
tree63f15840977a02bdeca925c16a80b3da93dae5d8 /src/model/classes.h
parentac3663d05da4e236d02620ae98d5a7e6882bc802 (diff)
merged model classes into one file, classname cleanup, fx_particles
Diffstat (limited to 'src/model/classes.h')
-rw-r--r--src/model/classes.h184
1 files changed, 184 insertions, 0 deletions
diff --git a/src/model/classes.h b/src/model/classes.h
new file mode 100644
index 0000000..f51a391
--- /dev/null
+++ b/src/model/classes.h
@@ -0,0 +1,184 @@
+/*
+ model/classes.h
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_MODEL_CLASSES_H__
+#define __INCLUDED_MODEL_CLASSES_H__
+
+#include "math/axis.h"
+#include "math/color.h"
+#include "math/vector3f.h"
+
+namespace model
+{
+
+/* ---- class Light ------------------------------------------------ */
+
+/// an exterior light
+class Light
+{
+public:
+ Light();
+
+ Light(const math::Vector3f & location, const math::Color & color, bool strobe=false);
+
+ ~Light();
+
+ inline const math::Vector3f & location() const
+ {
+ return light_location;
+ }
+
+ inline const math::Color & color() const
+ {
+ return light_color;
+ };
+
+ /// true if this is a strobe light
+ inline bool strobe() const
+ {
+ return light_strobe;
+ }
+
+ /// true if this light has entity color
+ inline bool entity() const
+ {
+ return light_entity;
+ }
+
+ /// size of the light, default is 1.0f
+ inline float radius() const
+ {
+ return light_radius;
+ }
+
+ /// strobe time offset, in seconds
+ inline float offset() const
+ {
+ return light_offset;
+ }
+
+ /// frequency in strobes per second
+ inline float frequency() const
+ {
+ return light_frequency;
+ }
+
+ /// fraction a strobe light will be on, default is 0.5f
+ inline float time() const
+ {
+ return light_time;
+ }
+
+ /// flare texture number
+ inline unsigned int flare() const
+ {
+ return light_flare;
+ }
+
+ /// render texture number
+ inline size_t texture() const
+ {
+ return render_texture;
+ }
+
+ math::Vector3f light_location;
+ math::Color light_color;
+ bool light_strobe;
+ bool light_entity;
+ float light_radius;
+ float light_frequency;
+ float light_offset;
+ float light_time;
+
+ unsigned int light_flare;
+
+ size_t render_texture;
+};
+
+/* ---- class Flare ------------------------------------------------ */
+
+/// a flare is a directional light
+class Flare : public Light
+{
+public:
+ Flare();
+ ~Flare();
+
+ inline float angle() const
+ {
+ return flare_angle;
+ }
+
+ inline bool engine() const
+ {
+ return flare_engine;
+ }
+
+ float flare_angle;
+ bool flare_engine;
+};
+
+/* ---- class Particles -------------------------------------------- */
+
+/// a particle system
+class Particles
+{
+public:
+ Particles();
+
+ Particles(const math::Vector3f & location);
+ ~Particles();
+
+ inline const math::Vector3f & location() const
+ {
+ return particles_location;
+ }
+
+ inline const math::Axis &axis() const
+ {
+ return particles_axis;
+ }
+
+ inline const std::string & script() const
+ {
+ return particles_script;
+ }
+
+ std::string particles_script;
+ math::Vector3f particles_location;
+ math::Axis particles_axis;
+};
+
+/* ---- class Dock ------------------------------------------------- */
+
+/// a docking location
+class Dock
+{
+public:
+ Dock();
+ ~Dock();
+
+ /// location of the dock
+ inline const math::Vector3f & location() const
+ {
+ return dock_location;
+ }
+
+ /// trigger distance default is 0.01f
+ inline float radius() const
+ {
+ return dock_radius;
+ }
+
+
+ math::Vector3f dock_location;
+ float dock_radius;
+};
+
+}
+
+#endif // __INCLUDED_MODEL_CLASSES_H__
+