Added osg::EarthSky node to the core osg library, and added support for it into

osgUtil::SceneView, osg::CullVisitor, osgPlugin/osg and updated the hangglide
demo to use the new earth sky node.
This commit is contained in:
Robert Osfield
2001-10-02 11:36:14 +00:00
parent fc1fa57275
commit 430c8606e9
8 changed files with 67 additions and 8 deletions

View File

@@ -15,6 +15,7 @@ class LOD;
class Sequence;
class Switch;
class Impostor;
class EarthSky;
/** Visitor for type safe operations on osg::Node's.
Based on GOF's Visitor pattern.*/
@@ -128,6 +129,7 @@ class SG_EXPORT NodeVisitor : public Referenced
virtual void apply(Sequence& node) { apply((Group&)node); }
virtual void apply(LOD& node) { apply((Group&)node); }
virtual void apply(Impostor& node) { apply((LOD&)node); }
virtual void apply(EarthSky& node) { apply((Group&)node); }
protected:

View File

@@ -10,6 +10,7 @@
#include <osg/State>
#include <osg/Camera>
#include <osg/Impostor>
#include <osg/EarthSky>
#include <osg/Notify>
#include <osgUtil/RenderGraph>
@@ -47,12 +48,19 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
virtual void apply(osg::Transform& node);
virtual void apply(osg::Switch& node);
virtual void apply(osg::LOD& node);
virtual void apply(osg::EarthSky& node);
virtual void apply(osg::Impostor& node);
void setCamera(const osg::Camera& camera);
void setCamera(const osg::Camera& camera);
const osg::Camera* getCamera() const { return _camera.get(); }
void setEarthSky(const osg::EarthSky* earthSky) { _earthSky = earthSky; }
const osg::EarthSky* getEarthSky() const { return _earthSky.get(); }
void setLODBias(const float bias) { _LODBias = bias; }
const float getLODBias() const { return _LODBias; }
@@ -279,6 +287,8 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
float _calculated_zfar;
osg::ref_ptr<const osg::Camera> _camera;
osg::ref_ptr<const osg::EarthSky> _earthSky;
TransparencySortMode _tsm;