orbita working

This commit is contained in:
Jakub Adamski 2021-02-07 15:15:27 +01:00
parent 858b42b9e4
commit 91b6083152
29 changed files with 32 additions and 21 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>D:\Studia\grk\Projekt_Grafika\Debug\grk-cw8.exe</ProjectOutputs>
<ProjectOutputs>D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\grk-cw8.exe</ProjectOutputs>
<ContentFiles></ContentFiles>
<SatelliteDlls></SatelliteDlls>
<NonRecipeFileRefs></NonRecipeFileRefs>

View File

@ -1,9 +1,13 @@
 main_8_1.cpp
Skybox.cpp
Generating Code...
Camera.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
PhysXExtensions_static_32.lib(ExtCpuWorkerThread.obj) : warning LNK4099: PDB 'PhysXExtensions_static_32.pdb' was not found with 'PhysXExtensions_static_32.lib(ExtCpuWorkerThread.obj)' or at 'D:\Studia\grk\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb'; linking object as if no debug info
PhysXExtensions_static_32.lib(ExtDefaultCpuDispatcher.obj) : warning LNK4099: PDB 'PhysXExtensions_static_32.pdb' was not found with 'PhysXExtensions_static_32.lib(ExtDefaultCpuDispatcher.obj)' or at 'D:\Studia\grk\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb'; linking object as if no debug info
PhysXExtensions_static_32.lib(ExtDefaultErrorCallback.obj) : warning LNK4099: PDB 'PhysXExtensions_static_32.pdb' was not found with 'PhysXExtensions_static_32.lib(ExtDefaultErrorCallback.obj)' or at 'D:\Studia\grk\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb'; linking object as if no debug info
PhysXExtensions_static_32.lib(ExtDefaultSimulationFilterShader.obj) : warning LNK4099: PDB 'PhysXExtensions_static_32.pdb' was not found with 'PhysXExtensions_static_32.lib(ExtDefaultSimulationFilterShader.obj)' or at 'D:\Studia\grk\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb'; linking object as if no debug info
grk-cw8.vcxproj -> D:\Studia\grk\Projekt_Grafika\Debug\grk-cw8.exe
 orbita.cpp
D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\src\orbita.cpp(135,20): warning C4244: "inicjowanie": konwersja z "double" do "float", możliwa utrata danych
D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\src\orbita.cpp(147,229): warning C4305: "argument": obcięcie z "double" do "T"
with
[
T=float
]
Camera.obj : warning LNK4075: zignorowano opcję „/EDITANDCONTINUE” z powodu określenia opcji „/INCREMENTAL:NO”
PhysXExtensions_static_32.lib(ExtCpuWorkerThread.obj) : warning LNK4099: nie znaleziono pliku PDB „PhysXExtensions_static_32.pdb” z elementem „PhysXExtensions_static_32.lib(ExtCpuWorkerThread.obj)” lub w pozycji „D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb”; obiekt zostanie skonsolidowany bez informacji debugowania
PhysXExtensions_static_32.lib(ExtDefaultCpuDispatcher.obj) : warning LNK4099: nie znaleziono pliku PDB „PhysXExtensions_static_32.pdb” z elementem „PhysXExtensions_static_32.lib(ExtDefaultCpuDispatcher.obj)” lub w pozycji „D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb”; obiekt zostanie skonsolidowany bez informacji debugowania
PhysXExtensions_static_32.lib(ExtDefaultErrorCallback.obj) : warning LNK4099: nie znaleziono pliku PDB „PhysXExtensions_static_32.pdb” z elementem „PhysXExtensions_static_32.lib(ExtDefaultErrorCallback.obj)” lub w pozycji „D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb”; obiekt zostanie skonsolidowany bez informacji debugowania
PhysXExtensions_static_32.lib(ExtDefaultSimulationFilterShader.obj) : warning LNK4099: nie znaleziono pliku PDB „PhysXExtensions_static_32.pdb” z elementem „PhysXExtensions_static_32.lib(ExtDefaultSimulationFilterShader.obj)” lub w pozycji „D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\PhysXExtensions_static_32.pdb”; obiekt zostanie skonsolidowany bez informacji debugowania
grk-cw8.vcxproj -> D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\Debug\grk-cw8.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,2 @@
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.27.29110:TargetPlatformVersion=10.0.17763.0:
Debug|Win32|D:\Studia\grk\Projekt_Grafika\|
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.27.29110:TargetPlatformVersion=10.0.18362.0:
Debug|Win32|D:\Documents\2020\studia\s3e1\grafika\Projekt_Grafika\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -12,7 +12,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Camera.cpp" />
<ClCompile Include="src\main_8_1.cpp" />
<ClCompile Include="src\orbita.cpp" />
<ClCompile Include="src\Physics.cpp" />
<ClCompile Include="src\Render_Utils.cpp" />
<ClCompile Include="src\Shader_Loader.cpp" />

