diff --git a/Debug/grk-cw9.exe b/Debug/grk-cw9.exe index da138ec..e01bee4 100644 Binary files a/Debug/grk-cw9.exe and b/Debug/grk-cw9.exe differ diff --git a/Debug/grk-cw9.pdb b/Debug/grk-cw9.pdb index 0acb620..d041fc2 100644 Binary files a/Debug/grk-cw9.pdb and b/Debug/grk-cw9.pdb differ diff --git a/cw 9/Debug/Render_Utils.obj b/cw 9/Debug/Render_Utils.obj index 883c23d..2cb435e 100644 Binary files a/cw 9/Debug/Render_Utils.obj and b/cw 9/Debug/Render_Utils.obj differ diff --git a/cw 9/Debug/grk-cw9.log b/cw 9/Debug/grk-cw9.log index d9acd36..bf8d8e2 100644 --- a/cw 9/Debug/grk-cw9.log +++ b/cw 9/Debug/grk-cw9.log @@ -1,14 +1,25 @@ - main.cpp + Collision_System.cpp C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY' -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(95,16): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(96,14): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(98,17): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(99,15): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(108,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(109,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(119,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(123,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(87,16): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(88,14): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(90,17): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(91,15): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(100,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(101,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(111,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(115,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data + main.cpp +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\minwindef.h(130,1): warning C4005: 'APIENTRY': macro redefinition +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\dependencies\glfw-3.3.8.bin.WIN32\include\GLFW\glfw3.h(123): message : see previous definition of 'APIENTRY' +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(87,16): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(88,14): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(90,17): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(91,15): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(100,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(101,9): warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(111,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\Collision_System.cpp(115,29): warning C4244: 'return': conversion from 'int' to 'float', possible loss of data C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(99,30): warning C4305: 'initializing': truncation from 'double' to 'float' C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(113,17): warning C4101: 'data': unreferenced local variable C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(138,38): warning C4305: '=': truncation from 'double' to 'float' @@ -43,13 +54,14 @@ C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1. ] C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(326,37): warning C4305: 'argument': truncation from 'double' to 'float' C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(358,2): warning C4305: 'argument': truncation from 'double' to 'float' -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(412,108): warning C4305: 'argument': truncation from 'double' to 'T' +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(411,108): warning C4305: 'argument': truncation from 'double' to 'T' with [ T=float ] -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(491,21): warning C4305: '-=': truncation from 'double' to 'float' -C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(493,21): warning C4305: '+=': truncation from 'double' to 'float' +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(490,21): warning C4305: '-=': truncation from 'double' to 'float' +C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\cw 9\src\ex_9_1.hpp(492,21): warning C4305: '+=': truncation from 'double' to 'float' + Generating Code... Box.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library grk-cw9.vcxproj -> C:\Users\Artur\Desktop\studia\3\Grafika komputerowa\GRK_Project\Debug\grk-cw9.exe diff --git a/cw 9/Debug/grk-cw9.tlog/CL.read.1.tlog b/cw 9/Debug/grk-cw9.tlog/CL.read.1.tlog index aa07227..de95292 100644 Binary files a/cw 9/Debug/grk-cw9.tlog/CL.read.1.tlog and b/cw 9/Debug/grk-cw9.tlog/CL.read.1.tlog differ diff --git a/cw 9/Debug/grk-cw9.tlog/CL.write.1.tlog b/cw 9/Debug/grk-cw9.tlog/CL.write.1.tlog index 3dd4be1..60994ed 100644 Binary files a/cw 9/Debug/grk-cw9.tlog/CL.write.1.tlog and b/cw 9/Debug/grk-cw9.tlog/CL.write.1.tlog differ diff --git a/cw 9/Debug/main.obj b/cw 9/Debug/main.obj index 7241667..083071f 100644 Binary files a/cw 9/Debug/main.obj and b/cw 9/Debug/main.obj differ diff --git a/cw 9/Debug/vc142.idb b/cw 9/Debug/vc142.idb index b1aafaa..4a6338d 100644 Binary files a/cw 9/Debug/vc142.idb and b/cw 9/Debug/vc142.idb differ diff --git a/cw 9/Debug/vc142.pdb b/cw 9/Debug/vc142.pdb index b507485..67d46ec 100644 Binary files a/cw 9/Debug/vc142.pdb and b/cw 9/Debug/vc142.pdb differ diff --git a/cw 9/src/Collision_System.cpp b/cw 9/src/Collision_System.cpp index c620340..a09a581 100644 --- a/cw 9/src/Collision_System.cpp +++ b/cw 9/src/Collision_System.cpp @@ -31,14 +31,6 @@ public: matrix[i][j] = false; } } - for (int i = 0; i < matrixSize; i++) { - matrix[i][0] = true; - matrix[i][matrixSize - 1] = true; - } - for (int i = 0; i < matrixSize; i++) { - matrix[0][i] = true; - matrix[matrixSize - 1][i] = true; - } } void addMeshToMatrix(aiMesh* mesh) { diff --git a/cw 9/src/Render_Utils.cpp b/cw 9/src/Render_Utils.cpp index 38248ce..a2377af 100644 --- a/cw 9/src/Render_Utils.cpp +++ b/cw 9/src/Render_Utils.cpp @@ -13,33 +13,6 @@ void Core::RenderContext::initFromAssimpMesh(aiMesh* mesh) { vertexBuffer = 0; vertexIndexBuffer = 0; - aiVector3D position = mesh->mVertices[0]; - - float minX = position.x, minY = position.y, minZ = position.z; - float maxX = position.x, maxY = position.y, maxZ = position.z; - - for (unsigned int i = 1; i < mesh->mNumVertices; i++) - { - aiVector3D vertex = mesh->mVertices[i]; - - if (vertex.x < minX) minX = vertex.x; - if (vertex.y < minY) minY = vertex.y; - if (vertex.z < minZ) minZ = vertex.z; - - if (vertex.x > maxX) maxX = vertex.x; - if (vertex.y > maxY) maxY = vertex.y; - if (vertex.z > maxZ) maxZ = vertex.z; - } - - float width = maxX - minX; - float height = maxZ - minZ; - - std::cout << "Mesh position: (" << position.x << ", " << position.y << ", " << position.z << ")" << std::endl; - std::cout << "X " << minX << " - " << maxX << "\n"; - std::cout << "Z " << minZ << " - " << maxZ << "\n"; - std::cout << "Mesh width (relative): " << width << std::endl; - std::cout << "Mesh height (relative): " << height << std::endl; - std::vector textureCoord; std::vector indices; //tex coord must be converted to 2d vecs diff --git a/cw 9/src/ex_9_1.hpp b/cw 9/src/ex_9_1.hpp index baca32d..a6798f5 100644 --- a/cw 9/src/ex_9_1.hpp +++ b/cw 9/src/ex_9_1.hpp @@ -396,7 +396,6 @@ void loadModelToContext(std::string path, Core::RenderContext& context, bool upd return; } - std::cout << path << "\n"; context.initFromAssimpMesh(scene->mMeshes[0]); if (updateCollisionSystem) { @@ -500,8 +499,7 @@ void processInput(GLFWwindow* window) if (glfwGetKey(window, GLFW_KEY_4) == GLFW_PRESS) { float x = collisionSystem.getRelativeX(spaceshipPos.x); float z = collisionSystem.getRelativeZ(spaceshipPos.z); - - printf("spaceshipPos = (%ff, %ff)\n", x, z); + printf("matrix[%ff][%ff]\n", z, x); } //cameraDir = glm::normalize(-cameraPos);