![]() |
VR-Forces Developer's Guide
|
This is the DtVrfObjectNavInterface subclass for objects which are actively querying the navigation system. They will have a DtNavBot instantiated if they are within a navigation area.

Public Member Functions | |
| virtual void | postObjectInit () override |
| virtual void | firstTick () override |
| virtual void | tick () override |
| virtual | ~DtActiveBotNavInterface () override |
| virtual bool | ableToNavigate () const override |
| DtNavArea * | navArea () |
| const DtNavArea * | navArea () const |
| virtual const DtString & | navProfile () const |
| virtual void | setNavProfile (const DtString &profile) |
| virtual bool | requestControl (int priority, const DtString &controller) |
| virtual bool | hasControl (int priority) |
| virtual void | releaseControl (int priority) |
| virtual void | setDestination (const DtVector &localDest) |
| virtual DtVector | destination () const |
| virtual void | resetDestination () |
| virtual void | setPositionInvalid () |
| virtual void | setDesiredSpeed (double speed) |
| virtual DtNavBot::PathStatus | pathStatus (double atDistance) |
| virtual DtString | pathStatusString () |
| virtual double | getOutputSpeed () |
| virtual double | getOutputHeading () |
| virtual bool | currentPath (std::vector< DtVector > &path) |
| virtual bool | abstractPath (std::vector< DtVector > &path) |
| virtual bool | currentPathEdge (DtVector &edgeStart, DtVector &edgeEnd) |
| virtual void | getNavPathAsRw (DtRwBinaryData &) |
| virtual unsigned | currentAbstractPathIndex () |
| virtual void | setUseAbstractGraph (bool yesNo) |
| virtual void | resetUseAbstractGraph () |
| virtual bool | usingAbstractGraph () const |
| virtual void | setPathCostEvalFunction (DtNavBot::NavBotPathLocationEvalFcn fcn, void *usr) |
| virtual void | clearPathCostEvalFunction () |
| virtual DtVector | transitionPoint () const |
| virtual bool | usingTransitionPoint () const |
| virtual bool | nextTransitionPoint (DtVector &tPoint) |
| virtual bool | findingTransitionPoint () const |
| virtual std::vector< DtVector > | searchInArea (double radius, double postSpacing, DtNavArea::DtPointOfInterestEvaluatorFcn=0, void *usrData=0, int navTag=-1) |
| virtual std::vector< DtVector > | searchInArea (const DtVector &startPoint, double radius, double postSpacing, DtNavArea::DtPointOfInterestEvaluatorFcn=0, void *usrData=0, int navTag=-1) |
| virtual DtNavAreaQuery::Ptr | findBestPathTo (const std::vector< DtVector > &localPositions, DtNavArea::DtSearchAreaPointCostModifierEvaluatorFcn=0, DtNavArea::DtPointOfInterestEvaluatorFcn=0, DtNavArea::DtPathCalculatedEvaluatorFcn=0, void *usrData=0) |
| virtual DtNavAreaQuery::Ptr | findPathToLocation (const DtVector &start, const DtVector &destination, bool useAbstractGraphs, const DtVector &locationToAvoid=DtVector(), double avoidanceRadius=0) |
| virtual bool | findFarthestPositionAlongHeading (const DtVector &start, double heading, double maxDistance, DtVector &result, bool &reachedMaxDist) const |
| virtual void | cancelQuery (DtNavAreaQuery::Ptr) |
| virtual bool | findFarthestPositionAlongHeading (double heading, double maxDistance, DtVector &result, bool &reachedMaxDist) const |
| virtual DtNavTag | navTagAtPosition (const DtVector &localPos) const |
| virtual DtNavTag | upcomingNavTagOnPath () const |
| virtual void | upcomingNavTagsOnPath (double distance, DtNavTagAndLocationList &navTags) const |
| virtual void | setNavigationMethod (DtNavBot::NavigationMethod navMethod) |
| virtual void | resetNavigationMethod () |
| virtual DtNavBot::NavigationMethod | navigationMethod () const |
| virtual DtVector | performMovement (double dt) |
| virtual DtVector | groundClamp (const DtVector &localPos, DtVector &normal) |
| bool | findValidPositionNearby (const DtVector &localStart, double radius, DtVector &result) |
| virtual DtNavBot * | navBot () |
| virtual bool | changeAreaIfOverlapping (const DtVector &dest) |
Public Member Functions inherited from DtVrfObjectNavInterface | |
| virtual | ~DtVrfObjectNavInterface ()=0 |
| virtual void | addNavAreaChangedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType callback, void *usr) const |
| virtual void | removeNavAreaChangedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType callback, void *usr) const |
| virtual void | invokeNavAreaChangedCallbacks () |
| virtual void | setWaitingForLoad (bool isLoading) |
| virtual bool | isWaitingForLoad () const |
Static Public Member Functions | |
| static DtVrfObjectNavInterface * | create (DtLocalObject *vrfObject) |
Protected Member Functions | |
| DtActiveBotNavInterface (DtLocalObject *vrfObject) | |
| virtual bool | init () override |
| virtual void | changingNavArea (DtNavArea *newNavArea) override |
| virtual void | processSetLocationComplete () |
| virtual DtNavAreaQuery::Ptr | findTransitionPoint (DtNavArea *navArea, const DtVector &localStart, const DtVector &localDest) |
| virtual DtNavAreaQuery::Ptr | findBestExitPoint (DtNavArea *navArea, const DtVector &localStart, const DtVector &localDest) |
| virtual DtNavAreaQuery::Ptr | findCoverPoint (DtNavArea *navArea, const DtVector &localStart, const DtVector &localCoverFrom, double coverFromRadius, double distanceFromThreat) |
| virtual bool | findInsidePositionFromOutsidePosition (DtNavArea *navArea, const DtVector &localStart, const DtVector &localDest, DtVector &result, int &halfEdgeType) |
| virtual DtVector | adjustDestination (const DtVector &localDest) |
| virtual DtVector | localOrParentPos (const DtVector &localPos) |
| virtual DtVector | objectLocationLocalOrParent () const |
| virtual bool | botShouldBeActive () |
| virtual void | setCollisionAvoidParams (DtNavBot::CollisionAvoidanceConfiguration &collAvoidConfig) |
| virtual void | findTransitionPointStartingFrom (const DtVector &startingPoint, const DtVector &to) |
| virtual void | removeDebugTransitionPoints () |
| virtual void | setNavigationConfigParams (DtNavBot::NavigationConfiguration &navConfig) |
Protected Member Functions inherited from DtVrfObjectNavInterface | |
| DtVrfObjectNavInterface (DtLocalObject *vrfObject) | |
| DtVrfObjectNavInterface (DtSimObjectReference vrfObject) | |
| virtual bool | isCollidableWhenDestroyed () const |
Private Member Functions | |
| DtActiveBotNavInterface () | |
| DtActiveBotNavInterface (const DtActiveBotNavInterface &orig) | |
| DtActiveBotNavInterface & | operator= (const DtActiveBotNavInterface &orig) |
|
private |
Not Implemented.
|
private |
Not Implemented.
|
protected |
Use the create() method instead of calling the constructor.
|
overridevirtual |
|
private |
Not Implemented.
|
static |
|
overrideprotectedvirtual |
Virtual init, called from the create() method.
Reimplemented from DtVrfObjectNavInterface.
|
overridevirtual |
Perform additional initialization after the object has been initialized. Default behavior is to do nothing, must be implemented in subclass.
Reimplemented from DtVrfObjectNavInterface.
|
overridevirtual |
Reimplemented from DtVrfObjectNavInterface.
|
overridevirtual |
Reimplemented from DtVrfObjectNavInterface.
|
overridevirtual |
Indicates whether or not this navInterface is currently able to provide navigation services for the entity. This will be true when the entity is in a navigation area and in a valid location for navigation.
Reimplemented from DtVrfObjectNavInterface.
|
inline |
|
inline |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets the destination into the navBot if it is there. If there is no navBot, but the destination is in a navArea, finds the best point to enter the area and sets it to transitionPoint.
|
virtual |
|
virtual |
|
virtual |
Can be used to indicate that the bot's current position is invalid.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Can be used to enable or disable abstract graph usage. Takes effect the next time the destination is set.
|
virtual |
Resets abstract graph usage to configured settings, undoing any settings from setUseAbstractGraph.
|
virtual |
Returns whether the abstract graph is currently in use.
|
virtual |
Sets a function that will be called frequently during path finding and path following to evaluate the cost of crossing various section of the navigation data.
|
virtual |
Clears the current path cost eval function and cancels all current queries, which will be using the old, invalid function.
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
Returns true if in the process of looking for a transition point.
|
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. Uses current location of entity.
|
virtual |
|
virtual |
Starts the process of finding the best path to any of the given destination points. Check the pathStatus() to see when finished.
|
virtual |
Returns a query to find a path from the given starting location to the given destination position. Optionally a location to avoid can be given. Will use the profile and current navigation settings of the bot.
|
virtual |
Finds the farthest point along a given vector that can be traveled without hitting the border of the NavMesh or a non-traversable triangle.
|
virtual |
Cancels the given query.
|
virtual |
Finds the farthest point along a given vector that we can travel without hitting the border of the NavMesh or a non-traversable triangle.
|
virtual |
Gets the nav tag of the position, if valid.
|
virtual |
Gets the upcoming nav tag on the path.
|
virtual |
Gets all nav tags within the specified distance from the current location on the path.
|
virtual |
Updates the navigation method.
|
virtual |
Resets the navigation method to the default setting.
|
virtual |
Gets the current navigation method.
|
virtual |
Allows the nav bot to perform movement for the entity. Returns the new entity location after processing movement for the next dt seconds.
|
virtual |
Finds a ground clamped position on the nav data near the specified local position. Also outputs the normal of the clamped position.
| bool DtActiveBotNavInterface::findValidPositionNearby | ( | const DtVector & | localStart, |
| double | radius, | ||
| DtVector & | result | ||
| ) |
Finds a valid point near the specific position.
|
virtual |
|
virtual |
If we are in an overlapping area, and the current area can be made the destination area due to movement, then change it to the destination area. Returns true if area was switched.
|
overrideprotectedvirtual |
Called when the objects position is in a navArea that it was not on the previous check.
Reimplemented from DtVrfObjectNavInterface.
|
protectedvirtual |
Update nav bot's destination, to trigger a replan.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Moves the destination to on the nav mesh if possible. May also ground clamp the destination. Assumes the localDest is in the current navArea.
|
protectedvirtual |
If the entity is embarked, converts the provided local position to the parent frame, otherwise returns the same local position provided.
|
protectedvirtual |
Returns the local position of the entity, or the parent position if the entity is embarked.
|
protectedvirtual |
Checks any special conditions (other than location) for the activation/deactivation of the bot, such as the entity being destroyed. Returns true if the bot should be active based on these special conditions.
|
protectedvirtual |
Sets the collision avoidance configuration from the parameters specified in the platform OPE file. The following parameters are read from the navigation-params section: enable-avoidance (bool) avoidance-enable-stop (bool) avoidance-enable-slow-down (bool) avoidance-enable-push-through (bool) avoidance-collision-lookahead-time (float) avoidance-angle-eval-span (float) avoidance-num-angle-samples (int) avoidance-safety-distance (float)
|
protectedvirtual |
Finds a new transition point at the given start point.
|
protectedvirtual |
|
protectedvirtual |
Sets the navigation configuration from the parameters specified in the platform OPE file. The following parameters are read from the navigation-params sections: navigation-method (string: "shortcut" or "spline") use-abstract-graph (bool) min-abstract-graph-replan-distance (float)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |