PeriDyno 1.0.0
Loading...
Searching...
No Matches
SceneLoaderXML.h
Go to the documentation of this file.
1#pragma once
2#include "Node.h"
4#include "tinyxml/tinyxml2.h"
5
6namespace dyno {
7
9 {
17
18 public:
19 std::shared_ptr<SceneGraph> load(const std::string filename) override;
20
21 bool save(std::shared_ptr<SceneGraph> scn, const std::string filename) override;
22
23 private:
24 std::shared_ptr<Node> processNode(tinyxml2::XMLElement* nodeXML);
25 std::shared_ptr<Module> processModule(tinyxml2::XMLElement* moduleXML);
26 bool addModule(std::shared_ptr<Node> node, std::shared_ptr<Module> module);
27
28 std::vector<std::string> split(std::string str, std::string pattern);
29
30 std::string encodeVec3f(const Vec3f v);
31 Vec3f decodeVec3f(const std::string str);
32
33 std::string encodeVec2f(const Vec2f v);
34 Vec2f decodeVec2f(const std::string str);
35
36 virtual bool canLoadFileByExtension(const std::string extension);
37
38 std::vector<std::vector<ConnectionInfo>> mConnectionInfo;
39 };
40}
Vec3f decodeVec3f(const std::string str)
std::string encodeVec2f(const Vec2f v)
virtual bool canLoadFileByExtension(const std::string extension)
bool addModule(std::shared_ptr< Node > node, std::shared_ptr< Module > module)
std::vector< std::string > split(std::string str, std::string pattern)
std::shared_ptr< Node > processNode(tinyxml2::XMLElement *nodeXML)
std::shared_ptr< SceneGraph > load(const std::string filename) override
std::shared_ptr< Module > processModule(tinyxml2::XMLElement *moduleXML)
Vec2f decodeVec2f(const std::string str)
std::string encodeVec3f(const Vec3f v)
bool save(std::shared_ptr< SceneGraph > scn, const std::string filename) override
std::vector< std::vector< ConnectionInfo > > mConnectionInfo
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Vector< float, 2 > Vec2f
Definition Vector2D.h:81
Vector< float, 3 > Vec3f
Definition Vector3D.h:93
unsigned int uint
Definition VkProgram.h:14