VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
DtNavArea Class Referenceabstract

This class contains all the data and logic for navigation within a specific area. Nav Data may be loaded for multiple types (profiles) of entities into a single DtNavArea. NavBots are created within a specific DtNavArea and represent entities in this area.

Note
This class is abstract, and must be created through the create() method.

Classes

struct  DtNavDataDebugInfo
 
struct  DtNavTriangleInfo
 
struct  DtNavTriangleInfoExt
 

Public Types

typedef unsigned NavAreaId
 
typedef DtNavArea *(* DtNavAreaCreatorFcn )()
 
typedef
DtOnGraphVertexVisitedResult(* 
DtPointOfInterestEvaluatorFcn )(const DtVector &localPoint, void *userData)
 
typedef
DtOnGraphVertexVisitedResult(* 
DtPointOfInterestNavTagEvaluatorFcn )(const DtVector &localPoint, const DtNavTag &tag, void *userData)
 
typedef void(* DtSearchAreaPointCostModifierEvaluatorFcn )(const DtVector &localPoint, float *currentCost, void *userData)
 
typedef
DtOnPathToGraphVertexComputedResult(* 
DtPathCalculatedEvaluatorFcn )(const DtVector &localPoint, double pathCost, void *userData)
 
typedef void(* DtSectorRegenerationCb )(void *userData)
 
typedef bool(* DtLocalPointUserEvalCallback )(const DtVector &localVector, DtNavAreaQuery *query, void *userData)
 

Public Member Functions

virtual ~DtNavArea ()
 
virtual bool initialize (NavAreaId navAreaId, Coordinate_System *coordSys, DtTerrainInterface *terrainIf, DtNavAreaConfig config, DtNavGenerationThreadCounter *threadCounter, bool parallelQueryQueueProcessing=false, std::vector< DtString > profiles=std::vector< DtString >())=0
 
virtual NavAreaId navAreaId () const =0
 
virtual void update (float deltaTimeInSeconds)=0
 
virtual void processQueues ()=0
 
virtual bool hasPendingQueries () const =0
 
virtual void processTerrainChangeNotification (const DtTerrainChangeNotificationInfo &terrainChangeInfo)=0
 
virtual bool loadNavData (const DtString &path, const DtVariableBindingsList &variableBindings=DtReaderWriter::nullVariableReference(), bool objectNavData=false, const DtReaderWriter::SearchPaths &=DtReaderWriter::SearchPaths())=0
 
virtual bool inNavArea (const DtVector &localPos) const =0
 
virtual bool validPosition (const DtString &profile, const DtVector &localPos, DtNavTag *navTag=0, DtVector *outPos=0)=0
 
virtual bool navTopoPosition (const DtVector &localPosition, DtVector &navPosition) const =0
 
virtual bool localPosition (const DtVector &navPosition, DtVector &localPosition) const =0
 
virtual bool navTopoVector (const DtVector &localVector, DtVector &navVector) const =0
 
virtual bool localVector (const DtVector &navPosition, DtVector &localVector) const =0
 
virtual bool validForProfile (const DtString &profile) const =0
 
virtual bool profileEntitySize (const DtString &profile, double &radius, double &height) const =0
 
virtual DtNavDataDebugInfodebugInfo ()=0
 
virtual void setExtent (DtExtent *e)=0
 
virtual DtExtent localExtent ()=0
 
virtual void cancelQuery (DtNavAreaQuery::Ptr)=0
 
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
 
virtual DtNavAreaQuery::Ptr findNearbyPointOfInterestUsingNavTag (const DtString &profile, const DtVector &startLocalPos, bool useHighPriorityQueue, int tag=DtNavDataTagAny, double propagationRadius=200., DtPointOfInterestNavTagEvaluatorFcn evalFcn=0, DtPathCalculatedEvaluatorFcn pathFcn=0, void *evalFcnUserData=0)=0
 
virtual void findNearbyNavEdgesUsingNavTags (const DtString &profile, double searchRadius, const DtVector &fromFromHere, const std::vector< DtInputNavTag > &navTagVals, std::list< const DtNavEdge * > &result) const =0
 
virtual void findVerticesUsingNavTags (const DtString &profile, double searchRadius, const DtVector &fromFromHere, const std::vector< DtInputNavTag > &navTagVals, std::list< DtVector > &result) const =0
 
