VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
DtLuaPathJob Class Reference

Lua object class which represents a feature navigation task.

Inheritance diagram for DtLuaPathJob:
Inheritance graph
[legend]

Classes

class  DtOffFeaturePart
 
class  DtOnFeaturePart
 
class  DtPartList
 
class  DtPathPart
 

Public Types

enum  PathPartType { ON_FEATURE_PART, OFF_FEATURE_PART, UNKNOWN_PART }
 
typedef std::vector< DtLocation3DPoints
 

Public Member Functions

 DtLuaPathJob ()
 
virtual ~DtLuaPathJob () override
 
virtual luabind::object getObject (lua_State *L, int &index, std::string &message) override
 
virtual luabind::object getDebugObject (lua_State *L) override
 
virtual void cancel (lua_State *L) override
 
void addMessage (DtAlgorithmManager::Severity, std::string)
 
std::shared_ptr< DtLuaPathJobshared_from_this ()
 
std::shared_ptr< const
DtLuaPathJob
shared_from_this () const
 
- Public Member Functions inherited from DtLuaAsyncJob
virtual void init (void *userData) override
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 

Static Public Member Functions

static std::shared_ptr
< DtLuaPathJob
Make (DtSimulationServices *mgr, DtString obstacleType, DtString pathType, const DtLocation3D &start, const DtLocation3D &dest, double buffer, bool returnMultiPartPath=false)
 
static std::shared_ptr
< DtLuaPathJob
Make (DtSimulationServices *mgr, DtString obstacleType, DtString pathType, const DtLocation3D &start, const DtLocation3D &dest, double buffer, MAKVRinTerra::DtAStarGraph::DtWeightFactorsList &factors, const double offRoadPathWeight, bool returnMultiPartPath=false)
 

Protected Types

typedef DtMutex Mutex
 

Protected Member Functions

 DtLuaPathJob (DtSimulationServices *mgr, DtString obstacles, DtString paths, const DtLocation3D &start, const DtLocation3D &dest, double buffer, bool returnMultiPartPath=false)
 
 DtLuaPathJob (DtSimulationServices *mgr, DtString obstacles, DtString paths, const DtLocation3D &start, const DtLocation3D &dest, double buffer, const MAKVRinTerra::DtAStarGraph::DtWeightFactorsList &weights, const double offRoadPathWeight, bool returnMultiPartPath=false)
 
void start ()
 
void run (const DtAlgorithmManager &mgr=DtAlgorithmManager())
 
void taskComplete ()
 
- Protected Member Functions inherited from DtLuaAsyncJob
 DtLuaAsyncJob ()
 
 DtLuaAsyncJob (DtSimulationServices *)
 

Protected Attributes

Mutex myMutex
 
std::string myObstaclesType
 
std::string myPathType
 
DtLocation3D myStart
 
DtLocation3D myDest
 
double myBuffer
 
MAKVRinTerra::DtAStarGraph::DtWeightFactorsList myWeights
 
double myOffRoadPathWeight
 
Points myPoints
 
DtPartList myPathParts
 
bool myTaskComplete
 
std::shared_ptr
< DtAsyncJobMapEntry
myJobEntry
 
std::string myMessage
 
bool myReturnMultiPartPath
 
- Protected Attributes inherited from DtLuaAsyncJob
DtSimulationServicesmySimulationServices
 

Friends

class PathTask
 

DtAsciiSerializable functions

static DtAsciiSerializablecreator ()
 
virtual DtString serialize () override
 
virtual bool deserialize (const DtString &) override
 
virtual DtString objectType () const override
 

Member Typedef Documentation

typedef std::vector<DtLocation3D> DtLuaPathJob::Points
typedef DtMutex DtLuaPathJob::Mutex
protected

Member Enumeration Documentation

---—— Structures for returning multiPart Paths ——

"On Feature" means a path on a graph of travel features such as roads. "Off Feature" means a path not on travel features, and between obstacle features.

Enumerator
ON_FEATURE_PART 
OFF_FEATURE_PART 
UNKNOWN_PART 

Constructor & Destructor Documentation

DtLuaPathJob::DtLuaPathJob ( )

For creating when deserializing.

virtual DtLuaPathJob::~DtLuaPathJob ( )
overridevirtual

DTOR.

DtLuaPathJob::DtLuaPathJob ( DtSimulationServices mgr,
DtString  obstacles,
DtString  paths,
const DtLocation3D start,
const DtLocation3D dest,
double  buffer,
bool  returnMultiPartPath = false 
)
protected

