![]() |
VR-Forces Development_Version Class Documentation
|
Contains all the data and logic for navigation within a specific area. More...
Classes | |
| struct | DtNavDataDebugInfo |
Public Types | |
| typedef DtNavArea *(* | DtNavAreaCreatorFcn )() |
| typedef DtOnGraphVertexVisitedResult(* | DtPointOfInterestEvaluatorFcn )(const DtVector &localPoint, void *userData) |
| typedef void(* | DtSearchAreaPointCostModifierEvaluatorFcn )(const DtVector &localPoint, float *currentCost, void *userData) |
| typedef DtOnPathToGraphVertexComputedResult(* | DtPathCalculatedEvaluatorFcn )(const DtVector &localPoint, double pathCost, void *userData) |
| typedef bool(* | DtLocalPointUserEvalCallback )(const DtVector &localVector, DtNavAreaQuery *query, void *userData) |
Public Member Functions | |
| virtual | ~DtNavArea () |
| virtual bool | initialize (Coordinate_System *coordSys, DtNavAreaConfig config, std::vector< DtString > profiles=std::vector< DtString >())=0 |
| virtual void | update (float deltaTimeInSeconds)=0 |
| virtual bool | loadNavData (const DtString &path, const DtVariableBindingsList &variableBindings=DtReaderWriter::nullVariableReference(), bool objectNavData=false)=0 |
| virtual bool | inNavArea (const DtVector &localPos)=0 |
| virtual bool | validPosition (const DtString &profile, const DtVector &localPos)=0 |
| virtual bool | validForProfile (const DtString &profile) const =0 |
| virtual DtNavDataDebugInfo * | debugInfo ()=0 |
| virtual void | setExtent (DtExtent *e)=0 |
| virtual DtExtent | localExtent ()=0 |
| virtual void | cancelQuery (DtNavAreaQuery::Ptr)=0 |
| Cancels the given query. | |
| virtual DtNavAreaQuery::Ptr | findNearbyPointOfInterest (const DtString &profile, const DtVector &startLocalPos, int tag=DtNavDataTagAny, double propagationRadius=200., DtPointOfInterestEvaluatorFcn evalFcn=0, DtPathCalculatedEvaluatorFcn pathFcn=0, void *evalFcnUserData=0)=0 |
| Finds a defined point of interest in the navArea with the shortest path from startLocalPos that has the specified tag (-1 matches all tags) and returns true when passed to evalFcn, if specified. | |
| virtual DtNavAreaQuery::Ptr | findBestExitPoint (const DtString &profile, DtNavBot *searcher, const DtVector &startLocalPos, const DtVector &destination, int tag=DtNavDataTagAny, double propagationRadius=200., DtPointOfInterestEvaluatorFcn evalFcn=0, DtPathCalculatedEvaluatorFcn pathFcn=0, void *evalFcnUserData=0)=0 |
| Given a start and end destination outside of the nav mesh, find the best exit point matching the tag the bot can use to leave the navigation mesh. | |
| virtual bool | findInsidePositionFromOutsidePosition (const DtString &profile, double searchRadius, const DtVector &fromFromHere, DtVector &result, int &halfEdgeType)=0 |
| Finds the closest point in the nav mesh from the given start point. If a point is found result is returned in result. | |
| virtual DtNavAreaQuery::Ptr | findBestPathTo (const DtString &profile, const DtVector &start, const std::vector< DtVector > &localDestinationPositions, DtNavBot *searcher, int tag=-1, DtSearchAreaPointCostModifierEvaluatorFcn=0, DtPointOfInterestEvaluatorFcn=0, DtPathCalculatedEvaluatorFcn=0, void *usrData=0, bool startMovingWhenFound=false)=0 |
| Find the best path to the given locations. | |
| virtual DtNavAreaQuery::Ptr | generateRandomPoints (const DtString &profile, const DtVector &localAccessibilityPoint=DtVector::zero(), double radius=-1, const DtLocalVertexList &boundingArea=DtLocalVertexList(), unsigned numberOfPoints=1, double minDistanceBetweenPoints=0.0, DtLocalPointUserEvalCallback callbackFcn=emptyCallback, void *userData=0)=0 |
| DtVrfObject * | attachedObject () |
| void | setAttachedObject (DtVrfObject *object) |
| virtual std::vector< DtVector > | searchInArea (const DtString &profile, const DtVector &startLocalPos, double radius, double postSpacing, DtNavBot *searcher, DtPointOfInterestEvaluatorFcn evalFcn=0, void *evalFcnUserData=0, int tag=-1)=0 |
| Returns a list of points that have been judged to be usable within the given area and post spacing. | |
Static Public Member Functions | |
| static DtNavArea * | create () |
| static void | setNavAreaCreatorFcn (DtNavAreaCreatorFcn fcn) |
| static bool | navAreaDebuggingEnabled () |
| static void | setNavAreaDebuggingEnabled (bool enable) |
| static bool | emptyCallback (const DtVector &, DtNavAreaQuery *, void *) |
Protected Attributes | |
| DtVrfObject * | myAttachedObject |
| Points to the host object if this navArea is attached to an object like a cultural feature or a large ship, for example. | |
Static Protected Attributes | |
| static DtNavAreaCreatorFcn | theNavAreaCreatorFcn |
| static bool | theNavAreaDebuggingEnabled |
Contains all the data and logic for navigation within a specific area.
NavData is loaded for various types of entities into a DtNavArea. NavBots are created within a specific DtNavArea.
| typedef DtNavArea*(* DtNavArea::DtNavAreaCreatorFcn)() |
| typedef DtOnGraphVertexVisitedResult(* DtNavArea::DtPointOfInterestEvaluatorFcn)(const DtVector &localPoint, void *userData) |
| typedef void(* DtNavArea::DtSearchAreaPointCostModifierEvaluatorFcn)(const DtVector &localPoint, float *currentCost, void *userData) |
| typedef DtOnPathToGraphVertexComputedResult(* DtNavArea::DtPathCalculatedEvaluatorFcn)(const DtVector &localPoint, double pathCost, void *userData) |
| typedef bool(* DtNavArea::DtLocalPointUserEvalCallback)(const DtVector &localVector, DtNavAreaQuery *query, void *userData) |
|
inlinevirtual |
|
static |
|
static |
|
static |
|
static |
|
pure virtual |
|
pure virtual |
|
pure virtual |
| objectNavData | Indicates if this nav data is for an embarkable object, or for a terrain. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Cancels the given query.
|
pure virtual |
Finds a defined point of interest in the navArea with the shortest path from startLocalPos that has the specified tag (-1 matches all tags) and returns true when passed to evalFcn, if specified.
|
pure virtual |
Given a start and end destination outside of the nav mesh, find the best exit point matching the tag the bot can use to leave the navigation mesh.
|
pure virtual |
Finds the closest point in the nav mesh from the given start point. If a point is found result is returned in result.
|
pure virtual |
Find the best path to the given locations.
|
static |
|
pure virtual |
|
inline |
|
inline |
|
pure virtual |
Returns a list of points that have been judged to be usable within the given area and post spacing.
When using the evaluator function return OnGraphVertexVisited_VertexIsTheBestSoFar_GoOn to add that point to the potential list points to use. Return OnGraphVertexVisited_StopOnThisVertex to only use this vertex and OnGraphVertexVisited_IgnoreVertex_StopWithBestSoFar to not add this point but to stop the search
|
staticprotected |
|
staticprotected |
|
protected |
Points to the host object if this navArea is attached to an object like a cultural feature or a large ship, for example.