24 #ifndef _SkyX_VClouds_LightningManager_H_
25 #define _SkyX_VClouds_LightningManager_H_
33 namespace SkyX {
namespace VClouds {
78 void update(
const Ogre::Real& timeSinceLastFrame);
90 Lightning* addLightning(
const Ogre::Vector3& p,
const Ogre::Vector3& d,
92 const Ogre::uint32& div = static_cast<Ogre::uint32>(
93 Ogre::Math::RangeRandom(12, 30)));
98 void updateMaterial();
105 mListeners.push_back(listener);
111 void removeListener(Listener* listener);
145 void setLightningColor(
const Ogre::Vector3& c);
152 return mLightningColor;
161 mLightningTimeMultiplier = m;
169 return mLightningTimeMultiplier;
177 mAverageLightningApparitionTime = alat;
178 mRemainingTime = alat;
186 return mAverageLightningApparitionTime;
202 void _updateRenderQueueGroup(
const Ogre::uint8& rqg);
208 void _setVisible(
const bool& v);
215 std::vector<Lightning*> mLightnings;
217 std::vector<Ogre::SceneNode*> mSceneNodes;
223 Ogre::Vector3 mLightningColor;
225 Ogre::Real mLightningTimeMultiplier;
228 Ogre::Real mAverageLightningApparitionTime;
230 Ogre::Real mRemainingTime;
233 Ogre::MaterialPtr mVolCloudsLightningMaterial;
235 Ogre::MaterialPtr mLightningMaterial;
238 std::vector<Listener*> mListeners;
const bool & isEnabled() const
Get whether the lightning system is enabled or not.
Definition: LightningManager.h:137
bool mEnabled
True if skyx is enabled.
Definition: SkyX.h:449
Definition: LightningManager.h:37
const std::vector< Listener * > & getListeners() const
Get listeners.
Definition: LightningManager.h:123
void create()
Create SkyX.
void addListener(Listener *listener)
Add listener.
Definition: LightningManager.h:103
const Ogre::Vector3 & getLightningColor() const
Get lightning color.
Definition: LightningManager.h:150
void removeListeners()
Remove listeners.
Definition: LightningManager.h:115
GAZEBO_VISIBLE void enable()
Enable sensors.
virtual ~Listener()
Definition: LightningManager.h:55
Listener class.
Definition: LightningManager.h:42
virtual void lightningAdded(Lightning *l)
Lightning added.
Definition: LightningManager.h:54
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
void setLightningTimeMultiplier(const Ogre::Real &m)
Set lightning time multiplier.
Definition: LightningManager.h:159
void setEnabled(bool _enabled)
Definition: SkyX.h:355
const Ogre::Real & getAverageLightningApparitionTime() const
Get average lightning apparition time.
Definition: LightningManager.h:184
bool mCreated
Is SkyX created?
Definition: SkyX.h:422
Definition: Lightning.h:32
const bool & isCreated() const
Has been create() already called?
Definition: LightningManager.h:192
void setAverageLightningApparitionTime(const Ogre::Real &alat)
Set average lightning apparition time.
Definition: LightningManager.h:175
const Ogre::Real & getLightningTimeMultiplier() const
Set lightning time multiplier.
Definition: LightningManager.h:167
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.
#define DllExport
Include external headers.
Definition: Prerequisites.h:45