virtual DtNavAreaQuery::Ptr findBestExitPoint (const DtString &profile, DtNavBot *searcher, const DtVector &startLocalPos, const DtVector &destination, int tag=DtNavDataTagAny, double propagationRadius=200.)=0
 
virtual bool isPositionInside (const DtString &profile, const DtVector &testPosition, double searchHeight=1000., DtVector *heightAdjustedLocation=nullptr) const =0
 
virtual bool movePositionInsideIfOutside (const DtString &profile, double searchRadius, double searchHeight, const DtVector &fromFromHere, DtVector &result, int &halfEdgeType) const =0
 
virtual bool findInsidePositionFromOutsidePosition (const DtString &profile, double searchRadius, double searchHeight, const DtVector &fromFromHere, DtVector &result, int &halfEdgeType) const =0
 
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
 
virtual DtNavAreaQuery::Ptr findPathToLocation (const DtString &profile, const DtVector &start, const DtVector &destination, bool useAbstractGraphs=true, bool useChannels=false, double channelRadius=4.0, const DtVector &locationToAvoid=DtVector(), double avoidanceRadius=0, DtNavBot::NavBotPathLocationEvalFcn costEvalFcn=0, void *costEvalFcnUsrData=0)=0
 
virtual bool findFarthestPositionAlongHeading (const DtString &profile, const DtVector &start, double heading, double maxDistance, DtVector &result, bool &reachedMaxDist) const =0
 
virtual bool doesNavIntersectBetweenTwoPoints (const DtString &profile, const DtVector &start, const DtVector &end) const =0
 
virtual
DtPersistentPointAlongHeadingQuery
createPeristentPointAlongHeadingQuery (const DtString &profile) const =0
 
virtual
DtObjectsCollectorInExtentQuery
createObjectsCollectorInExtentQuery (const DtString &profile) const =0
 
virtual DtNavAreaQuery::Ptr generateRandomPoints (const DtString &profile, const DtVector &localAccessibilityPoint=DtVector::zero(), double minRadius=-1, double maxRadius=-1, const DtLocalVertexList &boundingArea=DtLocalVertexList(), unsigned numberOfPoints=1, double minDistanceBetweenPoints=0.0, const DtString &placementRestriction=DtString::nullString(), bool isStrict=true, bool tightlyPack=false, bool needLos=false, bool groundClamp=false, const DtLocalVertexList &leftOfLine=DtLocalVertexList(), DtLocalPointUserEvalCallback callbackFcn=emptyCallback, void *userData=0)=0
 
virtual DtNavAreaQuery::Ptr placeFormation (const DtString &profile, std::vector< DtVector > &localPositions, double entityWidth)=0
 
virtual bool tagVolumesToBeIntegrated () const =0
 
const DtSimObjectattachedObject ()
 
void setAttachedObject (const DtSimObject *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) const =0
 
virtual bool navTrianglesInArea (const DtString &profile, const DtVector &location, double radius, std::list< DtNavTriangleInfo > &triangles)=0
 
virtual unsigned newNavTagId ()=0
 
virtual void associateNavTagIdWithObject (unsigned tagVolumeId, const DtUUID &objectUUID)=0
 
virtual void disassociateNavTagId (unsigned navTagId)=0
 
virtual DtUUID uuidFromNavTagId (unsigned navTagId) const =0
 
virtual unsigned navTagVolumeIdFromUuid (const DtUUID &objectUUID)=0
 
virtual const DtNavSectorNamessectorsQueuedForRegeneration () const =0
 
virtual const DtNavSectorNamessectorsBeingRegenerated () const =0
 
virtual DtNavSectorName sectorAtLocation (const DtString &profile, const DtVector &localPos) const =0
 
virtual void addSectorRegenerationCallback (DtSectorRegenerationCb cb, void *usr)=0
 
virtual void removeSectorRegenerationCallback (DtSectorRegenerationCb cb, void *usr)=0
 
virtual DtNavRegenRequestId requestNavDataGeneration (const DtVector &location, double radius, const std::set< DtString > &profiles=std::set< DtString >())=0
 
virtual void requestNavDataReversion (DtNavRegenRequestId id)=0
 
virtual void pauseNavDataRegeneration ()=0
 
virtual void resumeNavDataRegeneration ()=0
 
