Skip to content

Commit

Permalink
Added different textures and meshes per scene.
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo1211 committed Aug 17, 2018
1 parent 5cd764e commit 06554eb
Show file tree
Hide file tree
Showing 59 changed files with 33 additions and 61,606 deletions.
14 changes: 7 additions & 7 deletions include/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class Model{
public:
//On model creation all textures are loaded, the mesh is built and even an
//AABB is built.
Model(std::string basePath,const TransformParameters &initParameters) :
mAlbedo(basePath + "_albedo.png", "RGB"),
mNormal(basePath + "_normal.png", "XYZ"),
mAmbient(basePath + "_ao.png", "BW"),
mRoughness(basePath + "_rough.png", "BW"),
mMetallic(basePath + "_metal.png", "BW"),
Model( const TransformParameters &initParameters, const std::string meshPath, const std::string materialPath) :
mAlbedo(materialPath + "_albedo.png", "RGB"),
mNormal(materialPath + "_normal.png", "XYZ"),
mAmbient(materialPath + "_ao.png", "BW"),
mRoughness(materialPath + "_rough.png", "BW"),
mMetallic(materialPath + "_metal.png", "BW"),
mModelMatrix(Matrix4::transformMatrix(initParameters))
{
OBJ::buildMeshFromFile(mMesh, basePath + "_mesh.obj");
OBJ::buildMeshFromFile(mMesh, meshPath);
mBounds.buildAABB(mMesh);
mMesh.buildFacetNormals();
mMesh.buildTangentSpace();
Expand Down
3 changes: 1 addition & 2 deletions include/scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ class Scene{
bool loadContent(const std::string &baseFilePath, const std::string &sceneName);
//Check if scene folder acually exists and also checks accessibility
bool findSceneFolder(const std::string &scenePath);
void loadSceneModel(const std::string &baseFilePath, const TransformParameters &init);
void loadSceneModel(const std::string &baseFilePath, const TransformParameters &init ,const std::string modelMeshID, const std::string modelMaterialID);


//Finds objects that the camera can see
void frustrumCulling();
};
Expand Down
12 changes: 0 additions & 12 deletions scenes/NormalTangentTest/NormalTangentTestPlatform.mtl

This file was deleted.

Loading

0 comments on commit 06554eb

Please sign in to comment.