VR-Forces 4.10 Class Documentation
 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 | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends
DtNavDataGenerator Class Reference

This class is used to generate nav data for an area on a terrain. More...

Classes

struct  NavEdgePoints
 
struct  NavPoint
 
struct  SectorGenerationThreadInfo
 
struct  TriangleCallbackInfo
 

Public Types

enum  SectorGenerationStatus {
  GenerationNotRequested, GenerationInProgress, GenerationSucceeded, GenerationFailed,
  GenerationStopped
}
 
typedef tbb::queuing_rw_mutex RwMutex
 
typedef tbb::mutex Mutex
 
typedef std::map
< DtNavSectorDataType,
std::vector< char > > 
NavDataOutputMap
 
typedef std::map
< DtNavSectorName,
SectorGenerationThreadInfo * > 
SectorGenerationThreadMap
 
typedef std::map< DtString,
DtString
ProfileRandomIdMap
 
typedef DtNavDataGenerator *(* DtNavDataGeneratorCreatorFcn )()
 
typedef bool(* DynamicTerrainNavEdgeFunction )(const DtRwDynamicTerrainInformation &dynTerrInfo, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)
 A function to generate a nav edge from a dynamic terrain feature. More...
 
typedef bool(* FeatureDataNavEdgeFunction )(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)
 A function to generate a nav edge from a terrain feature. More...
 
typedef bool(* GeneralNavEdgeFunction )(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)
 A function to generate nav edges on a given sector. More...
 
typedef std::pair
< DynamicTerrainNavEdgeFunction,
void * > 
DynamicTerrainNavEdgeFunctionInfo
 
typedef std::pair
< FeatureDataNavEdgeFunction,
void * > 
FeatureDataNavEdgeFunctionInfo
 
typedef std::pair
< GeneralNavEdgeFunction, void * > 
GeneralNavEdgeFunctionInfo
 
typedef bool(* DynamicTerrainNavPointFunction )(const DtRwDynamicTerrainInformation &dynTerrInfo, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)
 A function to generate a nav point from a dynamic terrain feature. More...
 
typedef bool(* FeatureDataNavPointFunction )(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)
 A function to generate a nav point from a terrain feature. More...
 
typedef bool(* GeneralNavPointFunction )(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)
 A function to generate nav points on a given sector. More...
 
typedef std::pair
< DynamicTerrainNavPointFunction,
void * > 
DynamicTerrainNavPointFunctionInfo
 
typedef std::pair
< FeatureDataNavPointFunction,
void * > 
FeatureDataNavPointFunctionInfo
 
typedef std::pair
< GeneralNavPointFunction,
void * > 
GeneralNavPointFunctionInfo
 

Public Member Functions

virtual ~DtNavDataGenerator ()
 Destructor. More...
 
virtual bool initialize (DtTerrainInterface *terrainInterface, const DtFilename &navGenConfigFile, const DtFilename &runtimeConfigFile, const DtFilename &outputPath, const DtFilename &terrainFile, bool generateFeatureTagVolumes)
 Initializer. Must be called prior to calling any generate function. Returns true on success. More...
 
void addNavEdgeFromDynamicTerrainFunction (const DtString &name, DynamicTerrainNavEdgeFunction fcn, void *usr)
 Registers a function to be used to generate nav edges from dynamic terrain features. More...
 
void addNavEdgeFromFeatureDataFunction (const DtString &name, FeatureDataNavEdgeFunction fcn, void *usr)
 Registers a function to be used to generate nav edges from terrain feature data. More...
 
void addGeneralNavEdgeFunction (const DtString &name, GeneralNavEdgeFunction fcn, void *usr)
 Registers a function to be used to generate nav edges. More...
 
void addNavPointFromDynamicTerrainFunction (const DtString &name, DynamicTerrainNavPointFunction fcn, void *usr)
 Registers a function to be used to generate nav points from dynamic terrain features. More...
 
void addNavPointFromFeatureDataFunction (const DtString &name, FeatureDataNavPointFunction fcn, void *usr)
 Registers a function to be used to generate nav points from terrain feature data. More...
 
void addGeneralNavPointFunction (const DtString &name, GeneralNavPointFunction fcn, void *usr)
 Registers a function to be used to generate nav points. More...
 
virtual void setTransitionPointSpacing (double spacing)
 Sets the spacing between transition points. Default is 3 m. More...
 
