Files
axyz/include/Engine/Rendering/Model.h
T
William Moberg f632b45c9b Merge branch 'MemoryOptimization' into Importer
# Conflicts:
#	include/Engine/Rendering/Model.h
#	src/Engine/Collision/Collision.cpp
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Collision/TriggerSystem.cpp
#	src/Game/Systems/SpawnerSystem.cpp
2016-03-14 02:06:53 +01:00

52 lines
1.4 KiB
C++

#ifndef Model_h__
#define Model_h__
#include "Rendering/RawModelCustom.h"
#include "Util/CommonFunctions.h"
//#include "Rendering/RawModelAssimp.h"
#include "../OpenGL.h"
#include "Core/AABB.h"
class Model : public ThreadUnsafeResource
{
friend class ResourceManager;
private:
Model(std::string fileName);
public:
~Model();
const std::vector<RawModel::MaterialProperties>& MaterialGroups() const { return m_Materials; }
//const RawModel::Vertex* Vertices() const { return m_RawModel->Vertices(); }
unsigned int NumberOfVertices() const { return m_Vertices.size(); }
//size_t NumberOfVertices() const { return m_RawModel->NumVertices(); }
//const std::vector<unsigned int>& Indices() const { return m_RawModel->Indices(); }
//const RawModel::Vertex* CollisionVertices() const { return m_RawModel->CollisionVertices(); }
//const std::vector<unsigned int>& CollisionIndices() const { return m_RawModel->CollisionIndices(); }
const AABB& Box() const { return m_Box; }
bool IsSkinned() const { return m_IsSkinned; }
GLuint VAO;
GLuint ElementBuffer;
//RawModel* m_RawModel;
Skeleton* m_Skeleton = nullptr;
std::vector<glm::vec3> m_Vertices;
std::vector<unsigned int> m_Indices;
private:
AABB m_Box;
GLuint VertexBuffer;
GLuint NormalBuffer;
GLuint TangentNormalsBuffer;
GLuint BiTangentNormalsBuffer;
GLuint TextureCoordBuffer;
std::vector<RawModel::MaterialProperties> m_Materials;
bool m_IsSkinned;
};
#endif