VR-Forces 4.8 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 }
Distributed model for drawing polygons with attached vertices.
Definition: DtPolygonModel.h:20
An abstract base class for objects that require updates.
Definition: DtTickable.h:26
DtUniqueID myUniqueId
This distributed object&#39;s unique identifier.
Definition: DtEnvironmentalIconCenteringUpdater.h:95
boost::signalslib::connection myModelRemovedConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:121
DtDe & myDe
The display engine.
Definition: DtEnvironmentalIconCenteringUpdater.h:92
DtLineModel * myEnvironmentalLineModel
Definition: DtEnvironmentalIconCenteringUpdater.h:103
A DtEnvironmentalIconCenteringUpdater updates the attached scene object to be centered in the center ...
Definition: DtEnvironmentalIconCenteringUpdater.h:35
DtSceneObject * myEnvironmentalSceneObject
A pointer tothe current environmental scene object agent.
Definition: DtEnvironmentalIconCenteringUpdater.h:106
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
boost::signalslib::connection myModelAddedConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:120
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
DtLineModel is the model interface for remote graphic lines.
Definition: DtLineModel.h:18
Contains the declaration for makVrv::DtTickable.
DtSceneObject * mySceneObject
A pointer to the current scene object being updated.
Definition: DtEnvironmentalIconCenteringUpdater.h:98
bool myUpdate
Definition: DtEnvironmentalIconCenteringUpdater.h:112
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:41
boost::signalslib::connection myEnvironmentalSceneObjectConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:118
A model which owns a single model instance.
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
DtPolygonModel * myEnvironmentalPolygonModel
A pointer to the current environmental model object.
Definition: DtEnvironmentalIconCenteringUpdater.h:102
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::vector< DtVector > myPoints
Points that were last used for calculation.
Definition: DtEnvironmentalIconCenteringUpdater.h:109
int myOrderGroup
Definition: DtEnvironmentalIconCenteringUpdater.h:111
boost::signalslib::connection mySceneObjectConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:117
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)