virtual double transitionPointSpacing () const
 Gets the spacing between transition points. More...
 
virtual bool generate ()
 Generate full nav data to output files. More...
 
virtual bool generateSector (const DtNavSectorName &sectorName)
 Generate nav data for a specific sector. More...
 
virtual SectorGenerationStatus getGenerateSectorStatus (const DtNavSectorName &sectorName, NavDataOutputMap &outputNavData)
 Gets the status of sector generation. More...
 
virtual const
DtRwNavigationProfile
profileConfig (const DtString &profileName) const
 Returns the profile configuration for the profile matching the specified name. More...
 
virtual const DtRwNavGenConfignavGenConfig () const
 Returns the nav generation configuration. More...
 
virtual const DtTerrainInterfaceterrainInterface () const
 Returns the terrain interface. More...
 
MAKVRinTerra::DtFeatureGeometryextentFeatureGeometry ()
 Returns a feature geometry of the nav area extents. More...
 
MAKVRinTerra::DtFeatureGeometryextentFeatureGeometry (int sectorX, int sectorY)
 Returns a feature geometry of the nav sector extents. More...
 
virtual bool terrainHeight (const DtPoint &p, double &height, double *min=0, double *max=0) const
 Gets terrain height at point p. More...
 

Static Public Member Functions

static DtNavDataGeneratorcreate ()
 Creates a new DtNavDataGenerator. More...
 
static void setCreator (DtNavDataGeneratorCreatorFcn creatorFcn)
 Sets the creator function. More...
 
static void setNavDataDirectory (const DtFilename &navDataDir)
 Set the navData directory. Default is /navData. More...
 
static const DtFilename & navDataDirectory ()
 Get the navData directory. More...
 
static DtFilename replaceSubstrings (const DtFilename &original)
 Replaces substrings such as $(nav-data-dir) in any file paths with the actual file path. More...
 

Static Public Attributes

static const double LowCoverHeightCheck
 
static const double HighCoverHeightCheck
 
static const unsigned NumCoverCheckAngles
 
static const double CoverChordLengthFactor
 

Protected Member Functions

 DtNavDataGenerator ()
 Constructor. More...
 
virtual void loadPlugins (const std::set< DtFilename > &pluginFiles)
 Loads the specified plugins. More...
 
virtual void unloadPlugins ()
 Unloads previously loaded plugins. More...
 
virtual bool checkPluginVersion (DtDynamicLibrary *plugin) const
 Verifies the plugin version is correct. More...
 
virtual void doGenerateSector (SectorGenerationThreadInfo *sectorGenInfo)
 Performs sector generation in a separate thread. More...
 
virtual bool shouldStop (SectorGenerationThreadInfo *sectorGenInfo)
 Returns true if the thread should stop. More...
 
virtual std::vector< DtVectorcalculateTransitionPointLocations ()
 Finds transition point locations for exiting the nav area. More...
 
virtual void getProfileRandomIds (DtRwStringList &profiles, ProfileRandomIdMap &randomIds)
 Finds existing random identifiers for each profile, or generates them if necessary. More...
 
virtual bool generateProfileNavData (const DtRwNavigationProfile *profile, DtString randomId)
 Generates nav data to a file for a specified profile. More...
 
virtual bool generateSectorNavData (const DtRwNavigationProfile *profile, const DtNavSectorName &sectorName, NavDataOutputMap &outputData, SectorGenerationThreadInfo *sectorGenInfo=0)
 Generates nav data to memory for specified sector. More...
 
virtual bool generateTransitionPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 Generates transition points for the entire nav area for the specified profile and saves the output to the specified directory. More...
 
virtual bool generateSectorTransitionPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorSector *sector, const DtString &randomId, const DtFilename &navDataOutputDir=DtFilename::nullFilename(), std::vector< char > *buffer=0, SectorGenerationThreadInfo *sectorGenInfo=0)
 Generates transition points for a single sector for the specified profile. More...
 
virtual bool generateCoverPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 Generates cover points for the entire nav area for the specified profile and saves the output to the specified directory. More...
 
virtual bool generateSectorCoverPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorSector *sector, const DtString &randomId, const DtFilename &navDataOutputDir=DtFilename::nullFilename(), std::vector< char > *buffer=0, SectorGenerationThreadInfo *sectorGenInfo=0)
 Generates cover points for a single sector for the specified profile. More...
 
