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 | 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.

Related Examples

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 DtRwTemplatedListPtr
< DtRwNavigationProfile, true > 
ProfileConfigList
 
typedef DtNavDataGenerator *(* DtNavDataGeneratorCreatorFcn )()
 
typedef bool(* DynamicTerrainNavEdgeFunction )(const DtRwDynamicTerrainInformation &dynTerrInfo, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, SectorGenerationThreadInfo *threadInfo, void *usr)
 
typedef bool(* FeatureDataNavEdgeFunction )(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, SectorGenerationThreadInfo *threadInfo, void *usr)
 
typedef bool(* GeneralNavEdgeFunction )(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned edgeTag, std::list< NavEdgePoints > *edges, SectorGenerationThreadInfo *threadInfo, void *usr)
 
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, SectorGenerationThreadInfo *threadInfo, void *usr)
 
typedef bool(* FeatureDataNavPointFunction )(const MAKVRinTerra::DtFeature &feature, DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, SectorGenerationThreadInfo *threadInfo, void *usr)
 
typedef bool(* GeneralNavPointFunction )(DtNavDataGenerator *navGenerator, int sectorX, int sectorY, unsigned pointTag, std::list< NavPoint > *points, SectorGenerationThreadInfo *threadInfo, void *usr)
 
typedef std::pair
< DynamicTerrainNavPointFunction,
void * > 
DynamicTerrainNavPointFunctionInfo
 
typedef std::pair
< FeatureDataNavPointFunction,
void * > 
FeatureDataNavPointFunctionInfo
 
typedef std::pair
< GeneralNavPointFunction,
void * > 
GeneralNavPointFunctionInfo
 

Public Member Functions

virtual ~DtNavDataGenerator ()
 
virtual bool initialize (DtTerrainInterface *terrainInterface, const DtFilename &navGenConfigFile, const DtFilename &runtimeConfigFile, const DtFilename &outputPath, const DtFilename &terrainFile, const DtFilename &regenDirectory, bool generateFeatureTagVolumes)
 
void addNavEdgeFromDynamicTerrainFunction (const DtString &name, DynamicTerrainNavEdgeFunction fcn, void *usr)
 
void addNavEdgeFromFeatureDataFunction (const DtString &name, FeatureDataNavEdgeFunction fcn, void *usr)
 
void addGeneralNavEdgeFunction (const DtString &name, GeneralNavEdgeFunction fcn, void *usr)
 
void addNavPointFromDynamicTerrainFunction (const DtString &name, DynamicTerrainNavPointFunction fcn, void *usr)
 
void addNavPointFromFeatureDataFunction (const DtString &name, FeatureDataNavPointFunction fcn, void *usr)
 
void addGeneralNavPointFunction (const DtString &name, GeneralNavPointFunction fcn, void *usr)
 
virtual void setTransitionPointSpacing (double spacing)
 
virtual double transitionPointSpacing () const
 
virtual bool generate ()
 
virtual bool generateSector (const DtNavSectorName &sectorName)
 
virtual void stopGeneration ()
 
virtual SectorGenerationStatus getGenerateSectorStatus (const DtNavSectorName &sectorName, NavDataOutputMap &outputNavData)
 
virtual const
DtRwNavigationProfile
profileConfig (const DtString &profileName) const
 
virtual const ProfileConfigListprofileConfigs () const
 
virtual const DtRwNavGenConfignavGenConfig () const
 
virtual const DtTerrainInterfaceterrainInterface () const
 
MAKVRinTerra::DtFeatureGeometryextentFeatureGeometry ()
 
MAKVRinTerra::DtFeatureGeometryextentFeatureGeometry (int sectorX, int sectorY)
 
virtual bool terrainHeight (const DtPoint &p, double &height, double *min=0, double *max=0) const
 

Static Public Member Functions

static DtNavDataGeneratorcreate ()
 
static void setCreator (DtNavDataGeneratorCreatorFcn creatorFcn)
 
static void setNavDataDirectory (const DtFilename &navDataDir)
 
static const DtFilename & navDataDirectory ()
 
static DtFilename replaceSubstrings (const DtFilename &original)
 

Static Public Attributes

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

Protected Member Functions

 DtNavDataGenerator ()
 
virtual void loadPlugins (const std::set< DtFilename > &pluginFiles)
 
virtual void unloadPlugins ()
 
virtual bool checkPluginVersion (DtDynamicLibrary *plugin) const
 
virtual void doGenerateSector (SectorGenerationThreadInfo *sectorGenInfo)
 
virtual bool shouldStop (SectorGenerationThreadInfo *sectorGenInfo)
 
virtual std::vector< DtVectorcalculateTransitionPointLocations ()
 
virtual void getProfileRandomIds (DtRwStringList &profiles, ProfileRandomIdMap &randomIds)
 
virtual bool generateProfileNavData (const DtRwNavigationProfile *profile, DtString randomId)
 
virtual bool generateSectorNavData (const DtRwNavigationProfile *profile, const DtNavSectorName &sectorName, NavDataOutputMap &outputData, SectorGenerationThreadInfo *sectorGenInfo=0)
 