virtual bool revertNavData ()=0
 
virtual unsigned addNavEdge (const DtString &profile, std::vector< DtVector > &LocalPoints, const DtInputNavTag &navTag, const DtUUID &associatedObject=DtUUID::nullUUID())=0
 
virtual unsigned addNavIEdge (const DtString &profile, std::vector< DtVector > &LocalPoints, std::vector< std::vector< DtVector > > &localIPoints, const DtInputNavTag &navTag, const DtInputNavTag &entryExitNavTag, const DtUUID &associatedObject=DtUUID::nullUUID())=0
 
virtual void removeNavEdge (unsigned edgeId)=0
 
virtual unsigned addCoverPoint (const DtString &profile, const DtVector &localPoint, bool &creationComplete)=0
 
virtual bool isCoverPointCreated (unsigned coverPointId)=0
 
virtual void removeCoverPoint (unsigned coverPointId)=0
 
virtual unsigned numberOfPendingQueries () const =0
 
virtual bool objectNavData () const =0
 
virtual void setBlockOnAsynchronousOperations (bool shouldBlock)=0
 
virtual void printNavDataInfoForLocation (const DtVector &location, std::ostream &strm) const =0
 
virtual bool hasPendingOperations () const =0
 
virtual double areaWidth () const =0
 
virtual double areaLength () const =0
 

Static Public Member Functions

static DtNavAreacreate ()
 
static void setNavAreaCreatorFcn (DtNavAreaCreatorFcn fcn)
 
static bool emptyCallback (const DtVector &, DtNavAreaQuery *, void *)
 
static bool navAreaDebuggingEnabled ()
 
static void setNavAreaDebuggingEnabled (bool enable)
 

Protected Attributes

const DtSimObjectmyAttachedObject
 

Static Protected Attributes

static DtNavAreaCreatorFcn theNavAreaCreatorFcn
 
static bool theNavAreaDebuggingEnabled
 

Member Typedef Documentation