virtual bool generateNavEdges (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 Generates nav edges for the entire nav area for the specified profile and saves the output to the specified directory. More...
 
virtual bool generateSectorNavEdges (const DtRwNavigationProfile *profile, Kaim::GeneratorSector *sector, const DtString &randomId, const DtFilename &navDataOutputDir=DtFilename::nullFilename(), std::vector< char > *buffer=0, SectorGenerationThreadInfo *sectorGenInfo=0)
 Generates nav edges for a single sector for the specified profile. More...
 
virtual bool computeSectorNavEdges (const DtRwNavigationProfile *profile, int sectorX, int sectorY, const DtExtent &sectorExtent, SectorGenerationThreadInfo *sectorGenInfo, std::list< NavEdgePoints > &navEdges)
 Computes nav edges for a single sector. More...
 
virtual bool generateNavPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 Generates nav points for the entire nav area for the specified profile and saves the output to the specified directory. More...
 
virtual bool generateSectorNavPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorSector *sector, const DtString &randomId, const DtFilename &navDataOutputDir=DtFilename::nullFilename(), std::vector< char > *buffer=0, SectorGenerationThreadInfo *sectorGenInfo=0)
 Generates nav points for a single sector for the specified profile. More...
 
virtual bool computeSectorNavPoints (const DtRwNavigationProfile *profile, int sectorX, int sectorY, const DtExtent &sectorExtent, SectorGenerationThreadInfo *sectorGenInfo, std::list< NavPoint > &navPoints)
 Computes nav points for a single sector. More...
 
virtual void setNumberOfProgressSteps (int steps)
 These methods are used to output specially formated progress strings. More...
 
virtual void nextProgressStep (const DtString &stepName, int numSubSteps=0)
 
virtual void nextProgressSubStep ()
 
virtual void progressComplete ()
 
virtual void outputProgress (const DtString &stepName=DtString::nullString())
 
virtual DtOutputStream & detailOutput ()
 These methods should be used instead of the standard VRL output streams. More...
 
virtual DtOutputStream & milestoneOutput ()
 Used to output important milestones in generation process. Font is large in GUI. More...
 
virtual DtOutputStream & notableOutput ()
 Used to output notable occurrences. Font is larger than normal, but smaller than milestone. More...
 
virtual DtOutputStream & errorOutput ()
 Used to output errors. More...
 

Protected Attributes

DtRwNavRuntimeConfig myNavRuntimeConfig
 The runtime configuration for the nav. More...
 
DtTerrainInterfacemyTerrainInterface
 The terrain interface for the terrain on which nav data is being generated. More...
 
DtNavigationGeneratorInput myNavGenInput
 The current input for the navigation generator. More...
 
RwMutex myNavGenInputMutex
 Mutex for myNavGenInput. More...
 
DtFilename myNavGenConfigFile
 The path of the navigation generator config file. More...
 
DtFilename myRuntimeConfigFile
 The path of the runtime config file. More...
 
DtFilename myOutputPath
 Where nav data files should be generated. More...
 
DtFilename myTerrainFile
 The terrain file for which nav data is being generated. More...
 
DtFeatureTagVolumeGeneratormyFeatureTagVolumeGenerator
 Whether feature tags will be generated. More...
 
RwMutex myFeatureTagVolumeGeneratorMutex
 Mutex for myFeatureTagVolumeGenerator. More...
 
double myTransitionPointSpacing
 The spacing to be used between transition points for exiting the nav area. More...
 
SectorGenerationThreadMap mySectorThreads
 Sector generation threads by sector name. More...
 
MAKVRinTerra::DtFeatureGeometry myExtentFeatureGeometry
 The nav area extents as a feature geometry. More...
 
bool myIsInitialized
 Indicates whether initialize() has been successfully called. More...
 
int myNumberOfProgressSteps
 
int myNumberOfProgressSubSteps
 
int myCurrentProgressStep
 
int myCurrentProgressSubStep
 
std::map< DtString,
DynamicTerrainNavEdgeFunctionInfo
myDynamicTerrainNavEdgeFunctions
 Functions used to create nav edges from dynamic terrain features. More...
 
std::map< DtString,
FeatureDataNavEdgeFunctionInfo
myFeatureDataNavEdgeFunctions
 Functions used to create nav edges from terrain feature data. More...
 
std::map< DtString,
GeneralNavEdgeFunctionInfo
myGeneralNavEdgeFunctions
 Functions used to create nav edges using a user defined algorithm that does not use dynamic terrain features or terrain feature data. More...
 
