SkyDome.h
Go to the documentation of this file.
00001 /*
00002  * This source file is part of the osgOcean library
00003  *
00004  * Copyright (C) 2009 Kim Bale
00005  * Copyright (C) 2009 The University of Hull, UK
00006  *
00007  * This program is free software; you can redistribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License as published by the Free Software
00009  * Foundation; either version 3 of the License, or (at your option) any later
00010  * version.
00011 
00012  * This program is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00015  * http://www.gnu.org/copyleft/lesser.txt.
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 };


uwsim
Author(s): Mario Prats
autogenerated on Mon Oct 6 2014 08:24:07