VisPro  1.0
Project of Visualisierung 2
SceneImporter.h
Go to the documentation of this file.
1 #pragma once
2 
7 //#include "Triangle.h"
8 #include "Geometry.h"
9 #include <list>
10 #include <memory>
11 #include "Shader.h"
12 #include "Camera.h"
13 #include "BlinnPhongShader.h"
14 
15 #include <assimp/Importer.hpp> // C++ importer interface
16 #include <assimp/scene.h> // Output data structure
17 #include <assimp/postprocess.h> // Post processing flags
18 
22 {
23 public:
29  std::vector<std::shared_ptr<Geometry>> SceneImporter::importFrom(const std::string& pFile, std::vector<std::shared_ptr<PointLight>> *allLights, std::shared_ptr<Camera> camera);
30  void setPrintInfo(bool i);
31 private:
32  void convertScene(const aiScene* scene);
33  void iterateOverAllNodes(const aiNode* node, Geometry* targetParent, const aiScene* scene, const glm::mat4& accTransform);
34  glm::mat4 assImpMatToGlmMat(const aiMatrix4x4 &m);
35  std::vector<glm::vec3> aiVecToGlmVec3(aiVector3D* inputVectorlist, unsigned int amount);
36  std::vector<glm::vec2> aiVecToGlmVec2(aiVector3D** inputVectorlist, unsigned int amount);
37  Shader* aiMaterialToShader(aiMaterial *material, bool is_tex);
38  void aiLightToLight(aiLight *aiL, glm::mat4& transform);
39  void aiCameraToCamera(aiCamera *c);
40  void CopyaiMat(const aiMatrix4x4 &from, glm::mat4 &to);
41  bool printInfo;
42 };
43 
blinn phong shader class file.
Shader base class file.
std::vector< std::shared_ptr< Geometry > > importFrom(const std::string &pFile, std::vector< std::shared_ptr< PointLight >> *allLights, std::shared_ptr< Camera > camera)
Definition: SceneImporter.cpp:27
Geometry class file.
Definition: Geometry.h:14
Definition: Shader.h:18
Definition: SceneImporter.h:21