VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scriptLocationReference.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*******************************************************************************
4 ** Copyright (c) 2023 MAK Technologies, Inc.
5 ** All rights reserved.
6 *******************************************************************************/
7 #pragma once
8 
9 #include <vrfLua/vrfLuaDefines.h>
10 
12 #include <vlutil/vlString.h>
13 #include <list>
14 #include <luabind/object.hpp>
17 #include <luabind/object.hpp>
18 
20 class DtLocalObject;
22 class DtLocation3D;
24 
25 DT_DLL_vrfLua std::ostream& operator<<(std::ostream&, const DtScriptLocationReference&);
26 
28  : public DtAsciiSerializable
29 {
30 private:
33 public:
35  DtScriptLocationReference(const DtSimulationServices* simServices, const DtRwLocationReference& locRef);
36 
40 
42 
44 
45  bool operator==(const DtScriptLocationReference& orig);
46 
49 
51  bool isValid() const;
52 
53  virtual int locationType() const;
54  virtual void setLocationType(int locType);
55 
58  virtual luabind::object object(lua_State* L) const;
60  virtual void setObject(const DtScriptVrfObject& object);
61 
63  virtual DtLocation3D internalLocation() const;
65  virtual DtUUID internalObject() const;
66 
68  virtual void setLocation(const DtLocation3D& loc);
69 
73  virtual DtLocation3D location() const;
74 
77  virtual bool isDynamic() const;
78 
80  virtual DtString serialize() override;
81 
86  virtual void init(const DtSimulationServices*, DtLocalObject* owner);
87 
90  virtual bool deserialize(const DtString& data) override;
91 
92  virtual DtString objectType() const override;
93 
95  //default values
96  static DtAsciiSerializable* creator();
97 
98  friend DT_DLL_vrfLua std::ostream& operator<<(std::ostream&, const DtScriptLocationReference&);
99 
100 protected:
102  void throwIfNotValid() const;
103 
104 protected:
109 };
110 
112 
113 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwLocationReference::LocationType myLocationType
Script API functions. ////////////////////////////////////.
Definition: scriptLocationReference.h:108
const DtSimulationServices * mySimServices
Script API functions. ////////////////////////////////////.
Definition: scriptLocationReference.h:105
Definition: asciiSerializable.h:38
virtual bool deserialize(const DtString &)=0
This function should take the string that was serialized via serialize() and fill this object with th...
Holds a position of some form. May be an absolute position, or a reference to another object...
Definition: rwLocationReference.h:25
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
virtual void init(void *userData)
This function is called right after the object is constructed during the deserialization process...
Definition: asciiSerializable.h:76
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
DT_DLL_features std::ostream & operator<<(std::ostream &, const DtFeatureTransform &)
std::ostream output.
virtual DtString serialize()=0
The following characters are reserved and cannot be used in serialization: &#39;|&#39;, &#39;:&#39;.
LocationType
Definition: rwLocationReference.h:28
Definition: scriptLocationReference.h:27
DtScriptVrfObject myObject
Script API functions. ////////////////////////////////////.
Definition: scriptLocationReference.h:106
#define DT_DLL_vrfLua
This file is used to determine how to build.
Definition: vrfLuaDefines.h:25
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:94
DtLocation3D myLocation
Script API functions. ////////////////////////////////////.
Definition: scriptLocationReference.h:107
Abstract interface class for Weapon Information. This is used by DtWeaponInterfaceList. All code that is accessing information about weapons will have access to this base class only, and only be able to read the data. Weapon controllers will have derived versions that implement key functions for their specific weapon.
Definition: weaponInfoInterface.h:18
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
Definition: scriptVrfObject.h:30
A location3D is a point in space, i.e. a geocentric coordinate.
Definition: scriptGeometry.h:22

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)