15 #include <matrix/vlVector.h>
17 #include "boost/shared_ptr.hpp"
53 typedef boost::shared_ptr<DtNavAreaQuery>
Ptr;
59 virtual bool tick() = 0;
60 virtual bool success() = 0;
63 virtual bool navDataChanged() = 0;
64 virtual bool outOfWorkingMemory() = 0;
65 virtual bool hadComputationError() = 0;
67 virtual std::vector<DtVector> results() = 0;
68 virtual std::vector<DtVector>
debugPoints() {
return std::vector<DtVector>(); };
69 virtual void* internalQuery() = 0;
80 virtual bool tick() {
return true; };
86 virtual std::vector<DtVector>
results() {
return std::vector<DtVector>(); };
97 int workingMemorySize;
117 typedef void (*DtSearchAreaPointCostModifierEvaluatorFcn)(
const DtVector& localPoint,
float* currentCost,
void* userData);
121 static void setNavAreaCreatorFcn(DtNavAreaCreatorFcn fcn);
123 static bool navAreaDebuggingEnabled();
124 static void setNavAreaDebuggingEnabled(
bool enable);
128 std::vector<DtString> profiles = std::vector<DtString>()) = 0;
129 virtual void update(
float deltaTimeInSeconds) = 0;
133 virtual bool inNavArea(
const DtVector& localPos) = 0;
137 virtual bool validForProfile(
const DtString& profile)
const = 0;
139 virtual DtNavDataDebugInfo* debugInfo() = 0;
141 virtual void setExtent(
DtExtent* e) = 0;
151 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
158 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
161 virtual bool findInsidePositionFromOutsidePosition(
const DtString& profile,
162 double searchRadius,
const DtVector& fromFromHere,
DtVector& result,
int& halfEdgeType) = 0;
166 const std::vector<DtVector>& localDestinationPositions,
DtNavBot* searcher,
int tag = -1,
167 DtSearchAreaPointCostModifierEvaluatorFcn = 0, DtPointOfInterestEvaluatorFcn = 0, DtPathCalculatedEvaluatorFcn = 0,
168 void* usrData = 0,
bool startMovingWhenFound =
false) = 0;
172 virtual bool findFarthestPositionAlongHeading(
const DtString& profile,
const DtVector& start,
173 double heading,
double maxDistance,
DtVector& result,
bool& reachedMaxDist) = 0;
206 const DtVector& localAccessibilityPoint = DtVector::zero(),
207 double minRadius = -1,
208 double maxRadius = -1,
210 unsigned numberOfPoints = 1,
211 double minDistanceBetweenPoints = 0.0,
212 const DtString& placementRestriction = DtString::nullString(),
213 bool isStrict =
true,
214 bool tightlyPack =
false,
215 bool needLos =
false,
216 bool groundClamp =
false,
218 DtLocalPointUserEvalCallback callbackFcn = emptyCallback,
219 void* userData = 0) = 0;
222 virtual bool tagVolumesToBeIntegrated()
const = 0;
231 virtual std::vector<DtVector> searchInArea(
const DtString& profile,
232 const DtVector& startLocalPos,
double radius,
double postSpacing,
DtNavBot* searcher,
233 DtPointOfInterestEvaluatorFcn evalFcn = 0,
void* evalFcnUserData = 0,
int tag = -1) = 0;
236 virtual unsigned newNavTagVolumeId() = 0;
239 virtual void associateNavTagVolumeIdWithObject(
unsigned tagVolumeId,
const DtUUID& objectUUID) = 0;
243 virtual DtUUID uuidFromNavTagVolumeId(
unsigned navTagId) = 0;
247 virtual unsigned navTagVolumeIdFromUuid(
const DtUUID& objectUUID) = 0;