std::map< DtString,
DynamicTerrainNavPointFunctionInfo
myDynamicTerrainNavPointFunctions
 Functions used to create nav points from dynamic terrain features. More...
 
std::map< DtString,
FeatureDataNavPointFunctionInfo
myFeatureDataNavPointFunctions
 Functions used to create nav points from terrain feature data. More...
 
std::map< DtString,
GeneralNavPointFunctionInfo
myGeneralNavPointFunctions
 Functions used to create nav points using a user defined algorithm that does not use dynamic terrain features or terrain feature data. More...
 
DtClock myClock
 
std::list< DtDynamicLibrary * > myLoadedPlugins
 
tbb::task_arena myArena
 Tbb arena to limit number of threads. More...
 

Static Protected Attributes

static Mutex theNavDataGenMutex
 Mutex for the period when data is actually being generated. More...
 
static DtFilename theNavDataDir
 
static DtNavDataGeneratorCreatorFcn theCreatorFcn
 

Private Member Functions

 DtNavDataGenerator (const DtNavDataGenerator &)
 Not implemented. More...
 
DtNavDataGeneratoroperator= (const DtNavDataGenerator &orig)
 Not implemented. More...
 

Friends

class TbbintersectTransitionPoint
 
virtual void processTriangle (DtTerrainTriangleStruct &triangle, DtNavTriangles &triangles)
 
static void triangleCallback (DtTerrainTriangleStruct &triangle, void *usr)
 Callback to handle processing of a triangle for nav generation. More...
 
virtual void processTrianglesFinalize (int status, DtNavTriangles &triangles)
 
static void trianglesFinalizeCallback (int status, void *usr)
 Callback to handle finalization of triangle processing for nav generation. More...
 

Detailed Description

This class is used to generate nav data for an area on a terrain.

Member Typedef Documentation

typedef tbb::queuing_rw_mutex DtNavDataGenerator::RwMutex
typedef tbb::mutex DtNavDataGenerator::Mutex
typedef DtNavDataGenerator*(* DtNavDataGenerator::DtNavDataGeneratorCreatorFcn)()
typedef bool(* DtNavDataGenerator::DynamicTerrainNavEdgeFunction)(const DtRwDynamicTerrainInformation &dynTerrInfo, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)

A function to generate a nav edge from a dynamic terrain feature.

For every dynamic terrain feature of a configured type (specified in the navigation profile), a registered function will be called to produce a new nav edge. The function is provided the dynamic terrain feature information, the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the edge. The edges parameter should be updated to add any new nav edges that should be generated. Should return true if any edges were added and false otherwise.

typedef bool(* DtNavDataGenerator::FeatureDataNavEdgeFunction)(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)

A function to generate a nav edge from a terrain feature.

For every terrain feature of a configured type (specified in the navigation profile), a registered function will be called to produce a new nav edge. The function is provided the terrain feature information, the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the edge. The edges parameter should be updated to add any new nav edges that should be generated. Should return true if any edges were added and false otherwise.

typedef bool(* DtNavDataGenerator::GeneralNavEdgeFunction)(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, void *usr)

A function to generate nav edges on a given sector.

This is a general function that is not based on terrain feature data or dynamic terrain features, and can be used to implement a new custom algorithm. When enabled in the navigation profile, the function will be called once for each sector. The function is provided the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the edge. The edges parameter should be updated to add any new nav edges that should be generated. Should return true if any edges were added and false otherwise.

typedef bool(* DtNavDataGenerator::DynamicTerrainNavPointFunction)(const DtRwDynamicTerrainInformation &dynTerrInfo, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)

A function to generate a nav point from a dynamic terrain feature.

For every dynamic terrain feature of a configured type (specified in the navigation profile), a registered function will be called to produce a new nav point. The function is provided the dynamic terrain feature information, the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the point. The points parameter should be updated to add any new nav points that should be generated. Should return true if any points were added and false otherwise.

typedef bool(* DtNavDataGenerator::FeatureDataNavPointFunction)(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)

A function to generate a nav point from a terrain feature.

For every terrain feature of a configured type (specified in the navigation profile), a registered function will be called to produce a new nav point. The function is provided the terrain feature information, the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the point. The points parameter should be updated to add any new nav points that should be generated. Should return true if any points were added and false otherwise.

typedef bool(* DtNavDataGenerator::GeneralNavPointFunction)(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, void *usr)

