diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
commit | f030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch) | |
tree | cd92baf9e4fa8a136523b9eb570e9811846c9250 /src/model/model.h | |
parent | 5636fad174f0bcff857c357c394c4cc8d424b302 (diff) |
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/model/model.h')
-rw-r--r-- | src/model/model.h | 96 |
1 files changed, 41 insertions, 55 deletions
diff --git a/src/model/model.h b/src/model/model.h index af3b1dc..30714d4 100644 --- a/src/model/model.h +++ b/src/model/model.h @@ -32,16 +32,16 @@ class Model public: /// type definition for the model registry typedef std::map<std::string, Model*> Registry; - + /// type definition for a list of model fragments typedef std::list<Fragment *> Fragments; - + /// type definition for a list of model lights typedef std::list<Light *> Lights; - + /// type definition for a list of model flares typedef std::list<Flare *> Flares; - + /// type definition for a lost of dockable locations typedef std::list<Dock *> Docks; @@ -50,97 +50,84 @@ public: /// type definition for a list of FragmentGroups typedef std::list<FragmentGroup *> Groups; - + /// create a model with a name Model(const std::string & name); - + /// delete the model, and all fragments, lights, etc ~Model(); - + /// the name of the model - inline const std::string & name() const - { + inline const std::string & name() const { return model_name; } - + /// radius - inline float radius() const - { + inline float radius() const { return model_radius; } - + /// additional model fragment groups - inline Groups & groups() - { + inline Groups & groups() { return model_groups; } /// list of lights - inline Lights & lights() - { + inline Lights & lights() { return model_lights; } /// list of dockable locations - inline Docks & docks() - { + inline Docks & docks() { return model_docks; } - + /// list of flares - inline Flares & flares() - { + inline Flares & flares() { return model_flares; } - + /// list of engines - inline ParticleSystems & particles() - { + inline ParticleSystems & particles() { return model_particles; } - + /// maximum values of the bounding box - inline const math::Vector3f & maxbbox() const - { + inline const math::Vector3f & maxbbox() const { return model_maxbbox; } - + /// minimum values of the bounding box - inline const math::Vector3f & minbbox() const - { + inline const math::Vector3f & minbbox() const { return model_minbbox; } - + /// engine sound loop for this model - inline unsigned int enginesound() const - { + inline unsigned int enginesound() const { return model_enginesound; } /// impulse sound set for this model - inline unsigned int impulsesound() const - { + inline unsigned int impulsesound() const { return model_impulsesound; } /// engine color for this model - inline const math::Color & enginecolor() const - { + inline const math::Color & enginecolor() const { return model_enginecolor; } /// original origin - inline const math::Vector3f & origin() const - { + inline const math::Vector3f & origin() const { return model_origin; } - + /// add a light to the model void add_light(Light *light); - + /// add a particle system to the model void add_particles(Particles *particles); - + /// add a flare to the model void add_flare(Flare *flare); @@ -153,15 +140,15 @@ public: void set_radius(const float radius); void set_origin(const math::Vector3f &origin); - + math::Vector3f model_maxbbox; math::Vector3f model_minbbox; - + unsigned int model_enginesound; unsigned int model_impulsesound; math::Color model_enginecolor; - + /// total number of triangles size_t model_tris_count; /// number of detail triangles @@ -172,29 +159,28 @@ public: size_t model_quad_detail_count; /* ---- static functions for the Model registry -------------------- */ - + /// the model registry - static inline Registry & registry() - { + static inline Registry & registry() { return model_registry; } - + /// get name model, returns 0 if not found static Model *find(const std::string & name); - + /// get named model from the registry and load it if necessary static Model *load(const std::string & name); - + /// clear the model registry static void clear(); - + /// list the content of the model registry static void list(); - + /// list one model static void list_model(Model *model); - + private: std::string model_name; |