00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00035 #ifndef __SO3SKY_LIGHT_H__
00036 #define __SO3SKY_LIGHT_H__
00037
00038 #include "../SCOLBasic/SO3DataScol.h"
00039
00040 namespace SO3
00041 {
00042
00043 class _SO3_Export SSkyLight : public SData
00044 {
00045 public:
00046 protected:
00047 SEnvironment* parentEnvironment;
00048 Ogre::SceneManager* ogreSceneManager;
00049 Ogre::Light* ogreSkyLight;
00050 double lastJulDay;
00051 private:
00052
00053 public:
00056 SSkyLight(SEnvironment* parent, std::string skyLightName);
00057
00061 ~SSkyLight();
00062
00065 SEnvironment* GetEnvironment();
00066
00069 void Update();
00070
00073 const Ogre::Vector3 GetLightDirection() const;
00074
00077 void SetLightDirection(const Ogre::Vector3& direction);
00078
00081 const Ogre::ColourValue GetLightColour() const;
00082
00085 void SetLightColour(const Ogre::ColourValue& newColour);
00086 protected:
00089 virtual const Ogre::Vector3 ComputeDirectionImpl(double julianDay)=0;
00090
00093 const Ogre::Vector3 MakeDirection (Ogre::Degree azimuth, Ogre::Degree altitude);
00094 private:
00098 SSkyLight();
00099 };
00100
00101 }
00102
00103 #endif