VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEnvironmentalIconCenteringUpdater.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2017 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtTickable.h>
14 #include <vrvCore/DtUniqueID.h>
15 
16 #include <matrix/vlVector.h>
17 
18 #include <vector>
19 
20 namespace makVrv
21 {
22 
23  class DtDe;
24  class DtSceneObject;
25  class DtModel;
26  class DtSceneObjectUpdater;
27  class DtPolygonModel;
28  class DtLineModel;
29 
36  {
37  public:
38 
41 
44 
46  virtual bool needsUpdate( DtTime tNow );
47 
49  virtual void update( DtTime tNow );
50 
53  virtual void setSceneObject( DtSceneObject* sceneObject );
54 
57  virtual void setEnvironmentalSceneObject( DtSceneObject* sceneObject );
58 
60  virtual void setOrderGroup(int);
61 
62  protected:
65  virtual void centerIcon();
66 
68  virtual DtVector calculateGeometricCenter() const;
69 
71  virtual DtVector calculateLineCenter() const;
72 
74  virtual DtVector centerOnLine(int startIndex, int endIndex, double lengthOnLine) const;
75 
76  protected:
77 
81  virtual void slot_sceneObjectToBeDeleted( const DtUniqueID& id );
82 
84  virtual void slot_modelAdded(DtModel*);
85 
87  virtual void slot_modelRemoved(DtModel*);
89 
90  protected:
93 
96 
99 
104 
107 
109  std::vector<DtVector> myPoints;
110 
112  bool myUpdate;
113 
114  // When the class is destructed, the scene object may or may not
115  // exist. Using a separate connection variable makes it possible to
116  // 'disconnect' even if the scene object has been deleted.
117  boost::signalslib::connection mySceneObjectConnection;
118  boost::signalslib::connection myEnvironmentalSceneObjectConnection;
119 
120  boost::signalslib::connection myModelAddedConnection;
121  boost::signalslib::connection myModelRemovedConnection;
122 
123  };
124 }

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)