VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgCullVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 #include <osgUtil/CullVisitor>
15 #include <boost/signal.hpp>
16 
17 namespace makVrv
18 {
24  class DT_DLL_VRVOSG DtOsgCullVisitor : public osgUtil::CullVisitor
25  {
26  public:
29 
32 
34  void initializeViewDependentSettings();
35 
37  bool orthoCulling() const;
38 
41  bool coordinateSystemChanged() const;
42 
45  virtual float getDistanceToScreenEdge(const osg::Vec3& vec) const;
46 
48  virtual float altitude2D() const;
49 
51  const DtOsgCullVisitorParameters* visitorParameters() const;
52 
54  void setInReflectionPass(bool bReflecting) {myIsInReflectionPass=bReflecting;}
56  bool inReflectionPass(void) const {return myIsInReflectionPass;}
57 
58  protected:
59 
61  virtual void apply(osg::Transform& node);
62 
64  virtual void apply(osg::Node& node);
65 
67  virtual void apply(osg::Group& group);
68 
70  virtual void apply(osg::LightSource& lightSource);
71 
73  virtual void apply(osg::Geode& geode);
74 
75  virtual void apply(osg::Camera& node);
76 
77  virtual void apply(osg::Billboard& node);
78 
79  virtual void apply(osg::PagedLOD& node);
80 
83  virtual float getDistanceToViewPoint(const osg::Vec3& vec, bool useLOD) const;
84 
87  virtual bool isCulled( osg::Node& node, double scaleFactor ) ;
88 
90  DtOsgCullVisitorParameters* getVisitorParameters() const;
91 
93  virtual osgUtil::CullVisitor* clone() const;
94 
95  virtual void reset();
96 
97  virtual ~DtOsgCullVisitor();
98 
99  void slot_StateSetChanged(const osg::StateSet* pStateSet);
100 
101  protected:
103  double myAltitude2D;
104  double myAltitude3D;
108 
109  boost::BOOST_SIGNALS_NAMESPACE::connection m_signalConnection;
110 
113  };
114 }
115 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)