VR-Forces 4.1.1 Class Documentation
kynapseManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 
10 #include <map>
11 #include <list>
12 #include <vector>
13 #include <string>
14 
16 #include <vrfcore/simMgr.h>
17 #include <vrfobjcore/vrfObjMgr.h>
18 #include <vrfobjcore/vrfObject.h>
19 #include <vrfobjcore/vrfObjSR.h>
20 #include <geometry/point.h>
21 
26 
27 #include <kyruntime.h>
28 
29 class DtCgf;
30 class DtVrfObject;
31 class DtObjectType;
32 class DtString;
33 class DtFilename;
34 class PathDataMgr;
36 
37 namespace BHAVE
38 {
39  class DtKynapseManager;
40  class DtVrlLogBridge;
41  class DtDrawingViewerBridge;
42  class DtVrfCollisionBridge;
43 
44 
45 #define BHAVE_PARAMS_DIR "../data/parameters/BHAVE"
46 #define BHAVE_RUNTIME_CONFIG "bhave_conf.xml"
47 
52 {
53 
54 public:
58  static DtKynapseManager* instance();
59 
61  virtual ~DtKynapseManager();
62 
64  virtual bool init(DtCgf* cgf);
65 
68  virtual void closeKynapseWorld();
69 
71  DtBhavePluginOptions* pluginOptions();
72 
73  //Accessors
74  virtual Kaim::World* getKynapseWorld() {return myWorld;}
75  virtual DtCgf* getCgf() {return myCgf;}
77 
79  virtual double getPathDataHeight(const DtString& pathDataName) const;
80 
81 protected:
83  virtual void registerKynapseActuators();
84 
86  virtual void registerKynapseControllers();
87 
89  static void preLoadTerrainCallback(const DtFilename& filename, void* usr);
91  virtual void processPreLoadTerrainCallback(const DtFilename& filename);
93  static void postLoadTerrainCallback(const DtFilename& filename, void* usr);
95  virtual void processPostLoadTerrainCallback(const DtFilename& filename);
96 
98  static void simTickCallback(void*);
99 
101  static void postTickCallback(void*);
102 
104  virtual void processSimTick(void*);
105 
107  virtual void processPostTick(void*);
108 
110  virtual void updateAllKynapsePositions();
111 
113  bool PrepareWorld();
114 
116  void disableBHAVETasks(DtVrfObject * vrfObject);
117 
119  Kaim::Bot* getKynBotByVrfObject(DtVrfObject * vrfObject);
120 
121 
122 private:
125 
128  bool BHAVELicenseCheck();
129 
130 protected:
131 
133  static Kaim::Engine* theKynapseEngine;
134 
137  Kaim::World * myWorld;
143 
144  std::list<Kaim::PathData*> myPathDataList;
145  std::list<Kaim::Database*> myPathDatabaseList;
146 
147  DtFilename myTerrainFilename;
148 
151  std::map<DtString, double> myPathDataHeights;
152 
153 
155 };
156 
157 
158 } //namespace BHAVE

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)