A function to generate nav points on a given sector.

This is a general function that is not based on terrain feature data or dynamic terrain features, and can be used to implement a new custom algorithm. When enabled in the navigation profile, the function will be called once for each sector. The function is provided the DtNavDataGenerator, the sector coordinates, and a recommended tag to be used for the point. The points parameter should be updated to add any new nav points that should be generated. Should return true if any points were added and false otherwise.

Member Enumeration Documentation

Enumerator
GenerationNotRequested 
GenerationInProgress 
GenerationSucceeded 
GenerationFailed 
GenerationStopped 

Constructor & Destructor Documentation

virtual DtNavDataGenerator::~DtNavDataGenerator ( )
virtual

Destructor.

DtNavDataGenerator::DtNavDataGenerator ( )
protected

Constructor.

Protected since the DtNavDataGenerator should only be created using the create function.

DtNavDataGenerator::DtNavDataGenerator ( const DtNavDataGenerator )
private

Not implemented.

Member Function Documentation

static DtNavDataGenerator* DtNavDataGenerator::create ( )
static

Creates a new DtNavDataGenerator.

If a creator function has been specified in setCreator it will be used. Otherwise creates a DtNavDataGenerator.

virtual bool DtNavDataGenerator::initialize ( DtTerrainInterface terrainInterface,
const DtFilename &  navGenConfigFile,
const DtFilename &  runtimeConfigFile,
const DtFilename &  outputPath,
const DtFilename &  terrainFile,
bool  generateFeatureTagVolumes 
)
virtual

Initializer. Must be called prior to calling any generate function. Returns true on success.

