tools/NavGenProj/include/NavGenProjGeometry.h Source File
Go to the documentation of this file.
9 #ifndef GwNavGen_NavGenProjGeometry_H
10 #define GwNavGen_NavGenProjGeometry_H
42 void SetFileName(std::string geometryFileName)
44 m_fileName = geometryFileName;
47 void AddTerrainTypeMaterial(std::string materialName,
unsigned int terrainTypeMask)
64 std::string FileType()
66 std::string fileType =
"obj";
70 bool Read(TiXmlNode* node)
73 for (child = node->FirstChild(); child != 0; child = child->NextSibling())
75 NavGenProj::GetParam(child,
"filepath", m_fileName);
76 if (strcmp(child->Value(),
"TerrainTypeMaterials") == 0)
78 ReadTerrainTypeMaterialFolder(child);
82 ReadDeprecatedParam(child);
87 bool ReadTerrainTypeMaterialFolder(TiXmlNode* node)
90 for (child = node->FirstChild(); child != 0; child = child->NextSibling())
92 if (strcmp(child->Value(),
"TerrainTypeMaterial") == 0)
95 if (terrainTypeMaterial.Read(child))
104 bool Write(TiXmlNode* node)
107 TiXmlNode* geometryFolderNode = NavGenProj::GetOrCreateFolderNode(node,
"geometries");
110 TiXmlElement* geometryNode =
new TiXmlElement(
"geometry");
111 geometryFolderNode->LinkEndChild(geometryNode);
114 TiXmlElement* filePathNode =
new TiXmlElement(
"filepath");
115 geometryNode->LinkEndChild(filePathNode);
116 TiXmlText* text =
new TiXmlText(m_fileName.c_str());
117 filePathNode->LinkEndChild(text);
130 void ReadDeprecatedParam(TiXmlNode* child)
133 if(NavGenProj::GetParam(child,
"counterClockWise", tmp))
134 KY_LOG_WARNING((
"[counterClockWise] is deprecated"));
138 std::string m_fileName;
An instance of this class is used to represent each input geometry file in a NavGenProj.
Definition: NavGenProjGeometry.h:23
Definition: gamekitcrowddispersion.h:20
#define KY_ERROR
Shorthand for Kaim::Result::Failure.
Definition: types.h:272
Associate a Material with a TerrainType.
Definition: NavGenProjTerrainTypeMaterial.h:26
std::vector< NavGenProjTerrainTypeMaterial > m_terrainTypeMaterials
Stores the list of materials. Do not modify directly. Use AddTerrainTypeMaterial().
Definition: NavGenProjGeometry.h:144