| VRS - The Virtual Rendering System |
| version 3.3 |
00001 #ifndef SKYTECHNIQUE_H 00002 #define SKYTECHNIQUE_H 00003 00004 #include <vrs/environment/config.h> 00005 #include <vrs/environment/skydome.h> 00006 #include <vrs/color.h> 00007 #include <vrs/vector.h> 00008 #include <vrs/opengl/techniquegl.h> 00009 00010 namespace EnvironmentRenderer { 00011 00015 class VRS_ENV_API SkyTechnique : public VRS::TechniqueGL { 00016 public: 00017 00029 SkyTechnique(SkyDome* sky, 00030 bool aerialPerspectiveEnabled = false, 00031 bool aerialPerspectivePerFragment = true); 00032 00033 00035 void setSky(SkyDome* sky); 00036 SkyDome* getSky() const; 00037 00039 void enableAerialPerspective(bool yesNo); 00040 bool isAerialPerspectiveEnabled() const; 00041 00043 void setAerialPerspectivePerFragment(bool yesNo); 00044 bool getAerialPerspectivePerFragment() const; 00045 00046 00047 virtual bool preparePass(VRS::Engine*); 00048 virtual void finishPass(VRS::Engine*); 00049 00050 virtual bool prepareEval(VRS::Engine*, const VRS::Shape*); 00051 virtual void finishEval(VRS::Engine*, const VRS::Shape*); 00052 00057 virtual bool canBeUsed(VRS::Engine* engine) const; 00058 00059 VRS_TYPEINFO(SkyTechnique, VRS::TechniqueGL); 00060 VRS_SERIALIZABLE(SkyTechnique); 00061 00062 private: 00063 00064 SkyTechnique(); // only for serialization 00065 00066 VRS::SO<SkyDome> m_sky; 00067 unsigned int m_recursions; 00068 bool m_render; 00069 bool m_aerialPerspectiveEnabled; 00070 bool m_aerialPerspectivePerFragment; 00071 }; 00072 00073 } // namespace VRS 00074 00075 #endif // SKYTECHNIQUE_H 00076