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< DtLocation3D > Points
 

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)
 
void setWeightsFromObject (DtLocalObject *owningObject)
 
std::shared_ptr< DtLuaPathJob > shared_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, DtLocalObject *owningObject, bool returnMultiPartPath=false, bool adjustStartIfInObstacle=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
 
bool myAdjustStartIfInObstacle
 
- Protected Attributes inherited from DtLuaAsyncJob
DtSimulationServices * mySimulationServices
 

Friends

class PathTask
 

DtAsciiSerializable functions

static DtAsciiSerializable * creator ()
 
virtual void setOwningObject (DtLocalObject *owningObject) override
 
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,
DtLocalObject *  owningObject,
bool  returnMultiPartPath = false,
bool  adjustStartIfInObstacle = 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

Overridden to get the path planning weights of the owning object during deserialization.

virtual void DtLuaPathJob::setOwningObject ( DtLocalObject *  owningObject)
overridevirtual

Overridden to get the path planning weights of the owning object during deserialization.

Reimplemented from DtLuaAsyncJob.

virtual DtString DtLuaPathJob::serialize ( )
overridevirtual

Overridden to get the path planning weights of the owning object during deserialization.

Implements DtAsciiSerializable.

virtual bool DtLuaPathJob::deserialize ( const DtString &  )
overridevirtual

Overridden to get the path planning weights of the owning object during deserialization.

Implements DtAsciiSerializable.

virtual DtString DtLuaPathJob::objectType ( ) const
overridevirtual

Overridden to get the path planning weights of the owning object during deserialization.

Implements DtAsciiSerializable.

void DtLuaPathJob::setWeightsFromObject ( DtLocalObject *  owningObject)

Sets the path plan weights from the owning object by looking up the road path controller.

Note
This function must only be called when it is safe to access the owning object.
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.

bool DtLuaPathJob::myAdjustStartIfInObstacle
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)