void DtNavDataGenerator::addNavEdgeFromDynamicTerrainFunction ( const DtString name,
DynamicTerrainNavEdgeFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav edges from dynamic terrain features.

The navigation profiles can specify types of dynamic terrain features that should result in nav edge generation. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

void DtNavDataGenerator::addNavEdgeFromFeatureDataFunction ( const DtString name,
FeatureDataNavEdgeFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav edges from terrain feature data.

The navigation profiles can specify types of terrain features that should result in nav edge generation. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

void DtNavDataGenerator::addGeneralNavEdgeFunction ( const DtString name,
GeneralNavEdgeFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav edges.

The navigation profiles can specify any general nav edge functions that should be called. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

void DtNavDataGenerator::addNavPointFromDynamicTerrainFunction ( const DtString name,
DynamicTerrainNavPointFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav points from dynamic terrain features.

The navigation profiles can specify types of dynamic terrain features that should result in nav point generation. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

void DtNavDataGenerator::addNavPointFromFeatureDataFunction ( const DtString name,
FeatureDataNavPointFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav points from terrain feature data.

The navigation profiles can specify types of terrain features that should result in nav point generation. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

void DtNavDataGenerator::addGeneralNavPointFunction ( const DtString name,
GeneralNavPointFunction  fcn,
void *  usr 
)

Registers a function to be used to generate nav points.

The navigation profiles can specify any general nav point functions that should be called. The profile specifies the function to be called, by a unique name, but the function must be registered using this method.

virtual void DtNavDataGenerator::setTransitionPointSpacing ( double  spacing)
virtual

Sets the spacing between transition points. Default is 3 m.

virtual double DtNavDataGenerator::transitionPointSpacing ( ) const
virtual

Gets the spacing between transition points.

virtual bool DtNavDataGenerator::generate ( )
virtual

Generate full nav data to output files.

Generation occurs in main thread, all other generation operations will be locked out until this call finishes. This is not intended to be called at runtime, but instead during offline generation.

virtual bool DtNavDataGenerator::generateSector ( const DtNavSectorName sectorName)
virtual

Generate nav data for a specific sector.

Generation occurs in a separate thread. To check progress and retrieve the resulting data, call getGenerateSectorStatus(sectorName).

virtual SectorGenerationStatus DtNavDataGenerator::getGenerateSectorStatus ( const DtNavSectorName sectorName,
NavDataOutputMap outputNavData 
)
virtual

Gets the status of sector generation.

If generation completed successfully, the outputNavData will be filled with the resulting nav data.

virtual const DtRwNavigationProfile* DtNavDataGenerator::profileConfig ( const DtString profileName) const
virtual

Returns the profile configuration for the profile matching the specified name.

virtual const DtRwNavGenConfig* DtNavDataGenerator::navGenConfig ( ) const
virtual

Returns the nav generation configuration.

virtual const DtTerrainInterface* DtNavDataGenerator::terrainInterface ( ) const
virtual

Returns the terrain interface.

MAKVRinTerra::DtFeatureGeometry& DtNavDataGenerator::extentFeatureGeometry ( )

Returns a feature geometry of the nav area extents.

MAKVRinTerra::DtFeatureGeometry& DtNavDataGenerator::extentFeatureGeometry ( int  sectorX,
int  sectorY 
)

Returns a feature geometry of the nav sector extents.

virtual bool DtNavDataGenerator::terrainHeight ( const DtPoint p,
double height,
double min = 0,
double max = 0 
) const
virtual

Gets terrain height at point p.

Returns true if terrain intersection was found. If min or max are supplied they are updated if a value is found.

static void DtNavDataGenerator::setCreator ( DtNavDataGeneratorCreatorFcn  creatorFcn)
static

Sets the creator function.

static void DtNavDataGenerator::setNavDataDirectory ( const DtFilename &  navDataDir)
static

Set the navData directory. Default is /navData.

static const DtFilename& DtNavDataGenerator::navDataDirectory ( )
static

Get the navData directory.

static DtFilename DtNavDataGenerator::replaceSubstrings ( const DtFilename &  original)
static

Replaces substrings such as $(nav-data-dir) in any file paths with the actual file path.

virtual void DtNavDataGenerator::loadPlugins ( const std::set< DtFilename > &  pluginFiles)
protectedvirtual

Loads the specified plugins.

virtual void DtNavDataGenerator::unloadPlugins ( )
protectedvirtual

Unloads previously loaded plugins.

virtual bool DtNavDataGenerator::checkPluginVersion ( DtDynamicLibrary *  plugin) const
protectedvirtual

Verifies the plugin version is correct.

virtual void DtNavDataGenerator::doGenerateSector ( SectorGenerationThreadInfo sectorGenInfo)
protectedvirtual

Performs sector generation in a separate thread.

virtual bool DtNavDataGenerator::shouldStop ( SectorGenerationThreadInfo sectorGenInfo)
protectedvirtual

Returns true if the thread should stop.

Will also clean up sectorGenInfo if its threadShouldCleanUp flag is true.

static void DtNavDataGenerator::triangleCallback ( DtTerrainTriangleStruct triangle,
void *  usr 
)
staticprotected

Callback to handle processing of a triangle for nav generation.

virtual void DtNavDataGenerator::processTriangle ( DtTerrainTriangleStruct triangle,
DtNavTriangles triangles 
)
protectedvirtual
static void DtNavDataGenerator::trianglesFinalizeCallback ( int  status,
void *  usr 
)
staticprotected

Callback to handle finalization of triangle processing for nav generation.

virtual void DtNavDataGenerator::processTrianglesFinalize ( int  status,
DtNavTriangles triangles 
)
protectedvirtual
virtual std::vector<DtVector> DtNavDataGenerator::calculateTransitionPointLocations ( )
protectedvirtual

Finds transition point locations for exiting the nav area.

virtual void DtNavDataGenerator::getProfileRandomIds ( DtRwStringList profiles,
ProfileRandomIdMap randomIds 
)
protectedvirtual

Finds existing random identifiers for each profile, or generates them if necessary.

virtual bool DtNavDataGenerator::generateProfileNavData ( const DtRwNavigationProfile profile,
DtString  randomId 
)
protectedvirtual

Generates nav data to a file for a specified profile.

virtual bool DtNavDataGenerator::generateSectorNavData ( const DtRwNavigationProfile profile,
const DtNavSectorName sectorName,
NavDataOutputMap outputData,
SectorGenerationThreadInfo sectorGenInfo = 0 
)
protectedvirtual

Generates nav data to memory for specified sector.

virtual bool DtNavDataGenerator::generateTransitionPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorInputOutput &  generatorInputOutput,
const DtString randomId,
const DtFilename &  navDataOutputDir 
)
protectedvirtual

Generates transition points for the entire nav area for the specified profile and saves the output to the specified directory.

virtual bool DtNavDataGenerator::generateSectorTransitionPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorSector *  sector,
const DtString randomId,
const DtFilename &  navDataOutputDir = DtFilename::nullFilename(),
std::vector< char > *  buffer = 0,
SectorGenerationThreadInfo sectorGenInfo = 0 
)
protectedvirtual

Generates transition points for a single sector for the specified profile.

Output can be saved to a file if output directory is specified and/or to a buffer if it is specified.

virtual bool DtNavDataGenerator::generateCoverPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorInputOutput &  generatorInputOutput,
const DtString randomId,
const DtFilename &  navDataOutputDir 
)
protectedvirtual

Generates cover points for the entire nav area for the specified profile and saves the output to the specified directory.

virtual bool DtNavDataGenerator::generateSectorCoverPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorSector *  sector,
const DtString randomId,
const DtFilename &  navDataOutputDir = DtFilename::nullFilename(),
std::vector< char > *  buffer = 0,
SectorGenerationThreadInfo sectorGenInfo = 0 
)
protectedvirtual

Generates cover points for a single sector for the specified profile.

Output can be saved to a file if output directory is specified and/or to a buffer if it is specified.

virtual bool DtNavDataGenerator::generateNavEdges ( const DtRwNavigationProfile profile,
Kaim::GeneratorInputOutput &  generatorInputOutput,
const DtString randomId,
const DtFilename &  navDataOutputDir 
)
protectedvirtual

Generates nav edges for the entire nav area for the specified profile and saves the output to the specified directory.

virtual bool DtNavDataGenerator::generateSectorNavEdges ( const DtRwNavigationProfile profile,
Kaim::GeneratorSector *  sector,
const DtString randomId,
const DtFilename &  navDataOutputDir = DtFilename::nullFilename(),
std::vector< char > *  buffer = 0,
SectorGenerationThreadInfo sectorGenInfo = 0 
)
protectedvirtual

Generates nav edges for a single sector for the specified profile.

Output can be saved to a file if output directory is specified and/or to a buffer if it is specified.

virtual bool DtNavDataGenerator::computeSectorNavEdges ( const DtRwNavigationProfile profile,
int  sectorX,
int  sectorY,
const DtExtent sectorExtent,
SectorGenerationThreadInfo sectorGenInfo,
std::list< NavEdgePoints > &  navEdges 
)
protectedvirtual

Computes nav edges for a single sector.

virtual bool DtNavDataGenerator::generateNavPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorInputOutput &  generatorInputOutput,
const DtString randomId,
const DtFilename &  navDataOutputDir 
)
protectedvirtual

