VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeoComputeBoundCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Drawable>
13 #include <osg/ComputeBoundsVisitor>
14 
16 
17 #include <vrvCore/DtDe.h>
18 
19 namespace makVrv
20 {
26  template<class BoundingBoxProvider>
27  class DtIndirectGeoComputeBoundCallback : public osg::Drawable::ComputeBoundingBoxCallback
28  {
29  public:
31  DtIndirectGeoComputeBoundCallback(BoundingBoxProvider* provider) : myProvider(provider) {}
32 
35  osg::Drawable::ComputeBoundingBoxCallback(rhs, copyop),
36  myProvider(rhs.myProvider) {}
37 
39  virtual void reset() { }
41  virtual osg::BoundingBox computeBound(const osg::Drawable& drawable) const
42  {
43  return myProvider->boundingBox();
44  }
45  protected:
46  const BoundingBoxProvider* myProvider;
47  private:
49  };
50 
52  template<class BoundingBoxProvider>
54  {
55  public:
58 
61 
63  virtual osg::Drawable::ComputeBoundingBoxCallback* create(BoundingBoxProvider* provider) const;
64 
68 
70  static const std::string& theClassName();
71  protected:
73  };
74 }
75 
76 #include "DtIndirectGeoComputeBoundCallback.inl"

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)