VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
luaPathJob.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include "vrfLua/vrfLuaDefines.h"
9 #include "vrfLua/luaAsyncJob.h"
10 #include "vrfutil/scriptGeometry.h"
13 
14 #include "vlutil/vlMutex.h"
15 
17 #include "features/pathPlanner.h"
18 
19 #include <luabind/luabind.hpp>
20 
21 #include <boost/scoped_ptr.hpp>
22 
23 class DtSimManager;
24 class DtAsyncJobMapEntry;
25 
26 namespace MAKVRinTerra
27 {
28  class DtSharedMemoryFeaturesDebugDrawer;
29 }
30 
33 {
34 public:
35  typedef std::vector<DtLocation3D> Points;
36 
37  static boost::shared_ptr<DtLuaPathJob> Make(
38  DtSimManager* mgr,
39  DtString obstacleType,
40  DtString pathType,
41  const DtLocation3D& start,
42  const DtLocation3D& dest,
43  double buffer);
44 
46  DtLuaPathJob();
47 
49  ~DtLuaPathJob();
50 
52  luabind::object getObject(lua_State* L, int& index, std::string& message);
53 
55  void addMessage(DtAlgorithmManager::Severity, std::string);
56 
57  //
59  //
60 
61  static DtAsciiSerializable* creator();
62 
64  bool deserialize(const DtString&);
65  DtString objectType() const;
66 
67  boost::shared_ptr<DtLuaPathJob> shared_from_this();
68  boost::shared_ptr<const DtLuaPathJob> shared_from_this() const;
69 
70 protected:
71  class PathTask;
72  friend class PathTask;
73 
76  DtSimManager* mgr,
77  DtString obstacles,
78  DtString paths,
79  const DtLocation3D& start,
80  const DtLocation3D& dest,
81  double buffer);
82 
83  void start();
84  void run(const DtAlgorithmManager& mgr = DtAlgorithmManager());
85 
87  void taskComplete();
88 
89  typedef DtMutex Mutex;
90 
91  mutable Mutex myMutex;
92  std::string myObstaclesType;
93  std::string myPathType;
96  double myBuffer;
97  boost::scoped_ptr<Points> myPoints;
98  boost::shared_ptr<DtAsyncJobMapEntry> myJobEntry;
99  std::string myMessage;
100 };

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)