Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #pragma once
00019 #include "SphereSegment.h"
00020 #include <osg/Program>
00021 #include <osg/Uniform>
00022 #include <osg/TextureCubeMap>
00023
00024 class SkyDome : public SphereSegment
00025 {
00026 public:
00027 SkyDome(void);
00028 SkyDome(const SkyDome& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
00029 SkyDome(float radius, unsigned int longSteps, unsigned int latSteps, osg::TextureCubeMap* cubemap);
00030
00031 protected:
00032 ~SkyDome(void);
00033
00034 public:
00035 void setupStateSet(osg::TextureCubeMap* cubemap);
00036 void create(float radius, unsigned int latSteps, unsigned int longSteps, osg::TextureCubeMap* cubemap);
00037
00038 inline void setCubeMap(osg::TextureCubeMap* cubemap)
00039 {
00040 getOrCreateStateSet()->setTextureAttributeAndModes(0, cubemap, osg::StateAttribute::ON);
00041 }
00042
00043 private:
00044 osg::ref_ptr<osg::Program> createShader(void);
00045
00046 };