diff --git a/main.cpp b/main.cpp index 406a0cc..16b6d20 100644 --- a/main.cpp +++ b/main.cpp @@ -124,7 +124,7 @@ const float acceleration = 0.2f; float rotationVelocity = 0.0f; // Prędkość obrotu łazika const float rotationAcceleration = 0.1f; // Przyspieszenie obrotu -const float rotationFriction = 0.01f; // Współczynnik tarcia obrotu +const float rotationFriction = 0.1f; // Współczynnik tarcia obrotu const float maxRotationSpeed = 3.0f; // Maksymalna prędkość obrotu // Struktura do reprezentacji płotu @@ -290,10 +290,10 @@ void UpdateRover(const std::vector& fences) { std::vector fences = { - {-10.0f, 3.0f, 45.0f, 130.0f, 4.0f, 0}, - { 50.0f, 3.0f, -20.0f, 120.0f, 4.0f, 1}, - {110.0f, 3.0f, 45.0f, 130.0f, 4.0f, 0}, - { 50.0f, 3.0f, 110.0f, 120.0f, 4.0f, 1} + {-550.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0}, // 0 - pionowo + { 50.0f, 3.0f, -600.0f, 1200.0f, 4.0f, 1}, // 1 - poziomo + { 650.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0}, // 0 - pionowo + { 50.0f, 3.0f, 695.0f, 1200.0f, 4.0f, 1} // 1 - poziomo }; // Change viewing volume and viewport. Called when window is resized @@ -553,7 +553,8 @@ void stodola(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat krawedz) { } -void plot(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat length, GLfloat gruboscY, bool mod_x) { +void plot(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat length, GLfloat gruboscY, bool mod_x) + { GLfloat grubosc = 1.0f; @@ -912,7 +913,7 @@ void RenderScene(void) { // Rysowanie mapy (nie porusza się) glPushMatrix(); glColor3f(0.0, 1.0, 0.0); // Zielony kolor dla mapy - platforma(50.0f, 0.0f, 45.0f, 60.0f, 65.0f); + platforma(50.0f, 0.0f, 45.0f, 600.0f, 650.0f); //mapa.draw(); glPopMatrix(); @@ -928,10 +929,12 @@ void RenderScene(void) { glPopMatrix(); //skrzynka(50); - plot(-10.0f, 3.0f, 45.0f, 130.0f, 4.0f, 0); // 0 - pionowo - plot( 50.0f, 3.0f, -20.0f, 120.0f, 4.0f, 1); // 1 - poziomo - plot(110.0f, 3.0f, 45.0f, 130.0f, 4.0f, 0); - plot( 50.0f, 3.0f, 110.0f, 120.0f, 4.0f, 1); + plot(-550.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0); // 0 - pionowo + plot(50.0f, 3.0f, -600.0f, 1200.0f, 4.0f, 1); // 1 - poziomo + plot(650.0f, 3.0f, 50.0f, 1310.0f, 4.0f, 0); + plot(50.0f, 3.0f, 695.0f, 1200.0f, 4.0f, 1); + + // stodola(2.0f, 0.0f, -7.5f, 20.0f); stodola(10.0f, 0.0f, 2.0f, 40.0f);