VR-Forces Developer's Guide
 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) 2022 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 
17 
18 #include <matrix/vlVector.h>
19 
20 #include <vector>
21 
22 namespace makVrv
23 {
24 
25  class DtDe;
26  class DtSceneObject;
27  class DtModel;
28  class DtSceneObjectUpdater;
29  class DtPolygonModel;
30  class DtLineModel;
31  class DtExtrudedLineModel;
32  class DtCoordinateSystem;
33 
40  {
41  public:
42 
45 
48 
50  virtual bool needsUpdate( DtTime tNow );
51 
53  virtual void update( DtTime tNow );
54 
57  virtual void setSceneObject( DtSceneObject* sceneObject );
58 
61  virtual void setEnvironmentalSceneObject( DtSceneObject* sceneObject );
62 
64  virtual void setOrderGroup(int);
65 
66  protected:
69  virtual void centerIcon();
70 
72  virtual DtVector calculateGeometricCenter() const;
73 
75  virtual DtVector calculateLineCenter() const;
76 
77  protected:
78 
82  virtual void slot_sceneObjectToBeDeleted( const DtUniqueID& id );
83 
85  virtual void slot_modelAdded(DtModel*);
86 
88  virtual void slot_modelRemoved(DtModel*);
89 
91  virtual void slot_coordinateSystemChanged();
93 
94  protected:
97 
100 
103 
109 
112 
114  std::vector<DtVector> myPoints;
115 
118 
120  bool myUpdate;
121 
122  // When the class is destructed, the scene object may or may not
123  // exist. Using a separate connection variable makes it possible to
124  // 'disconnect' even if the scene object has been deleted.
125  boost::signalslib::connection mySceneObjectConnection;
126  boost::signalslib::connection myEnvironmentalSceneObjectConnection;
127 
128  boost::signalslib::connection myModelAddedConnection;
129  boost::signalslib::connection myModelRemovedConnection;
130 
131  // local clone of the system wide coordinate system.
132  // for thread safety.
133  DtCoordinateSystem* myCoordinateSystem = nullptr;
134  };
135 }
Distributed model for drawing polygons with attached vertices.
Definition: DtPolygonModel.h:20
An abstract base class for objects that require updates. This object automatically adds itself to a D...
Definition: DtTickable.h:26
DtUniqueID myUniqueId
This distributed object&#39;s unique identifier.
Definition: DtEnvironmentalIconCenteringUpdater.h:99
boost::signalslib::connection myModelRemovedConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:129
DtDe & myDe
The display engine.
Definition: DtEnvironmentalIconCenteringUpdater.h:96
DtLineModel * myEnvironmentalLineModel
Definition: DtEnvironmentalIconCenteringUpdater.h:107
A DtEnvironmentalIconCenteringUpdater updates the attached scene object to be centered in the center ...
Definition: DtEnvironmentalIconCenteringUpdater.h:39
DtSceneObject * myEnvironmentalSceneObject
A pointer tothe current environmental scene object agent.
Definition: DtEnvironmentalIconCenteringUpdater.h:111
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
boost::signalslib::connection myModelAddedConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:128
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtVector myOrigin
The origin which points are offset from - used only when updating based on a DtExtrudedLineModel.
Definition: DtEnvironmentalIconCenteringUpdater.h:117
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
DtLineModel is the model interface for remote graphic lines.
Definition: DtLineModel.h:18
Base class to provide boost signal/slot management.
Contains the declaration for makVrv::DtTickable.
DtSceneObject * mySceneObject
A pointer to the current scene object being updated.
Definition: DtEnvironmentalIconCenteringUpdater.h:102
DT_DLL_vrfutil bool calculateGeometricCenter(const DtVertexList &vertices, DtVector &geometricCenter)
Calculates the geometric center of the given vertex list. Returns true. Will use strictly geocentric ...
bool myUpdate
Definition: DtEnvironmentalIconCenteringUpdater.h:120
DtExtrudedLineModel * myEnvironmentalExtrudedLineModel
Definition: DtEnvironmentalIconCenteringUpdater.h:108
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:44
boost::signalslib::connection myEnvironmentalSceneObjectConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:126
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
DtPolygonModel * myEnvironmentalPolygonModel
A pointer to the current environmental model object. Only one may be valid, however, both pointers are around for convenience.
Definition: DtEnvironmentalIconCenteringUpdater.h:106
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
This class is a virtual class that all Extruded line models must implement.
Definition: DtExtrudedLineModel.h:19
std::vector< DtVector > myPoints
Points that were last used for calculation.
Definition: DtEnvironmentalIconCenteringUpdater.h:114
int myOrderGroup
Definition: DtEnvironmentalIconCenteringUpdater.h:119
boost::signalslib::connection mySceneObjectConnection
Definition: DtEnvironmentalIconCenteringUpdater.h:125
Contains DLL export macros.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)