15 #include "matrix/vlVector.h"
37 NavigationMethodShortcut = 0,
38 NavigationMethodSpline = 1
44 : myNavigationMethod(NavigationMethodShortcut)
45 , myUseAbstractGraph(true)
46 , myMinAbstractGraphReplanDistance(100.)
47 , myPropagationBoxExtent(200.)
49 , myEnablePathPlanTiming(false)
74 : myEnableAvoidance(true)
76 , myEnableSlowDown(true)
77 , myEnablePushThrough(false)
78 , myEnableNavigation(true)
79 , myCollisionLookaheadTime(15.)
80 , myCollisionDetectionRadius(15.)
81 , myAngleEvalSpan(120)
82 , myNumAngleSamples(30)
83 , mySafetyDistance((float)0.1)
84 , myCollisionAvoidanceInfluence((float)0.8)
103 static void setNavBotCreatorFcn(DtNavBotCreatorFcn fcn);
108 NavigationConfiguration navConfig = NavigationConfiguration(),
109 CollisionAvoidanceConfiguration collAvoidConfig = CollisionAvoidanceConfiguration()) = 0;
111 virtual void setPosition(
const DtVector& localPos) = 0;
112 virtual void setPositionInvalid() = 0;
114 virtual void botUpdate(
const DtVector& localPos,
double dT) = 0;
116 virtual void setDestination(
const DtVector& localPos,
bool forceOutsideArea =
false) = 0;
117 virtual void setDesiredSpeed(
double speed) = 0;
118 virtual void clearFollowedPath() = 0;
119 virtual void clearDestination() = 0;
120 virtual DtVector currentDestination()
const = 0;
122 virtual void resetDestination() = 0;
124 virtual int getTriangleIndex()
const = 0;
125 virtual void getTriangleVertices(DtVector& corner1, DtVector& corner2, DtVector& corner3)
const = 0;
126 virtual DtVector getPointOnTriangle(
const DtVector& localLocation)
const = 0;
128 virtual DtVector getOutputVelocity() = 0;
130 typedef bool (*NavBotPathLocationEvalFcn)(
const DtNavTag& navTag,
float slope,
float elevationChange,
float* costMultiplier,
void* userData);
132 virtual void setPathEvalFcn(NavBotPathLocationEvalFcn fcn,
void* user) = 0;
147 virtual PathStatus pathStatus(
double atDistance) = 0;
149 virtual DtString pathStatusString() = 0;
151 virtual bool hasArrived(
double arrivalDistance) = 0;
153 virtual bool currentPath(std::vector<DtVector>& path) = 0;
154 virtual bool abstractPath(std::vector<DtVector>& path) = 0;
156 virtual bool currentPathEdge(DtVector& edgeStart, DtVector& edgeEnd) = 0;
163 virtual unsigned currentAbstractPathIndex() = 0;
167 virtual void setUseAbstractGraph(
bool yesNo) = 0;
170 virtual void resetUseAbstractGraph() = 0;
173 virtual bool usingAbstractGraph()
const = 0;
176 virtual DtNavTag navTagAtPosition(
const DtVector& localPos)
const = 0;
179 virtual DtNavTag upcomingNavTagOnPath()
const = 0;
186 virtual void setCollisionAvoidanceEnabled(
bool enable) = 0;
188 virtual void setNavigationMethod(NavigationMethod navMethod) = 0;
189 virtual NavigationMethod navigationMethod()
const = 0;
193 virtual DtVector performMovement(
double dt) = 0;
197 virtual DtVector groundClamp(
const DtVector& localPos, DtVector& normal) = 0;
float myCollisionAvoidanceInfluence
Definition: navBot.h:97
Has a valid path to move along.
Definition: navBot.h:139
bool myEnablePushThrough
Definition: navBot.h:90
static DtNavBotCreatorFcn theNavBotCreatorFcn
Definition: navBot.h:200
float mySafetyDistance
Definition: navBot.h:96
bool myEnableAvoidance
Definition: navBot.h:87
Has arrived at destination.
Definition: navBot.h:140
Not actively trying to move.
Definition: navBot.h:137
double myMinAbstractGraphReplanDistance
Only relevant if using abstract graphs. Entity will replan when the distance to the current abstract ...
Definition: navBot.h:58
VR-Forces wrapper for Gameware NavTag. Note: This class keeps only a pointer to the data...
Definition: navDataTag.h:87
bool myEnableSlowDown
Definition: navBot.h:89
bool myEnablePathPlanTiming
For debugging and performance testing. Prints the time it takes to perform path planning.
Definition: navBot.h:67
This is a rw class to save out a block of generic binary data.
Definition: rwBinaryData.h:18
NavigationConfiguration()
Definition: navBot.h:43
std::vector< DtNavTagAndLocation > DtNavTagAndLocationList
Definition: navBot.h:29
float myCollisionLookaheadTime
Definition: navBot.h:92
bool myEnableNavigation
Definition: navBot.h:91
double myRadiusFactor
Factor multiplied by the bounding volume radius to generate the nav bot's radius. Increasing this wil...
Definition: navBot.h:65
Failed to calculate a path.
Definition: navBot.h:141
float myAngleEvalSpan
Definition: navBot.h:94
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
int myNumAngleSamples
Definition: navBot.h:95
This class contains all the data and logic for navigation within a specific area. Nav Data may be loa...
Definition: navArea.h:205
DtVector location
Definition: navBot.h:24
Currently computing a path.
Definition: navBot.h:138
Failed to calculate a path, destination is outside nav.
Definition: navBot.h:144
float myCollisionDetectionRadius
Definition: navBot.h:93
DtNavTag navTag
Definition: navBot.h:23
unsigned int DtNavigationPriorityType
Definition: navBot.h:30
CollisionAvoidanceConfiguration()
Sets defaults.
Definition: navBot.h:73
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
double myPropagationBoxExtent
Determines the size of the box used for path planning. Path planning is limited to the 2d box created...
Definition: navBot.h:62
#define DT_DLL_vrfNavigation
This file is used to determine how to build.
Definition: vrfNavigationDefines.h:26
virtual ~DtNavBot()
Definition: navBot.h:105
PathStatus
Definition: navBot.h:134
bool myEnableStop
Definition: navBot.h:88
Calculating a transition point.
Definition: navBot.h:143
DtNavTagAndLocation()
Definition: navBot.h:27
DtNavTagAndLocation(const DtNavTag &t, const DtVector &l)
Definition: navBot.h:26
NavigationMethod myNavigationMethod
Definition: navBot.h:52
bool myUseAbstractGraph
Indicates whether the abstract graph should be used for planning. Abstract graph allows for longer pa...
Definition: navBot.h:55
NavigationMethod
Definition: navBot.h:35
Arrived at edge of area.
Definition: navBot.h:142