VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtSwitchTerrainFeature.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
12 
15 
16 #include <tbb/spin_mutex.h>
17 
18 namespace makVrv
19 {
20  class DtDynamicTerrainGeometry;
21  class DtDynamicTerrainChange;
22  class DtDynamicTerrainSwitch;
23 
25  {
26  public:
27  explicit DtSwitchTerrainFeature(
28  DtDynamicTerrainSwitch* switcher,
29  const DtString& stateName,
30  const DtDynamicTerrainSwitchNode::ValueChildMap& valueChildMap,
31  const osg::BoundingSphere& sphere,
32  const boost::shared_ptr<DtDynamicTerrainFeature>& parent);
33 
34  virtual DtString description() const;
35 
36  virtual const DtDynamicTerrainFeature* parentFeature() const;
37 
38  virtual void iterateCommands( const boost::function<void (const DtDynamicTerrainChange&)>& callback) const;
39 
40  virtual const DtDynamicTerrainGeometry* geometry() const;
41  virtual const DtDynamicTerrainGeometry* originalGeometry() const;
42 
43  virtual bool matches(const DtDynamicTerrainChange& command) const;
44  virtual bool matches(const DtDynamicTerrainGeometry&) const;
45 
46  virtual void changeState(const DtDynamicTerrainChanges& changes);
47 
50  virtual bool stringValueToState( const DtString& valueName, int &state ) const;
51 
52  virtual void setState(const DtDynamicTerrainChange* command);
53 
54  protected:
55  const boost::scoped_ptr<DtDynamicTerrainGeometry> myGeometry;
56  const boost::scoped_ptr<DtDynamicTerrainGeometry> myOriginalGeometry;
57  const boost::shared_ptr<DtDynamicTerrainFeature> myParentFeature;
60 
62  typedef tbb::spin_mutex Mutex;
63  mutable Mutex myMutex;
64 
65  boost::scoped_ptr<DtDynamicTerrainSwitch> mySwitcher;
66  };
67 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)