VR-Forces Development_Version 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 <boost/signal.hpp>
15 
16 namespace makVrv
17 {
23  class DT_DLL_VRVOSG DtOsgCullVisitor : public osgUtil::CullVisitor
24  {
25  public:
28 
31 
33  void initializeViewDependentSettings();
34 
36  bool orthoCulling() const;
37 
40  bool coordinateSystemChanged() const;
41 
44  virtual float getDistanceToScreenEdge(const osg::Vec3& vec) const;
45 
47  virtual float altitude2D() const;
48 
50  const DtOsgCullVisitorParameters* visitorParameters() const;
51 
53  void setInReflectionPass(bool bReflecting) {myIsInReflectionPass=bReflecting;}
55  bool inReflectionPass(void) const {return myIsInReflectionPass;}
56 
57  protected:
58 
60  virtual void apply(osg::Transform& node);
61 
63  virtual void apply(osg::Node& node);
64 
66  virtual void apply(osg::Group& group);
67 
69  virtual void apply(osg::LightSource& lightSource);
70 
72  virtual void apply(osg::Geode& geode);
73 
74  virtual void apply(osg::Camera& node);
75 
76  virtual void apply(osg::Billboard& node);
77 
78  virtual void apply(osg::PagedLOD& node);
79 
82  virtual float getDistanceToViewPoint(const osg::Vec3& vec, bool useLOD) const;
83 
86  virtual bool isCulled( osg::Node& node, double scaleFactor ) ;
87 
89  DtOsgCullVisitorParameters* getVisitorParameters() const;
90 
92  virtual osgUtil::CullVisitor* clone() const;
93 
94  virtual void reset();
95 
96  virtual ~DtOsgCullVisitor();
97 
98  void slot_StateSetChanged(const osg::StateSet* pStateSet);
99 
100  protected:
102  double myAltitude2D;
103  double myAltitude3D;
107 
108  boost::BOOST_SIGNALS_NAMESPACE::connection m_signalConnection;
109 
112  };
113 }
114 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)