typedef DtNavArea*(* DtNavArea::DtNavAreaCreatorFcn)()
typedef DtOnGraphVertexVisitedResult(* DtNavArea::DtPointOfInterestEvaluatorFcn)(const DtVector &localPoint, void *userData)
typedef DtOnGraphVertexVisitedResult(* DtNavArea::DtPointOfInterestNavTagEvaluatorFcn)(const DtVector &localPoint, const DtNavTag &tag, 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 void(* DtNavArea::DtSectorRegenerationCb)(void *userData)
typedef bool(* DtNavArea::DtLocalPointUserEvalCallback)(const DtVector &localVector, DtNavAreaQuery *query, void *userData)

Constructor & Destructor Documentation

virtual DtNavArea::~DtNavArea ( )
inlinevirtual

Member Function Documentation

static DtNavArea* DtNavArea::create ( )
static

Static function for creating a new DtNavArea.

static void DtNavArea::setNavAreaCreatorFcn ( DtNavAreaCreatorFcn  fcn)
static

Sets the function used by create() to create a new DtNavArea.

static bool DtNavArea::navAreaDebuggingEnabled ( )
static

When Nav Area debugging is enabled, the Navigation Lab software can connect to a Nav Area to debug issues with navigation. There is a performance impact. Disabled by default.

static void DtNavArea::setNavAreaDebuggingEnabled ( bool  enable)
static

When Nav Area debugging is enabled, the Navigation Lab software can connect to a Nav Area to debug issues with navigation. There is a performance impact. Disabled by default.

virtual bool DtNavArea::initialize ( NavAreaId  navAreaId,
Coordinate_System coordSys,
DtTerrainInterface terrainIf,
DtNavAreaConfig  config,
DtNavGenerationThreadCounter threadCounter,
bool  parallelQueryQueueProcessing = false,
std::vector< DtString profiles = std::vector< DtString >() 
)
pure virtual
virtual NavAreaId DtNavArea::navAreaId ( ) const
pure virtual

Unique id assigned to this Nav Area at initialization.

virtual void DtNavArea::update ( float  deltaTimeInSeconds)
pure virtual

Function called to perform navigation related tasks for this area.

virtual void DtNavArea::processQueues ( )
pure virtual

Function to process navigation query queues. This is only for parallel queue processing and should not be called except by those threads.

virtual bool DtNavArea::hasPendingQueries ( ) const
pure virtual

Whether or not the world has pending queries.

virtual void DtNavArea::processTerrainChangeNotification ( const DtTerrainChangeNotificationInfo terrainChangeInfo)
pure virtual

Processes a dynamic terrain change, triggering nav data regeneration if necessary. Invoked by the DtVrfNavAreaManager . The terrain change notifications are generated by the terrain engine.

Parameters
terrainChangeInfo- provides the info for the terrain change - i.e. spatial extent, type of the change
virtual bool DtNavArea::loadNavData ( const DtString path,
const DtVariableBindingsList variableBindings = DtReaderWriter::nullVariableReference(),
bool  objectNavData = false,
const DtReaderWriter::SearchPaths = DtReaderWriter::SearchPaths() 
)
pure virtual

Loads Nav Data for this area.

Parameters
objectNavDataIndicates if this nav data is for an embarkable object, or for a terrain.
virtual bool DtNavArea::inNavArea ( const DtVector &  localPos) const
pure virtual

Returns true if the given location is in this Nav Area.

virtual bool DtNavArea::validPosition ( const DtString profile,
const DtVector &  localPos,
DtNavTag navTag = 0,
DtVector *  outPos = 0 
)
pure virtual

Tests to see if the position is on the nav mesh part of the nav area, i.e. on a traversable part. If there is a nav tag associated with the triangle found and navTag is provided, the tag value will be returned. If outPos is provided, it will be filled in with the projected position of the input point onto the triangle found.

virtual bool DtNavArea::navTopoPosition ( const DtVector &  localPosition,
DtVector &  navPosition 
) const
pure virtual

Calculates the raw nav area coordinates, which are essentially topographic, given a position in local coordinates. Returns true if successful.

virtual bool DtNavArea::localPosition ( const DtVector &  navPosition,
DtVector &  localPosition 
) const
pure virtual

Calculates the local terrain coordinates given a position in nav area coordinates. Returns true if successful.

virtual bool DtNavArea::navTopoVector ( const DtVector &  localVector,
DtVector &  navVector 
) const
pure virtual

Calculates a direction vector in nav area coordinates, given a vector in local coordinates. Returns true if successful.

virtual bool DtNavArea::localVector ( const DtVector &  navPosition,
DtVector &  localVector 
) const
pure virtual

Calculates a direction vector in local coordinates, given a vector in nav area coordinates. Returns true if successful.

virtual bool DtNavArea::validForProfile ( const DtString profile) const
pure virtual

Returns true if this area is valid for the given navigation profile.

virtual bool DtNavArea::profileEntitySize ( const DtString profile,
double radius,
double height 
) const
pure virtual

If the specified profile is found for this area, returns true and fills in the configured entity radius and height. Otherwise, returns false.

virtual DtNavDataDebugInfo* DtNavArea::debugInfo ( )
pure virtual
virtual void DtNavArea::setExtent ( DtExtent e)
pure virtual
virtual DtExtent DtNavArea::localExtent ( )
pure virtual
virtual double DtNavArea::areaWidth ( ) const
pure virtual

Returns the dimensions of the area.

virtual double DtNavArea::areaLength ( ) const
pure virtual

Returns the dimensions of the area.

virtual void DtNavArea::cancelQuery ( DtNavAreaQuery::Ptr  )
pure virtual

Cancels the given query.

virtual DtNavAreaQuery::Ptr DtNavArea::findNearbyPointOfInterest ( const DtString profile,
const DtVector &  startLocalPos,
int  tag = DtNavDataTagAny,
double  propagationRadius = 200.,
DtPointOfInterestEvaluatorFcn  evalFcn = 0,
DtPathCalculatedEvaluatorFcn  pathFcn = 0,
void *  evalFcnUserData = 0 
)
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.

virtual DtNavAreaQuery::Ptr DtNavArea::findNearbyPointOfInterestUsingNavTag ( const DtString profile,
const DtVector &  startLocalPos,
bool  useHighPriorityQueue,
int  tag = DtNavDataTagAny,
double  propagationRadius = 200.,
DtPointOfInterestNavTagEvaluatorFcn  evalFcn = 0,
DtPathCalculatedEvaluatorFcn  pathFcn = 0,
void *  evalFcnUserData = 0 
)
pure virtual

Returns a query that 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. The point evaluator function is passed the full nav tag so that it may be used in evaluation.

virtual void DtNavArea::findNearbyNavEdgesUsingNavTags ( const DtString profile,
double  searchRadius,
const DtVector &  fromFromHere,
const std::vector< DtInputNavTag > &  navTagVals,
std::list< const DtNavEdge * > &  result 
) const
pure virtual

Finds nearby Nav Edges in the Nav Graph from the given start point and matches one of the given tags. User is responsible for deleting result.

virtual void DtNavArea::findVerticesUsingNavTags ( const DtString profile,
double  searchRadius,
const DtVector &  fromFromHere,
const std::vector< DtInputNavTag > &  navTagVals,
std::list< DtVector > &  result 
) const
pure virtual

Finds nearby points in the nav graph from the given start point matching one of the given tags.

virtual DtNavAreaQuery::Ptr DtNavArea::findBestExitPoint ( const DtString profile,
DtNavBot searcher,
const DtVector &  startLocalPos,
const DtVector &  destination,
int  tag = DtNavDataTagAny,
double  propagationRadius = 200. 
)
pure virtual

Returns a query that finds the best exit point matching the tag that the bot can use to leave the navigation mesh based on the given a start and end destination outside of the Nav Area.

virtual bool DtNavArea::isPositionInside ( const DtString profile,
const DtVector &  testPosition,
double  searchHeight = 1000.,
DtVector *  heightAdjustedLocation = nullptr 
) const
pure virtual

Returns true if testPosition is considered to be within the nav mesh, based on the search parameters passed. This is a two dimensional search, however there is a height tolerance specified by searchHeight. If the testPosition is more than searchHeight meters above or below the nav data, the check will return false. Optionally, the caller may provide heightAdjustedLocation. If they do, it will be filled in with the point at that two dimensional location with the height clamped to the nav data.

virtual bool DtNavArea::movePositionInsideIfOutside ( const DtString profile,
double  searchRadius,
double  searchHeight,
const DtVector &  fromFromHere,
DtVector &  result,
int halfEdgeType 
) const
pure virtual

Finds the closest point in the nav mesh from the given start point. This function combines a check of isPositionInside() with a call to findInsidePositionFromOutsidePosition() if that call failed.

virtual bool DtNavArea::findInsidePositionFromOutsidePosition ( const DtString profile,
double  searchRadius,
double  searchHeight,
const DtVector &  fromFromHere,
DtVector &  result,
int halfEdgeType 
) const
pure virtual

Finds the closest point in the nav mesh from the given start point. If a point is found, the location of the point is returned in result.

virtual DtNavAreaQuery::Ptr DtNavArea::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 
)
pure virtual