virtual bool generateTransitionPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 
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)
 
virtual bool generateCoverPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 
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)
 
virtual bool generateNavEdges (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 
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)
 
virtual bool computeSectorNavEdges (const DtRwNavigationProfile *profile, int sectorX, int sectorY, const DtExtent &sectorExtent, SectorGenerationThreadInfo *sectorGenInfo, std::list< NavEdgePoints > &navEdges)
 
virtual bool generateNavPoints (const DtRwNavigationProfile *profile, Kaim::GeneratorInputOutput &generatorInputOutput, const DtString &randomId, const DtFilename &navDataOutputDir)
 
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)
 
virtual bool computeSectorNavPoints (const DtRwNavigationProfile *profile, int sectorX, int sectorY, const DtExtent &sectorExtent, SectorGenerationThreadInfo *sectorGenInfo, std::list< NavPoint > &navPoints)
 
virtual void setNumberOfProgressSteps (int steps)
 
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 ()
 
virtual DtOutputStream & milestoneOutput ()
 
virtual DtOutputStream & notableOutput ()
 
virtual DtOutputStream & errorOutput ()
 

Protected Attributes

DtRwNavRuntimeConfig myNavRuntimeConfig
 
DtTerrainInterfacemyTerrainInterface
 
DtNavigationGeneratorInput myNavGenInput
 
RwMutex myNavGenInputMutex
 
DtFilename myNavGenConfigFile
 
DtFilename myRuntimeConfigFile
 
DtFilename myOutputPath
 
DtFilename myTerrainFile
 
DtFilename myRegenDirectory
 
DtFeatureTagVolumeGeneratormyFeatureTagVolumeGenerator
 
RwMutex myFeatureTagVolumeGeneratorMutex
 
double myTransitionPointSpacing
 
SectorGenerationThreadMap mySectorThreads
 
MAKVRinTerra::DtFeatureGeometry myExtentFeatureGeometry
 
bool myIsInitialized
 
int myNumberOfProgressSteps
 
int myNumberOfProgressSubSteps
 
int myCurrentProgressStep
 
int myCurrentProgressSubStep
 
std::map< DtString,
DynamicTerrainNavEdgeFunctionInfo
myDynamicTerrainNavEdgeFunctions
 
std::map< DtString,
FeatureDataNavEdgeFunctionInfo
myFeatureDataNavEdgeFunctions
 
std::map< DtString,
GeneralNavEdgeFunctionInfo
myGeneralNavEdgeFunctions
 
std::map< DtString,
DynamicTerrainNavPointFunctionInfo
myDynamicTerrainNavPointFunctions
 
std::map< DtString,
FeatureDataNavPointFunctionInfo
myFeatureDataNavPointFunctions
 
std::map< DtString,
GeneralNavPointFunctionInfo
myGeneralNavPointFunctions
 
DtClock myClock
 
std::list< DtDynamicLibrary * > myLoadedPlugins
 
tbb::task_arena myArena
 

Static Protected Attributes

static Mutex theNavDataGenMutex
 
static DtFilename theNavDataDir
 
static DtNavDataGeneratorCreatorFcn theCreatorFcn
 

Private Member Functions

 DtNavDataGenerator (const DtNavDataGenerator &)
 
DtNavDataGeneratoroperator= (const DtNavDataGenerator &orig)
 

Friends

class TbbintersectTransitionPoint
 
virtual void processTriangle (DtTerrainTriangleStruct &triangle, DtNavTriangles &triangles)
 
static void triangleCallback (DtTerrainTriangleStruct &triangle, void *usr)
 
virtual void processTrianglesFinalize (int status, DtNavTriangles &triangles)
 
static void trianglesFinalizeCallback (int status, void *usr)
 

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, SectorGenerationThreadInfo *threadInfo, 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, SectorGenerationThreadInfo *threadInfo, 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, SectorGenerationThreadInfo *threadInfo, 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, SectorGenerationThreadInfo *threadInfo, 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, SectorGenerationThreadInfo *threadInfo, 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, SectorGenerationThreadInfo *threadInfo, 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,
const DtFilename &  regenDirectory,
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 void DtNavDataGenerator::stopGeneration ( )
virtual

Stops all current nav data generation.

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 ProfileConfigList& DtNavDataGenerator::profileConfigs ( ) const
virtual

Returns a list of all profile configs for this nav area.

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

Callback to handle processing of a triangle for nav generation.

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

Callback to handle finalization of triangle processing for nav generation.

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

These methods are used to output specially formated progress strings.

virtual void DtNavDataGenerator::nextProgressSubStep ( )
protectedvirtual

These methods are used to output specially formated progress strings.

virtual void DtNavDataGenerator::progressComplete ( )
protectedvirtual

These methods are used to output specially formated progress strings.

virtual void DtNavDataGenerator::outputProgress ( const DtString stepName = DtString::nullString())
protectedvirtual

These methods are used to output specially formated progress strings.

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.

DtFilename DtNavDataGenerator::myRegenDirectory
protected

The directory in which we will regenerate nav data at runtime.

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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)