16 #include <matrix/vlVector.h>
18 #include "boost/shared_ptr.hpp"
19 #include "boost/weak_ptr.hpp"
58 typedef boost::shared_ptr<DtNavAreaQuery>
Ptr;
64 virtual bool tick() = 0;
65 virtual bool success() = 0;
68 virtual bool navDataChanged() = 0;
69 virtual bool outOfWorkingMemory() = 0;
70 virtual bool hadComputationError() = 0;
72 virtual std::vector<DtVector> results() = 0;
73 virtual std::vector<DtVector>
debugPoints() {
return std::vector<DtVector>(); };
74 virtual void* internalQuery() = 0;
85 virtual bool tick() {
return true; };
91 virtual std::vector<DtVector>
results() {
return std::vector<DtVector>(); };
99 maxRegenerationThreads(2), regenerationDelay(2.5), queryTimeBudget(1) {};
103 int workingMemorySize;
154 typedef void (*DtSearchAreaPointCostModifierEvaluatorFcn)(
const DtVector& localPoint,
float* currentCost,
void* userData);
156 typedef void(*DtSectorRegenerationCb)(
void* userData);
159 static void setNavAreaCreatorFcn(DtNavAreaCreatorFcn fcn);
161 static bool navAreaDebuggingEnabled();
162 static void setNavAreaDebuggingEnabled(
bool enable);
166 std::vector<DtString> profiles = std::vector<DtString>()) = 0;
167 virtual void update(
float deltaTimeInSeconds) = 0;
171 virtual bool inNavArea(
const DtVector& localPos) = 0;
175 virtual bool validForProfile(
const DtString& profile)
const = 0;
177 virtual DtNavDataDebugInfo* debugInfo() = 0;
179 virtual void setExtent(
DtExtent* e) = 0;
189 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
196 DtPointOfInterestNavTagEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
203 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
206 virtual bool findInsidePositionFromOutsidePosition(
const DtString& profile,
207 double searchRadius,
double searchHeight,
const DtVector& fromFromHere,
208 DtVector& result,
int& halfEdgeType) = 0;
212 const std::vector<DtVector>& localDestinationPositions,
DtNavBot* searcher,
int tag = -1,
213 DtSearchAreaPointCostModifierEvaluatorFcn = 0, DtPointOfInterestEvaluatorFcn = 0, DtPathCalculatedEvaluatorFcn = 0,
214 void* usrData = 0,
bool startMovingWhenFound =
false) = 0;
218 const DtVector& destination,
bool useAbstractGraphs =
true,
219 const DtVector& locationToAvoid =
DtVector(),
double avoidanceRadius = 0) = 0;
223 virtual bool findFarthestPositionAlongHeading(
const DtString& profile,
const DtVector& start,
224 double heading,
double maxDistance,
DtVector& result,
bool& reachedMaxDist) = 0;
257 const DtVector& localAccessibilityPoint = DtVector::zero(),
258 double minRadius = -1,
259 double maxRadius = -1,
261 unsigned numberOfPoints = 1,
262 double minDistanceBetweenPoints = 0.0,
263 const DtString& placementRestriction = DtString::nullString(),
264 bool isStrict =
true,
265 bool tightlyPack =
false,
266 bool needLos =
false,
267 bool groundClamp =
false,
269 DtLocalPointUserEvalCallback callbackFcn = emptyCallback,
270 void* userData = 0) = 0;
273 virtual bool tagVolumesToBeIntegrated()
const = 0;
282 virtual std::vector<DtVector> searchInArea(
const DtString& profile,
283 const DtVector& startLocalPos,
double radius,
double postSpacing,
DtNavBot* searcher,
284 DtPointOfInterestEvaluatorFcn evalFcn = 0,
void* evalFcnUserData = 0,
int tag = -1) = 0;
287 virtual unsigned newNavTagId() = 0;
290 virtual void associateNavTagIdWithObject(
unsigned tagVolumeId,
const DtUUID& objectUUID) = 0;
293 virtual void disassociateNavTagId(
unsigned navTagId) = 0;
297 virtual DtUUID uuidFromNavTagId(
unsigned navTagId) = 0;
301 virtual unsigned navTagVolumeIdFromUuid(
const DtUUID& objectUUID) = 0;
311 virtual void addSectorRegenerationCallback(DtSectorRegenerationCb cb,
void* usr) = 0;
312 virtual void removeSectorRegenerationCallback(DtSectorRegenerationCb cb,
void* usr) = 0;
318 const std::set<DtString>& profiles = std::set<DtString>()) = 0;
326 virtual unsigned addNavEdge(
const DtString& profile, std::vector<DtVector>& LocalPoints,
330 virtual void removeNavEdge(
unsigned edgeId) = 0;