5 #include <unordered_map> 14 #include "PlatformSettings.h" 16 #include <NoiseSource.h> 17 #include <SceneLoadingSpecification.h> 47 std::unordered_map<std::string, std::shared_ptr<ScannerSettings>>
54 tinyxml2::XMLDocument
doc;
78 std::shared_ptr<Asset>
getAssetById(std::string type, std::string
id);
97 tinyxml2::XMLElement* element,
115 tinyxml2::XMLElement* assetNode
132 tinyxml2::XMLElement* paramsNode
141 tinyxml2::XMLElement* platformNode
150 tinyxml2::XMLElement* node
159 tinyxml2::XMLElement* scannerNode
168 tinyxml2::XMLElement* node
179 tinyxml2::XMLElement* node,
180 std::shared_ptr<FWFSettings> settings =
nullptr 190 tinyxml2::XMLElement* sceneNode,
200 tinyxml2::XMLElement* rotGroupNode
211 tinyxml2::XMLElement* node,
212 std::string attrPrefix
220 static std::shared_ptr<NoiseSource<double>>
222 tinyxml2::XMLElement *noise
std::shared_ptr< Scene > createSceneFromXml(tinyxml2::XMLElement *sceneNode, std::string path)
Create scene from given XML element (node)
Definition: XmlAssetsLoader.cpp:734
std::shared_ptr< Asset > getAssetById(std::string type, std::string id)
Get asset by its identifier.
Definition: XmlAssetsLoader.cpp:946
XmlAssetsLoader(std::string &filePath, std::string &assetsDir)
Build a XmlAssetsLoader for given XML file and assets directory.
Definition: XmlAssetsLoader.cpp:44
std::shared_ptr< Asset > getAssetByLocation(std::string type, std::string location)
Get asset by location.
Definition: XmlAssetsLoader.cpp:986
Definition: Rotation.h:80
Color4f createColorFromXml(tinyxml2::XMLElement *node)
Create a color from given XML element (node)
Definition: XmlAssetsLoader.cpp:106
Rotation createRotationFromXml(tinyxml2::XMLElement *rotGroupNode)
Create a rotation from given XML element (node)
Definition: XmlAssetsLoader.cpp:891
std::shared_ptr< PlatformSettings > createPlatformSettingsFromXml(tinyxml2::XMLElement *node)
Create platform settings from given XML element (node)
Definition: XmlAssetsLoader.cpp:314
std::string xmlDocFilePath
Path to the XML file.
Definition: XmlAssetsLoader.h:37
std::shared_ptr< ScannerSettings > createScannerSettingsFromXml(tinyxml2::XMLElement *node)
Create scanner settings from given XML element (node)
Definition: XmlAssetsLoader.cpp:560
Class representing a color with 4 float components: RGBA.
Definition: Color4f.h:6
Manually specify scene transformation filters to apply when loading a scene.
Definition: SceneLoadingSpecification.h:18
std::shared_ptr< Scanner > createScannerFromXml(tinyxml2::XMLElement *scannerNode)
Create scanner from given XML element (node)
Definition: XmlAssetsLoader.cpp:383
Class for asset loading from XML file.
Definition: XmlAssetsLoader.h:22
std::string xmlDocFilename
Name of the XML file.
Definition: XmlAssetsLoader.h:33
std::shared_ptr< FWFSettings > createFWFSettingsFromXml(tinyxml2::XMLElement *node, std::shared_ptr< FWFSettings > settings=nullptr)
Create FWF settings from given XML element (node)
Definition: XmlAssetsLoader.cpp:713
SceneLoadingSpecification sceneSpec
Scene loading specification.
Definition: XmlAssetsLoader.h:59
std::shared_ptr< Platform > createPlatformFromXml(tinyxml2::XMLElement *platformNode)
Create a platform from given XML element (node)
Definition: XmlAssetsLoader.cpp:193
std::map< std::string, ObjectT > createParamsFromXml(tinyxml2::XMLElement *paramsNode)
Create a map of parameters from given XML element (node)
Definition: XmlAssetsLoader.cpp:123
std::string assetsDir
Assets directory.
Definition: XmlAssetsLoader.h:29
std::shared_ptr< Asset > createAssetFromXml(std::string type, tinyxml2::XMLElement *assetNode)
Create an asset from given XML element (node)
Definition: XmlAssetsLoader.cpp:59
glm::dvec3 createVec3dFromXml(tinyxml2::XMLElement *node, std::string attrPrefix)
Create a 3D vector from given XML element (node)
Definition: XmlAssetsLoader.cpp:932
ObjectT getAttribute(tinyxml2::XMLElement *element, std::string attrName, std::string type, ObjectT defaultVal)
Obtain attribute from XML.
Definition: XmlAssetsLoader.cpp:1011
tinyxml2::XMLDocument doc
XML file through tinyxml2 library.
Definition: XmlAssetsLoader.h:54
static std::shared_ptr< NoiseSource< double > > createNoiseSource(tinyxml2::XMLElement *noise)
Create a noise source from given XML element (node)
Definition: XmlAssetsLoader.cpp:1082
std::unordered_map< std::string, std::shared_ptr< ScannerSettings > > scannerTemplates
Map containing all scanner templates that were loading while building from XML file. No repetitions, each template appears only one time.
Definition: XmlAssetsLoader.h:48