VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
luaPlaceFormationJob.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #if 1
6 #pragma once
7 
8 #include "vrfLua/vrfLuaDefines.h"
9 #include "vrfLua/luaAsyncJob.h"
10 #include "vrfobjcore/simObject.h"
11 #include "vrfutil/scriptGeometry.h"
14 #include <features/featureSet.h>
15 #include <features/areaFeature.h>
16 
17 #include <luabind/luabind.hpp>
18 
19 
20 class DtSimMessage;
21 
25 {
26 public:
27  typedef std::vector<DtLocation3D> Points;
28 
29  static std::shared_ptr<DtLuaPlaceFormationJob> Make(
31  std::vector<DtLocation3D> formationPoints,
32  double width);
33 
36 
38  virtual ~DtLuaPlaceFormationJob() override;
39 
40  //Initialize the job. This version must be called by derived start functions.
41  virtual void start();
42 
44  virtual luabind::object getObject(lua_State* L, int& index, std::string& message) override;
45 
47  virtual luabind::object getDebugObject(lua_State* L) override { return luabind::newtable(L);}
48 
50  virtual void cancel(lua_State* L) override {};
51 
52  static void tickCb(void* usr);
53  virtual void tick();
54 
55  //
57  //
58 
59  static DtAsciiSerializable* creator();
60 
61  virtual DtString serialize() override;
62  virtual bool deserialize(const DtString&) override;
63 
64  virtual DtString objectType() const override;
65 
66  std::shared_ptr<DtLuaPlaceFormationJob> shared_from_this();
67  std::shared_ptr<const DtLuaPlaceFormationJob> shared_from_this() const;
68 
69 protected:
70 
71  std::vector<DtLocation3D> myFormationPoints;
72  double myWidth;
74  std::unique_ptr<MAKVRinTerra::DtAreaFeatureSet> myFeatureSet;
77 
78  std::list<DtVector> myPointsToClamp;
79  std::list<DtLocation3D> myResultPoints;
80 
84  std::vector<DtLocation3D> formationPoints,
85  double width);
86 };
87 
88 #endif
double myTestAngleInterval
Definition: luaPlaceFormationJob.h:73
bool myIsComplete
Definition: luaPlaceFormationJob.h:75
std::list< DtVector > myPointsToClamp
Definition: luaPlaceFormationJob.h:78
Definition: asciiSerializable.h:40
Interface for getting asynchronously computed data into Lua.
Definition: luaAsyncJob.h:27
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
bool myReadyToClamp
Definition: luaPlaceFormationJob.h:76
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
File: simMsg.h.
Definition: simMessage.h:35
std::vector< DtLocation3D > Points
Definition: luaPlaceFormationJob.h:27
#define DT_DLL_vrfLua
This file is used to determine how to build.
Definition: vrfLuaDefines.h:25
virtual luabind::object getObject(lua_State *L, int &index, std::string &message)=0
Retrieve current value.
virtual DtString objectType() const =0
Should return the string name of this object. The object name should not be part of the serialization...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
virtual luabind::object getDebugObject(lua_State *L) override
Retrieve debug data, if available. Default return value is an empty table.
Definition: luaPlaceFormationJob.h:47
std::list< DtLocation3D > myResultPoints
Definition: luaPlaceFormationJob.h:79
std::unique_ptr< MAKVRinTerra::DtAreaFeatureSet > myFeatureSet
Definition: luaPlaceFormationJob.h:74
virtual void cancel(lua_State *L) override
Currently a no-op.
Definition: luaPlaceFormationJob.h:50
Lua object class which represents a request to find valid points for a unit formation near the given ...
Definition: luaPlaceFormationJob.h:24
std::vector< DtLocation3D > myFormationPoints
Definition: luaPlaceFormationJob.h:71
double myWidth
Definition: luaPlaceFormationJob.h:72

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)