Returns a query that finds the best path through multiple destination locations.

virtual DtNavAreaQuery::Ptr DtNavArea::findPathToLocation ( const DtString profile,
const DtVector &  start,
const DtVector &  destination,
bool  useAbstractGraphs = true,
bool  useChannels = false,
double  channelRadius = 4.0,
const DtVector &  locationToAvoid = DtVector(),
double  avoidanceRadius = 0,
DtNavBot::NavBotPathLocationEvalFcn  costEvalFcn = 0,
void *  costEvalFcnUsrData = 0 
)
pure virtual

Returns a query that finds a path to the specified location from the specified start point.

virtual bool DtNavArea::findFarthestPositionAlongHeading ( const DtString profile,
const DtVector &  start,
double  heading,
double  maxDistance,
DtVector &  result,
bool reachedMaxDist 
) const
pure virtual

Finds the farthest point along a given heading that can be traveled without hitting the border of the NavMesh, a non-traversable triangle, or the max distance.

virtual bool DtNavArea::doesNavIntersectBetweenTwoPoints ( const DtString profile,
const DtVector &  start,
const DtVector &  end 
) const
pure virtual

Attempts to find a between two points. Similar to findFarthestPosition but takes a 2nd point for sampling rather than heading and distance.

virtual DtPersistentPointAlongHeadingQuery* DtNavArea::createPeristentPointAlongHeadingQuery ( const DtString profile) const
pure virtual
virtual DtObjectsCollectorInExtentQuery* DtNavArea::createObjectsCollectorInExtentQuery ( const DtString profile) const
pure virtual
static bool DtNavArea::emptyCallback ( const DtVector &  ,
DtNavAreaQuery ,
void *   
)
static
virtual DtNavAreaQuery::Ptr DtNavArea::generateRandomPoints ( const DtString profile,
const DtVector &  localAccessibilityPoint = DtVector::zero(),
double  minRadius = -1,
double  maxRadius = -1,
const DtLocalVertexList boundingArea = DtLocalVertexList(),
unsigned  numberOfPoints = 1,
double  minDistanceBetweenPoints = 0.0,
const DtString placementRestriction = DtString::nullString(),
bool  isStrict = true,
bool  tightlyPack = false,
bool  needLos = false,
bool  groundClamp = false,
const DtLocalVertexList leftOfLine = DtLocalVertexList(),
DtLocalPointUserEvalCallback  callbackFcn = emptyCallback,
void *  userData = 0 
)
pure virtual