Generates nav points for the entire nav area for the specified profile and saves the output to the specified directory.

virtual bool DtNavDataGenerator::generateSectorNavPoints ( const DtRwNavigationProfile profile,
Kaim::GeneratorSector *  sector,
const DtString randomId,
const DtFilename &  navDataOutputDir = DtFilename::nullFilename(),
std::vector< char > *  buffer = 0,
SectorGenerationThreadInfo sectorGenInfo = 0 
)
protectedvirtual

Generates nav points for a single sector for the specified profile.

Output can be saved to a file if output directory is specified and/or to a buffer if it is specified.

virtual bool DtNavDataGenerator::computeSectorNavPoints ( const DtRwNavigationProfile profile,
int  sectorX,
int  sectorY,
const DtExtent sectorExtent,
SectorGenerationThreadInfo sectorGenInfo,
std::list< NavPoint > &  navPoints 
)
protectedvirtual

Computes nav points for a single sector.

virtual void DtNavDataGenerator::setNumberOfProgressSteps ( int  steps)
protectedvirtual

These methods are used to output specially formated progress strings.

virtual void DtNavDataGenerator::nextProgressStep ( const DtString stepName,
int  numSubSteps = 0 
)
protectedvirtual
virtual void DtNavDataGenerator::nextProgressSubStep ( )
protectedvirtual
virtual void DtNavDataGenerator::progressComplete ( )
protectedvirtual
virtual void DtNavDataGenerator::outputProgress ( const DtString stepName = DtString::nullString())
protectedvirtual
virtual DtOutputStream& DtNavDataGenerator::detailOutput ( )
protectedvirtual

These methods should be used instead of the standard VRL output streams.

Add formatting text for use in GUI.Used to output detailed generation info. Should be used for most general status updates.

virtual DtOutputStream& DtNavDataGenerator::milestoneOutput ( )
protectedvirtual

Used to output important milestones in generation process. Font is large in GUI.

virtual DtOutputStream& DtNavDataGenerator::notableOutput ( )
protectedvirtual

Used to output notable occurrences. Font is larger than normal, but smaller than milestone.

virtual DtOutputStream& DtNavDataGenerator::errorOutput ( )
protectedvirtual

