VR-Forces 4.1 Class Documentation
bhaveGuiManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "bhaveMsgs/ifSpawnList.h"
13 
17 #include <vrvCore/DtEntityState.h>
18 
19 #include <vector>
20 
21 //Vantage
23 #include <vrvCore/DtDe.h>
24 
25 //VRLink
26 #include <vlpi/entityType.h>
27 
28 
29 #include <boost/signal.hpp>
30 
31 
33 class DtSimMessage;
34 class QString;
35 class DtSimCommand;
36 class DtModelSetEntry;
37 
38 namespace makVrf
39 {
40  class DtEntityCreatePaletteInterface;
41  class DtEntityMapperKey;
42 }
43 
44 namespace makVrv
45 {
46  class DtSimObjectEntry;
47 }
48 
49 namespace BHAVE
50 {
51  namespace BHAVE3DGui
52  {
53 
58  {
59 
60  public:
61 
64 
66  virtual ~DtBhaveGuiManager();
67 
69  static DtBhaveGuiManager& instance(makVrv::DtDe& de);
70 
72  virtual bool init();
73 
75  virtual DtBhavePluginOptions* pluginOptions();
76  virtual void requestSpawnTemplateList();
77 
78  virtual const SpawnTemplateDescriptionList& spawnPatternList() const;
80  virtual bool setPatternList( const SpawnTemplateDescriptionList & list);
81 
82  virtual const SpawnTemplateDescriptionList & patternList() const;
83  virtual SpawnTemplateDescriptionList & patternList();
84 
86  virtual void slot_updateCreationPalette(makVrf::DtEntityCreatePaletteInterface* palette);
87 
89 
92  virtual void slot_spawnCreateObject(const DtEntityType&, std::string, int, const std::vector<DtVector>&, double, bool, bool, const QString&);
93 
96  virtual void slot_sinkCreateObject(const DtEntityType&, std::string, int, const std::vector<DtVector>&, double, bool, bool, const QString&);
97 
99  static int nextSpawnNumber();
101  static int nextSinkNumber();
102 
104  virtual void slot_commandRequestToBeAddedToPlan(DtSimCommand&, bool forEdit);
105  virtual DtString sinkPointName(const DtString& templateName) const;
106  virtual DtString spawnPointName(const DtString& templateName) const;
107 
108  public:
109  boost::signal<void (const SpawnTemplateDescriptionList &)> signal_patternListUpdated;
110  boost::signal<void (const SpawnTemplateDescriptionList &)> signal_spawnSinkPointCountUpdated;
111 
112  boost::signal<void (const DtString&)> signal_spawnPointAdded;
113  boost::signal<void (const DtString&)> signal_sinkPointAdded;
114 
115  boost::signal<void (const DtString&)> signal_spawnPointRemoved;
116  boost::signal<void (const DtString&)> signal_sinkPointRemoved;
117 
118  protected:
119 
122  virtual void updateCreateMenuWithSpawnAndSinkPoints(makVrf::DtEntityCreatePaletteInterface* palette);
123 
125  virtual void removePaletteItems(makVrf::DtEntityCreatePaletteInterface* iFace);
126 
128  virtual void removeCreateMenuItems(makVrf::DtEntityCreatePaletteInterface* palette);
129 
132  virtual void slot_simStateAdded(makVrv::DtSimObjectEntry& e);
133 
135  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& e);
136 
138  virtual void resetCounters();
139 
141  virtual DtModelSetEntry* addModelSetEntryIfMissing(const DtString& label, const makVrf::DtEntityMapperKey&,
142  const DtString& category);
143 
144  protected:
145 
146  virtual void processTemplateList(DtSimMessage* rsp);
147  virtual int indexOfTemplate(DtString& tempName);
148 
149  virtual void completeInitialization();
150 
151  virtual void addPotentialSpawnSinkPoint(const makVrv::DtVrlinkSimulatedBaseState&);
152  virtual void removePotentialSpawnSinkPoint(const std::string& templateName, const DtEntityType& t);
153 
154  virtual void slot_stateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
155 
156  protected:
157 
161 
163 
165  static int theNextSinkNumber;
166  static int theNextSpawnNumber;
167 
169  {
170  std::string templateName;
171  std::string templateType;
172  };
173 
174  typedef std::map<makVrv::DtUniqueID, TemplateInfo> UniqueIdToTemplateInfo;
176  };
177 
181  {
182  public:
183  virtual makVrf::DtCopyObject* create(makVrv::DtDe&);
184  };
185 
188  {
189  public:
192 
193  protected:
195  virtual void createObject(const DtVector& center);
196 
197  virtual void createSpawnObject(const DtVector&);
198  virtual void createSinkObject(const DtVector&);
199  };
200  }
201 }
202 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)