Returns a query to generate some number of random points. If localAccessibilityPoint is set, all points must be navigable from the access point. If boundingArea is set, all points must be inside the area, ignoring elevation. Note that this will not cause points to be generated outside the navArea. If boundingArea is not set, and radius is set, points will be generated using radius as a maximum distance from accessibilityPoint. If minDistanceBetweenPoints is set, generated points will be tested against the rest of the set of random points to make sure none are within the given distance of each other. If placementRestriction is set to one of the MovementMode strings (e.g. DtMovementModePreferRoads), points will be chosen that match that criteria. If isStrict is true, only points matching the placementRestriction will be generated, even if we can't create enough to match the desired number. If tightlyPack is true, points closer to access point or bounding area center will be favored. If needLos is true, will try to choose points that should have LOS to the specified access point. If groundClamp is true, points will be ground clamped to the terrain at a point below the original point plus the height of the entity specified in nav generation. If leftOfLine, the points specified will be considered a line, and only points to the left of that line will be generated. If callbackFcn is set, this user function is called on each generated point, to test if each point is acceptable.

virtual DtNavAreaQuery::Ptr DtNavArea::placeFormation ( const DtString profile,
std::vector< DtVector > &  localPositions,
double  entityWidth 
)
pure virtual

Returns a nav query to place the given points.

virtual bool DtNavArea::tagVolumesToBeIntegrated ( ) const
pure virtual

Returns true if there are any tag volumes which still need to be integrated into the mesh.

const DtSimObject* DtNavArea::attachedObject ( )
inline

If this Nav Area is attached to a sim object, returns that object.

void DtNavArea::setAttachedObject ( const DtSimObject object)
inline

Sets the sim object his Nav Ara is attached to.

virtual std::vector<DtVector> DtNavArea::searchInArea ( const DtString profile,
const DtVector &  startLocalPos,
double  radius,
double  postSpacing,
DtNavBot searcher,
DtPointOfInterestEvaluatorFcn  evalFcn = 0,
void *  evalFcnUserData = 0,
int  tag = -1 
) const
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.
  • Return OnGraphVertexVisited_IgnoreVertex_StopWithBestSoFar to not add this point but to stop the search.
virtual bool DtNavArea::navTrianglesInArea ( const DtString profile,
const DtVector &  location,
double  radius,
std::list< DtNavTriangleInfo > &  triangles 
)
pure virtual

Returns the nav triangles within the given radius of the specified location.

virtual unsigned DtNavArea::newNavTagId ( )
pure virtual

Generates a new unique ID for a nav tag volume.

virtual void DtNavArea::associateNavTagIdWithObject ( unsigned  tagVolumeId,
const DtUUID objectUUID 
)
pure virtual

Associates a nav tag ID with a VRF object UUID.

virtual void DtNavArea::disassociateNavTagId ( unsigned  navTagId)
pure virtual

Disassociates a nav tag ID with a VRF object UUID.

virtual DtUUID DtNavArea::uuidFromNavTagId ( unsigned  navTagId) const
pure virtual

Returns the object UUID that is associated with this nav tag ID. If not found, an invalid UUID will be returned.

virtual unsigned DtNavArea::navTagVolumeIdFromUuid ( const DtUUID objectUUID)
pure virtual

Returns the nav tag ID that is associated with this object UUID. If not found, an invalid (0) UUID will be returned.

virtual const DtNavSectorNames& DtNavArea::sectorsQueuedForRegeneration ( ) const
pure virtual