Used to output errors.

DtNavDataGenerator& DtNavDataGenerator::operator= ( const DtNavDataGenerator orig)
private

Not implemented.

Friends And Related Function Documentation

friend class TbbintersectTransitionPoint
friend

Member Data Documentation

const double DtNavDataGenerator::LowCoverHeightCheck
static
const double DtNavDataGenerator::HighCoverHeightCheck
static
const unsigned DtNavDataGenerator::NumCoverCheckAngles
static
const double DtNavDataGenerator::CoverChordLengthFactor
static
DtRwNavRuntimeConfig DtNavDataGenerator::myNavRuntimeConfig
protected

The runtime configuration for the nav.

DtTerrainInterface* DtNavDataGenerator::myTerrainInterface
protected

The terrain interface for the terrain on which nav data is being generated.

DtNavigationGeneratorInput DtNavDataGenerator::myNavGenInput
protected

The current input for the navigation generator.

RwMutex DtNavDataGenerator::myNavGenInputMutex
mutableprotected

Mutex for myNavGenInput.

Mutex DtNavDataGenerator::theNavDataGenMutex
staticprotected

Mutex for the period when data is actually being generated.

DtFilename DtNavDataGenerator::myNavGenConfigFile
protected

The path of the navigation generator config file.

DtFilename DtNavDataGenerator::myRuntimeConfigFile
protected

The path of the runtime config file.

DtFilename DtNavDataGenerator::myOutputPath
protected

Where nav data files should be generated.

DtFilename DtNavDataGenerator::myTerrainFile
protected

The terrain file for which nav data is being generated.

DtFeatureTagVolumeGenerator* DtNavDataGenerator::myFeatureTagVolumeGenerator
protected

Whether feature tags will be generated.

RwMutex DtNavDataGenerator::myFeatureTagVolumeGeneratorMutex
mutableprotected
double DtNavDataGenerator::myTransitionPointSpacing
protected

The spacing to be used between transition points for exiting the nav area.

Default is 3.

SectorGenerationThreadMap DtNavDataGenerator::mySectorThreads
protected

Sector generation threads by sector name.

MAKVRinTerra::DtFeatureGeometry DtNavDataGenerator::myExtentFeatureGeometry
protected

The nav area extents as a feature geometry.

bool DtNavDataGenerator::myIsInitialized
protected

Indicates whether initialize() has been successfully called.

int DtNavDataGenerator::myNumberOfProgressSteps
protected
int DtNavDataGenerator::myNumberOfProgressSubSteps
protected
int DtNavDataGenerator::myCurrentProgressStep
protected
int DtNavDataGenerator::myCurrentProgressSubStep
protected
std::map<DtString, DynamicTerrainNavEdgeFunctionInfo> DtNavDataGenerator::myDynamicTerrainNavEdgeFunctions
protected

Functions used to create nav edges from dynamic terrain features.

std::map<DtString, FeatureDataNavEdgeFunctionInfo> DtNavDataGenerator::myFeatureDataNavEdgeFunctions
protected

Functions used to create nav edges from terrain feature data.

std::map<DtString, GeneralNavEdgeFunctionInfo> DtNavDataGenerator::myGeneralNavEdgeFunctions
protected

Functions used to create nav edges using a user defined algorithm that does not use dynamic terrain features or terrain feature data.

std::map<DtString, DynamicTerrainNavPointFunctionInfo> DtNavDataGenerator::myDynamicTerrainNavPointFunctions
protected

Functions used to create nav points from dynamic terrain features.

std::map<DtString, FeatureDataNavPointFunctionInfo> DtNavDataGenerator::myFeatureDataNavPointFunctions
protected

Functions used to create nav points from terrain feature data.

std::map<DtString, GeneralNavPointFunctionInfo> DtNavDataGenerator::myGeneralNavPointFunctions
protected

Functions used to create nav points using a user defined algorithm that does not use dynamic terrain features or terrain feature data.

DtClock DtNavDataGenerator::myClock
protected
std::list<DtDynamicLibrary*> DtNavDataGenerator::myLoadedPlugins
protected
DtFilename DtNavDataGenerator::theNavDataDir
staticprotected
DtNavDataGeneratorCreatorFcn DtNavDataGenerator::theCreatorFcn
staticprotected
tbb::task_arena DtNavDataGenerator::myArena
protected

Tbb arena to limit number of threads.


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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)