16 #include <matrix/vlVector.h>
18 #include "boost/shared_ptr.hpp"
56 typedef boost::shared_ptr<DtNavAreaQuery>
Ptr;
62 virtual bool tick() = 0;
63 virtual bool success() = 0;
66 virtual bool navDataChanged() = 0;
67 virtual bool outOfWorkingMemory() = 0;
68 virtual bool hadComputationError() = 0;
70 virtual std::vector<DtVector> results() = 0;
71 virtual std::vector<DtVector>
debugPoints() {
return std::vector<DtVector>(); };
72 virtual void* internalQuery() = 0;
83 virtual bool tick() {
return true; };
89 virtual std::vector<DtVector>
results() {
return std::vector<DtVector>(); };
97 regenerateAtRuntime(true), maxRegenerationThreads(2), regenerationDelay(2.5) {};
101 int workingMemorySize;
132 typedef void (*DtSearchAreaPointCostModifierEvaluatorFcn)(
const DtVector& localPoint,
float* currentCost,
void* userData);
134 typedef void(*DtSectorRegenerationCb)(
void* userData);
137 static void setNavAreaCreatorFcn(DtNavAreaCreatorFcn fcn);
139 static bool navAreaDebuggingEnabled();
140 static void setNavAreaDebuggingEnabled(
bool enable);
144 std::vector<DtString> profiles = std::vector<DtString>()) = 0;
145 virtual void update(
float deltaTimeInSeconds) = 0;
149 virtual bool inNavArea(
const DtVector& localPos) = 0;
153 virtual bool validForProfile(
const DtString& profile)
const = 0;
155 virtual DtNavDataDebugInfo* debugInfo() = 0;
157 virtual void setExtent(
DtExtent* e) = 0;
167 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
174 DtPointOfInterestNavTagEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
181 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
184 virtual bool findInsidePositionFromOutsidePosition(
const DtString& profile,
185 double searchRadius,
double searchHeight,
const DtVector& fromFromHere,
186 DtVector& result,
int& halfEdgeType) = 0;
190 const std::vector<DtVector>& localDestinationPositions,
DtNavBot* searcher,
int tag = -1,
191 DtSearchAreaPointCostModifierEvaluatorFcn = 0, DtPointOfInterestEvaluatorFcn = 0, DtPathCalculatedEvaluatorFcn = 0,
192 void* usrData = 0,
bool startMovingWhenFound =
false) = 0;
196 const DtVector& destination,
bool useAbstractGraphs =
true,
197 const DtVector& locationToAvoid =
DtVector(),
double avoidanceRadius = 0) = 0;
201 virtual bool findFarthestPositionAlongHeading(
const DtString& profile,
const DtVector& start,
202 double heading,
double maxDistance,
DtVector& result,
bool& reachedMaxDist) = 0;
235 const DtVector& localAccessibilityPoint = DtVector::zero(),
236 double minRadius = -1,
237 double maxRadius = -1,
239 unsigned numberOfPoints = 1,
240 double minDistanceBetweenPoints = 0.0,
241 const DtString& placementRestriction = DtString::nullString(),
242 bool isStrict =
true,
243 bool tightlyPack =
false,
244 bool needLos =
false,
245 bool groundClamp =
false,
247 DtLocalPointUserEvalCallback callbackFcn = emptyCallback,
248 void* userData = 0) = 0;
251 virtual bool tagVolumesToBeIntegrated()
const = 0;
260 virtual std::vector<DtVector> searchInArea(
const DtString& profile,
261 const DtVector& startLocalPos,
double radius,
double postSpacing,
DtNavBot* searcher,
262 DtPointOfInterestEvaluatorFcn evalFcn = 0,
void* evalFcnUserData = 0,
int tag = -1) = 0;
265 virtual unsigned newNavTagVolumeId() = 0;
268 virtual void associateNavTagVolumeIdWithObject(
unsigned tagVolumeId,
const DtUUID& objectUUID) = 0;
272 virtual DtUUID uuidFromNavTagVolumeId(
unsigned navTagId) = 0;
276 virtual unsigned navTagVolumeIdFromUuid(
const DtUUID& objectUUID) = 0;
286 virtual void addSectorRegenerationCallback(DtSectorRegenerationCb cb,
void* usr) = 0;
287 virtual void removeSectorRegenerationCallback(DtSectorRegenerationCb cb,
void* usr) = 0;