/* render/renderext.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_RENDER_RENDEREXT_H__ #define __INCLUDED_RENDER_RENDEREXT_H__ #include #include "core/extension.h" #include "render/particlesystem.h" namespace render { /// the render extension of an entity class RenderExt : public core::Extension { public: RenderExt(core::Entity *entity); ~RenderExt(); typedef std::list ParticleSystems; inline const bool visible() const { return state_visible; } inline const bool detailvisible() const { return state_detailvisible; } inline const bool power() const { return state_power; } /** * @brief returns true if the entity is behind the camera */ inline const bool behind() const { return state_behind; } inline const float fuzz() const { return state_fuzz; } inline const float thrust() const { return state_thrust; } inline const float enginetime() const { return state_enginetime; } /** * @brief distance from attached entity to camera */ inline float distance() const { return state_distance; } /** * @brief particle systems for the attached entity */ inline ParticleSystems &particles() { return state_particles; } inline ParticleSystem *explosion() { return state_explosion; } virtual void frame(float elapsed); virtual void frame(float elapsed, const Camera & camera); private: bool state_visible; bool state_detailvisible; bool state_behind; bool state_power; float state_fuzz; float state_distance; float state_enginetime; float state_thrust; ParticleSystems state_particles; ParticleSystem *state_explosion; }; } // namespace render #endif // __INCLUDED_RENDER_RENDEREXT_H__