View File

@ -48,10 +48,10 @@
<ClCompile Include="src\Physics.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\main_8_1.cpp">
<ClCompile Include="src\Skybox.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Skybox.cpp">
<ClCompile Include="src\orbita.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>

View File

@ -24,8 +24,9 @@ float appLoadingTime;
obj::Model planeModel;
obj::Model shipModel;
obj::Model sphereModel;
obj::Model stationModel;
Core::RenderContext planeContext, shipContext, sphereContext;
Core::RenderContext planeContext, shipContext, sphereContext, stationContext;
float cameraAngle = glm::radians(0.0f);
glm::vec3 cameraPos = glm::vec3(0, 0 , 250);
@ -143,11 +144,14 @@ void renderScene()
glClearColor(0.0f, 0.3f, 0.3f, 1.0f);
//SHIP
glm::mat4 shipModelMatrix = glm::translate(cameraPos + cameraDir * 0.6f + glm::vec3(0, -0.25f, 0)) * glm::rotate(-cameraAngle + glm::radians(90.0f), glm::vec3(0, 1, 0));
drawObjectTexture(&shipContext, shipModelMatrix, textureShip);
glm::mat4 shipModelMatrix = glm::translate(cameraPos + cameraDir * 4.f + glm::vec3(0, -0.25f, 0)) * glm::rotate(glm::orientedAngle(glm::vec3(0, 0, 1), cameraDir, glm::vec3(0, 1, 0)), glm::vec3(0,1,0)) * glm::scale(glm::vec3(0.2)) * glm::translate(glm::vec3(2, 0, 0));
drawObjectColor(&shipContext, shipModelMatrix, glm::vec3(0.5));
//SUN
//drawObjectTexture(&sphereModel, glm::translate(glm::vec3(0, 0, 0)) * glm::scale(glm::vec3(20.f)), textureSun);
//STATION
drawObjectColor(&stationContext, glm::rotate(time / 2.0f, glm::vec3(0, 1, 0)) * glm::translate(glm::vec3(0, 0, 200)) * glm::scale(glm::vec3(5)), glm::vec3(0.5));
//EARTH nieruchoma - ³atwiejsze dla naszej cutscenki
drawObjectTexture(&sphereContext, glm::scale(glm::vec3(45)), textureEarthHighres);
@ -166,9 +170,12 @@ void init()
programColor = shaderLoader.CreateProgram("shaders/shader_color.vert", "shaders/shader_color.frag");
programTexture = shaderLoader.CreateProgram("shaders/shader_tex.vert", "shaders/shader_tex.frag");
shipModel = obj::loadModelFromFile("models/ship.obj");
shipModel = obj::loadModelFromFile("models/box.obj");
shipContext.initFromOBJ(shipModel);
stationModel = obj::loadModelFromFile("models/box.obj");
stationContext.initFromOBJ(stationModel);
sphereModel = obj::loadModelFromFile("models/sphere.obj");
sphereContext.initFromOBJ(sphereModel);

View File

@ -319,9 +319,9 @@ void renderScene()
boxBodies[1]->setLinearVelocity(PxVec3(0, time * 0.8, 0));
}
if (time > 7 && !applied2) {
if (time > 7) {
applied2 = true;
boxBodies[1]->setLinearVelocity(PxVec3(0, 25, 0));
boxBodies[1]->setLinearVelocity(PxVec3(0, 15, 0));
}