For creating from lua call. Deprecated (missing weights)

DtLuaPathJob::DtLuaPathJob ( DtSimulationServices mgr,
DtString  obstacles,
DtString  paths,
const DtLocation3D start,
const DtLocation3D dest,
double  buffer,
const MAKVRinTerra::DtAStarGraph::DtWeightFactorsList weights,
const double  offRoadPathWeight,
bool  returnMultiPartPath = false 
)
protected

For creating from lua call.

Member Function Documentation

static std::shared_ptr<DtLuaPathJob> DtLuaPathJob::Make ( DtSimulationServices mgr,
DtString  obstacleType,
DtString  pathType,
const DtLocation3D start,
const DtLocation3D dest,
double  buffer,
bool  returnMultiPartPath = false 
)
static


Create a pointer to a new path job and return it. This version does not include feature weights (ie for different types of roads). Deprecated.

static std::shared_ptr<DtLuaPathJob> DtLuaPathJob::Make ( DtSimulationServices mgr,
DtString  obstacleType,
DtString  pathType,
const DtLocation3D start,
const DtLocation3D dest,
double  buffer,
MAKVRinTerra::DtAStarGraph::DtWeightFactorsList factors,
const double  offRoadPathWeight,
bool  returnMultiPartPath = false 
)
static

Create a pointer to a path job and return it.

virtual luabind::object DtLuaPathJob::getObject ( lua_State *  L,
int index,
std::string &  message 
)
overridevirtual

Retrieve value after the job is complete.

Implements DtLuaAsyncJob.

virtual luabind::object DtLuaPathJob::getDebugObject ( lua_State *  L)
inlineoverridevirtual

Retrieve debug data, if available. Default return value is an empty table.

Implements DtLuaAsyncJob.

virtual void DtLuaPathJob::cancel ( lua_State *  L)
inlineoverridevirtual

Currently a no-op.

Implements DtLuaAsyncJob.

void DtLuaPathJob::addMessage ( DtAlgorithmManager::Severity  ,
std::string   
)

Sets the output message in a thread-safe manner.

static DtAsciiSerializable* DtLuaPathJob::creator ( )
static
virtual DtString DtLuaPathJob::serialize ( )
overridevirtual

The following characters are reserved and cannot be used in serialization: '|', ':'.

Implements DtAsciiSerializable.

virtual bool DtLuaPathJob::deserialize ( const DtString )
overridevirtual

This function should take the string that was serialized via serialize() and fill this object with the correct data.

Implements DtAsciiSerializable.

virtual DtString DtLuaPathJob::objectType ( ) const
overridevirtual

Should return the string name of this object. The object name should not be part of the serialization unless you want it to be, but you should take it into account when implementing both functions.

Implements DtAsciiSerializable.

std::shared_ptr<DtLuaPathJob> DtLuaPathJob::shared_from_this ( )
std::shared_ptr<const DtLuaPathJob> DtLuaPathJob::shared_from_this ( ) const
void DtLuaPathJob::start ( )
protected
void DtLuaPathJob::run ( const DtAlgorithmManager mgr = DtAlgorithmManager())
protected
void DtLuaPathJob::taskComplete ( )
protected

Called by task object whenever it is done.

Friends And Related Function Documentation

friend class PathTask
friend

Member Data Documentation

Mutex DtLuaPathJob::myMutex
mutableprotected
std::string DtLuaPathJob::myObstaclesType
protected
std::string DtLuaPathJob::myPathType
protected
DtLocation3D DtLuaPathJob::myStart
protected
DtLocation3D DtLuaPathJob::myDest
protected
double DtLuaPathJob::myBuffer
protected
MAKVRinTerra::DtAStarGraph::DtWeightFactorsList DtLuaPathJob::myWeights
protected
double DtLuaPathJob::myOffRoadPathWeight
protected
Points DtLuaPathJob::myPoints
protected
DtPartList DtLuaPathJob::myPathParts
protected

DtRailSegmentList mySegmentList;.

bool DtLuaPathJob::myTaskComplete
protected
std::shared_ptr<DtAsyncJobMapEntry> DtLuaPathJob::myJobEntry
protected
std::string DtLuaPathJob::myMessage
protected
bool DtLuaPathJob::myReturnMultiPartPath
protected

If true, getObject fills out a multi part path. Otherwise, getObject just fills out a location list.


The documentation for this class was generated from the following file:

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)