15 #include <matrix/vlVector.h>
17 #include "boost/shared_ptr.hpp"
51 typedef boost::shared_ptr<DtNavAreaQuery>
Ptr;
57 virtual bool tick() = 0;
58 virtual bool success() = 0;
61 virtual bool navDataChanged() = 0;
62 virtual bool outOfWorkingMemory() = 0;
63 virtual bool hadComputationError() = 0;
65 virtual std::vector<DtVector> results() = 0;
66 virtual std::vector<DtVector>
debugPoints() {
return std::vector<DtVector>(); };
67 virtual void* internalQuery() = 0;
78 virtual bool tick() {
return true; };
84 virtual std::vector<DtVector>
results() {
return std::vector<DtVector>(); };
95 int workingMemorySize;
115 typedef void (*DtSearchAreaPointCostModifierEvaluatorFcn)(
const DtVector& localPoint,
float* currentCost,
void* userData);
119 static void setNavAreaCreatorFcn(DtNavAreaCreatorFcn fcn);
121 static bool navAreaDebuggingEnabled();
122 static void setNavAreaDebuggingEnabled(
bool enable);
126 std::vector<DtString> profiles = std::vector<DtString>()) = 0;
127 virtual void update(
float deltaTimeInSeconds) = 0;
131 virtual bool inNavArea(
const DtVector& localPos) = 0;
132 virtual bool validPosition(
const DtString& profile,
const DtVector& localPos) = 0;
135 virtual bool validForProfile(
const DtString& profile)
const = 0;
137 virtual DtNavDataDebugInfo* debugInfo() = 0;
139 virtual void setExtent(
DtExtent* e) = 0;
149 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
156 DtPointOfInterestEvaluatorFcn evalFcn = 0, DtPathCalculatedEvaluatorFcn pathFcn = 0,
void* evalFcnUserData = 0) = 0;
159 virtual bool findInsidePositionFromOutsidePosition(
const DtString& profile,
160 double searchRadius,
const DtVector& fromFromHere,
DtVector& result,
int& halfEdgeType) = 0;
164 const std::vector<DtVector>& localDestinationPositions,
DtNavBot* searcher,
int tag = -1,
165 DtSearchAreaPointCostModifierEvaluatorFcn = 0, DtPointOfInterestEvaluatorFcn = 0, DtPathCalculatedEvaluatorFcn = 0,
166 void* usrData = 0,
bool startMovingWhenFound =
false) = 0;
170 virtual bool findFarthestPositionAlongHeading(
const DtString& profile,
const DtVector& start,
171 double heading,
double maxDistance,
DtVector& result,
bool& reachedMaxDist) = 0;
202 const DtVector& localAccessibilityPoint = DtVector::zero(),
203 double minRadius = -1,
204 double maxRadius = -1,
206 unsigned numberOfPoints = 1,
207 double minDistanceBetweenPoints = 0.0,
208 const DtString& placementRestriction = DtString::nullString(),
209 bool isStrict =
true,
210 bool tightlyPack =
false,
211 bool needLos =
false,
213 DtLocalPointUserEvalCallback callbackFcn = emptyCallback,
214 void* userData = 0) = 0;
223 virtual std::vector<DtVector> searchInArea(
const DtString& profile,
224 const DtVector& startLocalPos,
double radius,
double postSpacing,
DtNavBot* searcher,
225 DtPointOfInterestEvaluatorFcn evalFcn = 0,
void* evalFcnUserData = 0,
int tag = -1) = 0;