9 #include "labengine/base/filesystem.h"
23 class MirroredOBJProducer;
31 class ProjClientInput;
32 class ProjMirrorOptions;
33 class ProjExclusiveGuids;
40 typedef LabEngine::PathUtilsString Path;
62 KyResult Generate(
const std::string& forcedOutputBaseDir,
const std::string& forcedRelativeOutputDir);
64 void SetIterativeRebuildFromGenIOMode(
const std::string& genIOFileName) { m_projConfig.
m_genIOFileName = genIOFileName; }
66 bool IsInIterativeRebuildFromGenIOMode()
const {
return !m_projConfig.
m_genIOFileName.empty(); }
68 void AddSector(std::unique_ptr<ProjSector> sector) { m_sectors.push_back(std::move(sector)); }
79 KyResult AddTagVolume(
const Vec3f* polylinePoints,
int pointArraySize,
const DynamicNavTag& navTag,
float minAltitude,
float maxAltitude);
93 void SetOutputDir(
const char* outputBaseDir,
const char* relativeOutputDir);
95 std::string GetRelativeOutputDir() {
return m_outputRelativeDir; }
96 std::string GetOutputBaseDir() {
return m_outputBaseDir; }
113 std::string GetGeometryFileName (
ProjSector* sector,
int index) {
return GetAbsolutePath(sector->GetGeometryFileName(index).c_str()); }
114 std::string GetClientInputFileName(
ProjSector* sector,
int index) {
return GetAbsolutePath(sector->GetClientInputFileName(index).c_str()); }
116 int GetSectorCount()
const {
return (
int)m_sectors.size(); }
117 ProjSector* GetSector(
int index) {
return m_sectors[index].get(); }
119 int GetSeedPointCount()
const;
120 const ProjSeedPoint& GetSeedPoint(
int index)
const;
123 void SetNavGenProjAbsPath(
const std::string& projAbsPath);
126 std::string GetAbsolutePath(
const std::string& path)
const;
128 std::string GetGenIOFileName()
131 return m_projPathStem +
".GenIO";
136 void ClearAllSpecificCellsToGenerate();
140 bool CanUseMirrorOptions() {
return m_sectors.size() == 1 && m_mirrorOptions.m_enabled; }
142 bool ReadProjectRoot(XmlNode root);
145 bool ReadOutputDir(XmlNode node);
146 bool ReadExclusiveSectors(XmlNode node);
147 bool ReadSectors(XmlNode node);
148 bool ReadSector(XmlNode node);
149 bool ReadTagVolumes(XmlNode node);
150 bool ReadTagVolume(XmlNode node);
151 bool ReadSeedPoints(XmlNode node);
152 bool ReadSeedPoint(XmlNode node);
154 KyResult GenerateMirroredObj(
const std::string& absoluteOutputBaseDir,
const std::string& relativeOutputDir);
155 KyResult GenerateObj(
const std::string& absoluteOutputBaseDir,
const std::string& relativeOutputDir);
157 Kaim::Ptr<Kaim::Generator> CreateGenerator(Kaim::Ptr<Kaim::GeneratorInputProducer> producer);
161 void InitGeneratorInputOutput(
Kaim::GeneratorInputOutput& genIO,
const std::string& absoluteOutputBaseDir,
const std::string& relativeOutputDir);
163 const std::string& relativeOutputDir);
168 std::vector<std::unique_ptr<ProjSector>> m_sectors;
169 std::vector<std::unique_ptr<ProjTagVolume>> m_tagVolumes;
170 std::vector<std::unique_ptr<ProjExclusiveGuids>> m_arrayOfExclusiveSectors;
171 std::vector<ProjSeedPoint> m_seedPoints;
179 std::string m_outputBaseDir;
180 std::string m_outputRelativeDir;
181 std::string m_projAbsDir;
182 std::string m_projPathStem;
This class is used by the NavGenProj to store configuration parameters required by the NavData genera...
Definition: ProjConfig.h:23
void SetAbstractGraphConfig(const GeneratorAbstractGraphParameters &abstractGraphParams)
Sets up the NavGenProjConfig that will be used when generating AbstractGraphs from this NavGenProj...
Definition: NavGenProj.cpp:243
KyResult Generate(const std::string &forcedOutputBaseDir, const std::string &forcedRelativeOutputDir)
Generates NavData NavGenProj.
Definition: NavGenProj.cpp:332
The NavGenProj class is a representation of the input data required for the standalone NavData genera...
Definition: NavGenProj.h:37
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
This class is used to store parameters if a sector must be mirrored cf. LabEngine::MirroredOBJProduce...
Definition: ProjMirrorOptions.h:15
This class maintains the mapping between the system of coordinate axes used by the client game engine...
Definition: coordsystem.h:119
The MirroredOBJProducer class is a concrete implementation of GeneratorInputProducer that can read th...
Definition: mirroredobjproducer.h:41
void SetDatabaseIndex(KyUInt32 dabaseIndex)
Set and get the database name and index for current generation.
Definition: NavGenProj.cpp:226
void AddExclusiveGuids(const KyGuid *guids, KyUInt32 guidsCount)
Add a exclusive guids.
Definition: NavGenProj.cpp:690
KyResult AddTagVolume(const Vec3f *polylinePoints, int pointArraySize, const DynamicNavTag &navTag, float minAltitude, float maxAltitude)
Adds a new tag volume to the NavGenProj.
Definition: NavGenProj.cpp:306
Navigation return code class.
Definition: types.h:108
An instance of this class is used to represent each input geometry file in a NavGenProj.
Definition: ProjSector.h:24
The GeneratorSector class provides a definition for a single sector to be treated by the Generator...
Definition: generatorsector.h:39
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:20
The GeneratorParameters class contains configuration parameters that control the characteristics of t...
Definition: generatorparameters.h:67
void AddSpecificCellToGenerate(int posx, int posy)
If at least one specific cell is added, the generation will only generate these cells.
Definition: NavGenProj.cpp:322
The GeneratorRunOptions class contains configuration parameters that control the way in which the Gen...
Definition: generatorrunoptions.h:43
void SetConfig(const GeneratorParameters ¶ms, const GeneratorRunOptions &runOptions, const CoordSystem &coordSystem)
Sets up the NavGenProjConfig that will be used when generating NavData from this NavGenProj.
Definition: NavGenProj.cpp:236
void AddSeedPoint(float x, float y, float z)
Add a seed point to the navGenProj.
Definition: NavGenProj.cpp:316
void SetOutputDir(const char *outputBaseDir, const char *relativeOutputDir)
Sets the outputDir, with a base path and a relative path, i.e where the Kaim::Generator outputs are w...
Definition: NavGenProj.cpp:220
std::string m_genIOFileName
.GenIO file to use based on the specified outputDir, m_generatorParams and m_generatorRunOptions will...
Definition: ProjConfig.h:34
KyResult Save(const std::string &fileName)
Saves the data in this NavGenProj object to a file on disk with the specified path and file name...
Definition: NavGenProj.cpp:245
void Clear()
Clears all information maintained by this object.
Definition: NavGenProj.cpp:48
KyResult Load(const std::string &fileName)
Loads the data contained in the .NavGenProj with the specified path and file name into this NavGenPro...
Definition: NavGenProj.cpp:198
3d vector using 32bits floating points.
Definition: vec3f.h:16
Definition: mirroredobjproducer.cpp:12