Returns the set of all sectors currently queued for regeneration.

virtual const DtNavSectorNames& DtNavArea::sectorsBeingRegenerated ( ) const
pure virtual

Returns the set of all sectors currently being regenerated.

virtual DtNavSectorName DtNavArea::sectorAtLocation ( const DtString profile,
const DtVector &  localPos 
) const
pure virtual

Returns the sector at the given location.

virtual void DtNavArea::addSectorRegenerationCallback ( DtSectorRegenerationCb  cb,
void *  usr 
)
pure virtual

Installs a callback to be notified when sector regeneration status changes (i.e. regen queued, started, or completed).

virtual void DtNavArea::removeSectorRegenerationCallback ( DtSectorRegenerationCb  cb,
void *  usr 
)
pure virtual
virtual DtNavRegenRequestId DtNavArea::requestNavDataGeneration ( const DtVector &  location,
double  radius,
const std::set< DtString > &  profiles = std::set< DtString >() 
)
pure virtual

Requests nav data regeneration at the specified location for the specified profiles. If no specific profiles are requested, data will be regenerated for all profiles. The location must be specified in local terrain coordinates.

virtual void DtNavArea::requestNavDataReversion ( DtNavRegenRequestId  id)
pure virtual

Request that nav data be regenerated to undo a previous nav data generation change.

virtual void DtNavArea::pauseNavDataRegeneration ( )
pure virtual

Pause nav data regeneration.

virtual void DtNavArea::resumeNavDataRegeneration ( )
pure virtual

Resume nav data regeneration.

virtual bool DtNavArea::revertNavData ( )
pure virtual

Reverts all modified nav data to the original data defined in the files.

virtual unsigned DtNavArea::addNavEdge ( const DtString profile,
std::vector< DtVector > &  LocalPoints,
const DtInputNavTag navTag,
const DtUUID associatedObject = DtUUID::nullUUID() 
)
pure virtual

Adds a nav edge and returns an edge id that can be used to remove it. Returns 0 if it fails. If associatedObject is not null, an association will be made between the nav edge and the object.

virtual unsigned DtNavArea::addNavIEdge ( const DtString profile,
std::vector< DtVector > &  LocalPoints,
std::vector< std::vector< DtVector > > &  localIPoints,
const DtInputNavTag navTag,
const DtInputNavTag entryExitNavTag,
const DtUUID associatedObject = DtUUID::nullUUID() 
)
pure virtual

Adds a nav edge and returns an edge id that can be used to remove it. Returns 0 if it fails. If associatedObject is not null, an association will be made between the nav edge and the object.

virtual void DtNavArea::removeNavEdge ( unsigned  edgeId)
pure virtual

Remove nav edge by its id.

virtual unsigned DtNavArea::addCoverPoint ( const DtString profile,
const DtVector &  localPoint,
bool creationComplete 
)
pure virtual

Adds a cover point and returns an edge id that can be used to remove it. Returns 0 if it fails. The creationComplete flag indicates if creation of the point completed or if further work is required.

virtual bool DtNavArea::isCoverPointCreated ( unsigned  coverPointId)
pure virtual

Returns true if the creation of the specified cover point is complete.

virtual void DtNavArea::removeCoverPoint ( unsigned  coverPointId)
pure virtual

Remove cover point by its id.

virtual unsigned DtNavArea::numberOfPendingQueries ( ) const
pure virtual

Returns the number of pending queries for this nav area.

virtual bool DtNavArea::objectNavData ( ) const
pure virtual

Returns true if this navigation data is associated with an object.

virtual void DtNavArea::setBlockOnAsynchronousOperations ( bool  shouldBlock)
pure virtual

Sets the area to block on asynchronous operations.

virtual void DtNavArea::printNavDataInfoForLocation ( const DtVector &  location,
std::ostream &  strm 
) const
pure virtual

Prints information about the nav data at the specified location to the given stream.

virtual bool DtNavArea::hasPendingOperations ( ) const
pure virtual

Member Data Documentation

DtNavAreaCreatorFcn DtNavArea::theNavAreaCreatorFcn
staticprotected
bool DtNavArea::theNavAreaDebuggingEnabled
staticprotected
const DtSimObject* DtNavArea::myAttachedObject
protected

Points to the host object if this navArea is attached to an object like a cultural feature or a large ship, for example.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)