1 Commits

Author SHA1 Message Date
Pc
fa824192b7 To co w nazwie brancha + konsola w vsc 2025-01-07 23:16:46 +01:00
29 changed files with 480 additions and 1922 deletions

View File

@@ -7,7 +7,7 @@ OUTPUT = output.exe
CPPSTD = c++17 CPPSTD = c++17
default: default:
$(CC) -g *.cpp $(CFLAGS) $(DEPS) $(LINK) -std=$(CPPSTD) -static -static-libgcc -fno-keep-inline-dllexport -Os -s -Wl,--build-id=none -o $(OUTPUT) $(CC) -g *.cpp $(CFLAGS) $(DEPS) $(LINK) -std=$(CPPSTD) -static -static-libgcc -fno-keep-inline-dllexport -o $(OUTPUT)
run: default run: default
$(OUTPUT) $(OUTPUT)

View File

@@ -127,8 +127,6 @@
<ClCompile Include="loadOBJ.cpp" /> <ClCompile Include="loadOBJ.cpp" />
<ClCompile Include="main.cpp" /> <ClCompile Include="main.cpp" />
<ClCompile Include="plane.cpp" /> <ClCompile Include="plane.cpp" />
<ClCompile Include="shader.cpp" />
<ClCompile Include="texture.cpp" />
<ClCompile Include="timeh.cpp" /> <ClCompile Include="timeh.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -136,8 +134,6 @@
<ClInclude Include="loadOBJ.h" /> <ClInclude Include="loadOBJ.h" />
<ClInclude Include="plane.hpp" /> <ClInclude Include="plane.hpp" />
<ClInclude Include="RESOURCE.H" /> <ClInclude Include="RESOURCE.H" />
<ClInclude Include="shader.hpp" />
<ClInclude Include="texture.hpp" />
<ClInclude Include="timeh.hpp" /> <ClInclude Include="timeh.hpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -53,16 +53,10 @@
<ClInclude Include="timeh.hpp"> <ClInclude Include="timeh.hpp">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="shader.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="texture.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="glfw3.dll"> <None Include="glfw3.dll">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</None> </None>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,21 +1,15 @@
#include "lazik.hpp" #include "lazik.hpp"
//lazik::lazik(float x, float y, float z, const char* modelpath, const char* texturepath) { lazik::lazik(float x, float y, float z, const char* modelpath){
lazik::lazik(float x, float y, float z, const char* modelpath) {
this->c_x = x; this->c_x = x;
this->c_y = y; this->c_y = y;
this->c_z = z; this->c_z = z;
this->modelpath = modelpath; this->modelpath = modelpath;
// this->texturepath = texturepath;
timestampedCout("lazik.cpp: Zaladowano dane w konstruktorze.") timestampedCout("lazik.cpp: Zaladowano dane w konstruktorze.")
} }
// void lazik::passProgramID(GLuint programID) {
// this->programID = programID;
// }
void lazik::loadModel() { void lazik::loadModel() {
timestampedCout("lazik.cpp:"); timestampedCout("lazik.cpp:");
@@ -24,11 +18,6 @@ void lazik::loadModel() {
if (res) timestampedCout("Pomyslnie zaladowano model lazika.") if (res) timestampedCout("Pomyslnie zaladowano model lazika.")
else timestampedCout("Nie udalo sie zaladowac modelu lazika."); else timestampedCout("Nie udalo sie zaladowac modelu lazika.");
//this->Texture = loadDDS(this->texturepath);
//timestampedCout("lazik.cpp: this->Texture = " << this->Texture);
//this->TextureID = glGetUniformLocation(this->programID, "myTextureSampler");
//timestampedCout("lazik.cpp: this->TextureID = " << this->TextureID);
glGenBuffers(1, &vertexbuffer); glGenBuffers(1, &vertexbuffer);
glBindBuffer(GL_ARRAY_BUFFER, this->vertexbuffer); glBindBuffer(GL_ARRAY_BUFFER, this->vertexbuffer);
glBufferData(GL_ARRAY_BUFFER, this->vertices.size() * sizeof(glm::vec3), &vertices[0], GL_STATIC_DRAW); glBufferData(GL_ARRAY_BUFFER, this->vertices.size() * sizeof(glm::vec3), &vertices[0], GL_STATIC_DRAW);
@@ -41,13 +30,6 @@ void lazik::loadModel() {
void lazik::draw() { void lazik::draw() {
// glEnable(GL_TEXTURE_2D);
// // Bind our texture in Texture Unit 0
// glActiveTexture(GL_TEXTURE0);
// glBindTexture(GL_TEXTURE_2D, Texture);
// // Set our "myTextureSampler" sampler to use Texture Unit 0
// glUniform1i(TextureID, 0);
// 1st attribute buffer: vertices // 1st attribute buffer: vertices
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, this->vertexbuffer); glBindBuffer(GL_ARRAY_BUFFER, this->vertexbuffer);
@@ -75,19 +57,11 @@ void lazik::draw() {
// Draw vertices // Draw vertices
glDrawArrays(GL_TRIANGLES, 0, this->vertices.size()); glDrawArrays(GL_TRIANGLES, 0, this->vertices.size());
// glDisable(GL_TEXTURE_2D);
glDisableVertexAttribArray(0); glDisableVertexAttribArray(0);
glDisableVertexAttribArray(1); glDisableVertexAttribArray(1);
} }
void lazik::unload(){
glDeleteBuffers(1, &this->vertexbuffer);
glDeleteBuffers(1, &this->uvbuffer);
// glDeleteTextures(1, &this->Texture);
}
void lazik::moveX(float x){ void lazik::moveX(float x){
// TODO: dodać timer do poniższych funkcji, aby czas przejścia z punktu A do B był uniezależniony od FPSów // TODO: dodać timer do poniższych funkcji, aby czas przejścia z punktu A do B był uniezależniony od FPSów
timestampedCout("dummy moveX"); timestampedCout("dummy moveX");

View File

@@ -8,8 +8,6 @@
#include "timeh.hpp" #include "timeh.hpp"
#include "GL/glm/glm.hpp" #include "GL/glm/glm.hpp"
#include "loadOBJ.h" #include "loadOBJ.h"
#include "texture.hpp"
#include "shader.hpp"
class lazik { class lazik {
private: private:
@@ -25,17 +23,10 @@ class lazik {
GLuint vertexbuffer; GLuint vertexbuffer;
GLuint uvbuffer; GLuint uvbuffer;
const char* modelpath; const char* modelpath;
//GLuint programID;
//GLuint Texture;
//GLuint TextureID;
//const char* texturepath;
public: public:
// lazik(float x, float y, float z, const char* modelpath, const char* texturepath);
lazik(float x, float y, float z, const char* modelpath); lazik(float x, float y, float z, const char* modelpath);
//void passProgramID(GLuint programID);
void loadModel(); void loadModel();
void draw(); void draw();
void unload();
void moveX(float x); void moveX(float x);
void moveY(float y); void moveY(float y);
void moveZ(float z); void moveZ(float z);

648
main.cpp
View File

@@ -31,8 +31,6 @@
#include "GL/glfw3.h" #include "GL/glfw3.h"
#include <ctime> #include <ctime>
#include "timeh.hpp" #include "timeh.hpp"
#include "texture.hpp"
#include "shader.hpp"
#include "FPSCounter.cpp" #include "FPSCounter.cpp"
#include <thread> #include <thread>
@@ -48,7 +46,7 @@ using namespace glm;
HPALETTE hPalette = NULL; HPALETTE hPalette = NULL;
// Application name and instance storage // Application name and instance storeage
static LPCTSTR lpszAppName = "grafikaKBT"; static LPCTSTR lpszAppName = "grafikaKBT";
static HINSTANCE hInstance; static HINSTANCE hInstance;
GLFWwindow* window; GLFWwindow* window;
@@ -64,8 +62,8 @@ static GLsizei lastWidth;
// Opis tekstury // Opis tekstury
BITMAPINFOHEADER bitmapInfoHeader; // nagłówek obrazu BITMAPINFOHEADER bitmapInfoHeader; // nagłówek obrazu
unsigned char* bitmapData; // dane tekstury unsigned char* bitmapData; // dane tekstury
unsigned int texture[4]; // obiekt tekstury unsigned int texture[2]; // obiekt tekstury
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -75,46 +73,12 @@ void SetDCPixelFormat(HDC hDC);
int polygonmode = 0; int polygonmode = 0;
std::time_t lastTime = std::time(nullptr); std::time_t lastTime = std::time(nullptr);
int monitormode = 0; int monitormode = 1;
int monitormodecounter = 0; int monitormodecounter = 0;
std::time_t monitormodehelper; std::time_t monitormodehelper;
//Zmienne do ruchu ##############################################
/*
float Foward = 0.0f; // Pozycja łazika w przód/tył
float Sides = 0.0f; // Pozycja łazika w lewo/prawo
float Rotation = 0.0f; // Rotacja łazika (w stopniach)
// Zmienne do sterowania kamerą
float CameraHeight = 50.0f; // Wysokość kamery
void MoveRover(bool forward) {
// Zamieniamy kąt na radiany
float radRotation = Rotation * GL_PI / 180.0f;
// Wektor ruchu w kierunku przód/tył (kierunek łazika)
float moveX = cos(radRotation);
float moveZ = sin(radRotation);
// Ruch w przód
if (forward) {
Sides -= 1.1f * moveX;
Foward -= 1.1f * moveZ;
}
// Ruch w tył
else {
Sides += 1.1f * moveX;
Foward += 1.1f * moveZ;
}
}
// Funkcja do obrotu kamery i łazika (A/D)
void RotateRoverAndCamera(float angle) {
Rotation += angle;
if (Rotation >= 360.0f) Rotation -= 360.0f;
if (Rotation < 0.0f) Rotation += 360.0f;
}
*/
//Zmienne do ruchu ##############################################^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //Zmienne do ruchu ##############################################^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FPSCounter fpsCounter; FPSCounter fpsCounter;
static const int targetFPS = 144; // Celowany FPS static const int targetFPS = 144; // Celowany FPS
@@ -146,13 +110,13 @@ float MoveSpeed = 1.0f; // Prędkość poruszania się
float velocity = 0.0f; // Aktualna prędkość łazika float velocity = 0.0f; // Aktualna prędkość łazika
const float friction = 0.1f; // Współczynnik tarcia (μ) const float friction = 0.05f; // Współczynnik tarcia (μ)
const float maxSpeed = 3.0f; // Maksymalna prędkość łazika const float maxSpeed = 3.0f; // Maksymalna prędkość łazika
const float acceleration = 0.1f; const float acceleration = 0.2f;
float rotationVelocity = 0.0f; // Prędkość obrotu łazika float rotationVelocity = 0.0f; // Prędkość obrotu łazika
const float rotationAcceleration = 0.1f; // Przyspieszenie obrotu const float rotationAcceleration = 0.1f; // Przyspieszenie obrotu
const float rotationFriction = 0.05f; // Współczynnik tarcia obrotu const float rotationFriction = 0.05f; // Współczynnik tarcia obrotu
const float maxRotationSpeed = 5.0f; // Maksymalna prędkość obrotu const float maxRotationSpeed = 3.0f; // Maksymalna prędkość obrotu
@@ -282,19 +246,21 @@ void ChangeSize(GLsizei w, GLsizei h) {
unsigned char* LoadBitmapFile(char* filename, BITMAPINFOHEADER* bitmapInfoHeader) { unsigned char* LoadBitmapFile(char* filename, BITMAPINFOHEADER* bitmapInfoHeader) {
FILE* filePtr; // wskaźnik pozycji pliku FILE* filePtr; // wskaźnik pozycji pliku
BITMAPFILEHEADER bitmapFileHeader; // nagłówek pliku BITMAPFILEHEADER bitmapFileHeader; // nagłówek pliku
unsigned char* bitmapImage; // dane obrazu unsigned char* bitmapImage; // dane obrazu
int imageIdx = 0; // licznik pikseli int imageIdx = 0; // licznik pikseli
unsigned char tempRGB; // zmienna zamiany składowych unsigned char tempRGB; // zmienna zamiany składowych
// otwiera plik w trybie "read binary" // otwiera plik w trybie "read binary"
filePtr = fopen(filename, "rb"); filePtr = fopen(filename, "rb");
if (filePtr == NULL) return NULL; if (filePtr == NULL)
return NULL;
// wczytuje nagłówek pliku // wczytuje nagłówek pliku
fread(&bitmapFileHeader, sizeof(BITMAPFILEHEADER), 1, filePtr); fread(&bitmapFileHeader, sizeof(BITMAPFILEHEADER), 1, filePtr);
// sprawdza, czy jest to plik formatu BMP // sprawdza, czy jest to plik formatu BMP
if (bitmapFileHeader.bfType != BITMAP_ID) { if (bitmapFileHeader.bfType != BITMAP_ID)
{
fclose(filePtr); fclose(filePtr);
return NULL; return NULL;
} }
@@ -364,401 +330,49 @@ void SetDCPixelFormat(HDC hDC) {
SetPixelFormat(hDC, nPixelFormat, &pfd); SetPixelFormat(hDC, nPixelFormat, &pfd);
} }
void skrzynka(GLfloat k) { lazik user(10.0f, 0.0f, 0.0f, "res/models/lazik4.obj");
glColor3d(0.8, 0.7, 0.3); plane mapa(0.0f, 0.0f, 0.0f, "res/models/mapka2.obj");
glEnable(GL_TEXTURE_2D); // Włącz teksturowanie
glBindTexture(GL_TEXTURE_2D, texture[0]);
glBegin(GL_QUADS);
glNormal3d(0, 0, 1);
glTexCoord2d(1.0, 1.0); glVertex3d( k, k, k);
glTexCoord2d(0.0, 1.0); glVertex3d(-k, k, k);
glTexCoord2d(0.0, 0.0); glVertex3d(-k, -k, k);
glTexCoord2d(1.0, 0.0); glVertex3d( k, -k, k);
glEnd();
glBindTexture(GL_TEXTURE_2D, texture[1]);
glBegin(GL_QUADS);
glNormal3d(1, 0, 0);
glTexCoord2d(1.0, 1.0); glVertex3d(k, k, k);
glTexCoord2d(0.0, 1.0); glVertex3d(k, -k, k);
glTexCoord2d(0.0, 0.0); glVertex3d(k, -k, -k);
glTexCoord2d(1.0, 0.0); glVertex3d(k, k, -k);
glEnd();
glDisable(GL_TEXTURE_2D); // Wyłącz teksturowanie
glBegin(GL_QUADS);
glNormal3d(0, 0, -1);
glVertex3d( k, k, -k);
glVertex3d( k, -k, -k);
glVertex3d(-k, -k, -k);
glVertex3d(-k, k, -k);
glNormal3d(-1, 0, 0);
glVertex3d(-k, k, -k);
glVertex3d(-k, -k, -k);
glVertex3d(-k, -k, k);
glVertex3d(-k, k, k);
glNormal3d(0, 1, 0);
glVertex3d( k, k, k);
glVertex3d( k, k, -k);
glVertex3d(-k, k, -k);
glVertex3d(-k, k, k);
glNormal3d(0, -1, 0);
glVertex3d( k, -k, k);
glVertex3d(-k, -k, k);
glVertex3d(-k, -k, -k);
glVertex3d( k, -k, -k);
glEnd();
}
void platforma(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat xlen, GLfloat zlen) {
glColor3d(0.729, 0.91, 0.51); // jasnozielony, dla grass02.bmp (https://rgbcolorpicker.com/0-1)
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[1]);
glBegin(GL_QUADS);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - xlen, yc, zc - zlen);
glTexCoord2d(1.0, 0.0); glVertex3d(xc + xlen, yc, zc - zlen);
glTexCoord2d(0.0, 0.0); glVertex3d(xc + xlen, yc, zc + zlen);
glTexCoord2d(0.0, 1.0); glVertex3d(xc - xlen, yc, zc + zlen);
glEnd();
glDisable(GL_TEXTURE_2D);
}
void stodola(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat krawedz) {
glEnable(GL_TEXTURE_2D);
// ściany stodoły z bruku (brickwall)
glColor3d(0.612f, 0.573f, 0.478f); // ciemny szary popadający w brąz (https://rgbcolorpicker.com/0-1)
glBindTexture(GL_TEXTURE_2D, texture[3]);
glBegin(GL_QUADS);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - krawedz/2, yc, zc - krawedz/2);
glTexCoord2d(1.0, 0.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2d(0.0, 0.0); glVertex3d(xc + krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2d(0.0, 1.0); glVertex3d(xc + krawedz/2, yc, zc - krawedz/2);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - krawedz/2, yc, zc - krawedz/2);
glTexCoord2d(1.0, 0.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2d(0.0, 0.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2d(0.0, 1.0); glVertex3d(xc - krawedz/2, yc, zc + krawedz/2);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - krawedz/2, yc, zc + krawedz/2);
glTexCoord2d(1.0, 0.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2d(0.0, 0.0); glVertex3d(xc + krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2d(0.0, 1.0); glVertex3d(xc + krawedz/2, yc, zc + krawedz/2);
glEnd();
// przód i tył dachu
glColor3d(0.612f, 0.573f, 0.478f);
glBindTexture(GL_TEXTURE_2D, texture[3]);
glBegin(GL_TRIANGLES);
glTexCoord2f(1.0, 1.0); glVertex3f(xc - krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2f(1.0, 0.0); glVertex3f(xc - krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2f(0.0, 0.0); glVertex3f(xc - krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2f(1.0, 1.0); glVertex3f(xc + krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2f(1.0, 0.0); glVertex3f(xc + krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2f(0.0, 0.0); glVertex3f(xc + krawedz/2, yc + krawedz, zc + krawedz/2);
glEnd();
// dach stodoły (barnroof)
glColor3d(0.639, 0.553, 0.322); // wyblakły brązowy
glBindTexture(GL_TEXTURE_2D, texture[2]);
glBegin(GL_QUADS);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2d(1.0, 0.0); glVertex3d(xc - krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2d(0.0, 0.0); glVertex3d(xc + krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2d(0.0, 1.0); glVertex3d(xc + krawedz/2, yc + krawedz, zc + krawedz/2);
glTexCoord2d(1.0, 1.0); glVertex3d(xc - krawedz/2, yc + krawedz, zc - krawedz/2);
glTexCoord2d(1.0, 0.0); glVertex3d(xc - krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2d(0.0, 0.0); glVertex3d(xc + krawedz/2, yc + 1.5 * krawedz, zc);
glTexCoord2d(0.0, 1.0); glVertex3d(xc + krawedz/2, yc + krawedz, zc - krawedz/2);
glEnd();
glDisable(GL_TEXTURE_2D);
}
void plot(GLfloat xc, GLfloat yc, GLfloat zc, GLfloat length, GLfloat gruboscY, bool mod_x) {
GLfloat grubosc = 1.0f;
// timestampedCout("main.cpp (plot): otrzymano xc=" << xc << " yc=" << yc << " zc=" << zc << " length=" << length << " mod_x=" << mod_x);
GLfloat gruboscX = grubosc + mod_x * length;
GLfloat gruboscZ = grubosc + !mod_x * length;
// timestampedCout("main.cpp (plot): gruboscX=" << gruboscX << " gruboscY=" << gruboscY << " gruboscZ=" << gruboscZ);
// d-----------c Y
// / /| ^
// a-----------b | \
// | h | g C->X
// | |/ |
// e-----------f v
// Z (płaszczyzna XZ, Y to trzeci wymiar)
GLfloat a1_x = xc - gruboscX / 2, a1_y = yc + 1 + gruboscY, a1_z = zc + gruboscZ / 2; // 3
GLfloat b1_x = xc + gruboscX / 2, b1_y = yc + 1 + gruboscY, b1_z = zc + gruboscZ / 2;
GLfloat c1_x = xc + gruboscX / 2, c1_y = yc + 1 + gruboscY, c1_z = zc - gruboscZ / 2;
GLfloat d1_x = xc - gruboscX / 2, d1_y = yc + 1 + gruboscY, d1_z = zc - gruboscZ / 2;
GLfloat e1_x = xc - gruboscX / 2, e1_y = yc + 1 , e1_z = zc + gruboscZ / 2; // 1
GLfloat f1_x = xc + gruboscX / 2, f1_y = yc + 1 , f1_z = zc + gruboscZ / 2;
GLfloat g1_x = xc + gruboscX / 2, g1_y = yc + 1 , g1_z = zc - gruboscZ / 2;
GLfloat h1_x = xc - gruboscX / 2, h1_y = yc + 1 , h1_z = zc - gruboscZ / 2;
GLfloat a2_x = a1_x, a2_y = a1_y - 1 - gruboscY, a2_z = a1_z; //zc - 1; // -4
GLfloat b2_x = b1_x, b2_y = b1_y - 1 - gruboscY, b2_z = b1_z; //zc - 1;
GLfloat c2_x = c1_x, c2_y = c1_y - 1 - gruboscY, c2_z = c1_z; //zc - 1;
GLfloat d2_x = d1_x, d2_y = d1_y - 1 - gruboscY, d2_z = d1_z; //zc - 1;
GLfloat e2_x = e1_x, e2_y = e1_y - 1 - gruboscY, e2_z = e1_z; //zc - 2;
GLfloat f2_x = f1_x, f2_y = f1_y - 1 - gruboscY, f2_z = f1_z; //zc - 2;
GLfloat g2_x = g1_x, g2_y = g1_y - 1 - gruboscY, g2_z = g1_z; //zc - 2;
GLfloat h2_x = h1_x, h2_y = h1_y - 1 - gruboscY, h2_z = h1_z; //zc - 2;
glColor3d(0.71, 0.522, 0.067);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glBegin(GL_QUADS);
// Góra (1_x, 1_y, 1_z):
// ABCD
glTexCoord2d(1.0, 1.0); glVertex3d(a1_x, a1_y, a1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b1_x, b1_y, b1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(c1_x, c1_y, c1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(d1_x, d1_y, d1_z);
// EFGH
glTexCoord2d(1.0, 1.0); glVertex3d(e1_x, e1_y, e1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(f1_x, f1_y, f1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g1_x, g1_y, g1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(h1_x, h1_y, h1_z);
// BCGF
glTexCoord2d(1.0, 1.0); glVertex3d(b1_x, b1_y, b1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(c1_x, c1_y, c1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g1_x, g1_y, g1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(f1_x, f1_y, f1_z);
// ADHE
glTexCoord2d(1.0, 1.0); glVertex3d(a1_x, a1_y, a1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b1_x, b1_y, b1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(c1_x, c1_y, c1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(d1_x, d1_y, d1_z);
// ABFE
glTexCoord2d(1.0, 1.0); glVertex3d(a1_x, a1_y, a1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b1_x, b1_y, b1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(f1_x, f1_y, f1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(e1_x, e1_y, e1_z);
// DCGH
glTexCoord2d(1.0, 1.0); glVertex3d(d1_x, d1_y, d1_z);
glTexCoord2d(1.0, 0.0); glVertex3d(c1_x, c1_y, c1_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g1_x, g1_y, g1_z);
glTexCoord2d(0.0, 1.0); glVertex3d(h1_x, h1_y, h1_z);
// Dół (2_x, 2_y, 2_z):
// ABCD
glTexCoord2d(1.0, 1.0); glVertex3d(a2_x, a2_y, a2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b2_x, b2_y, b2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(c2_x, c2_y, c2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(d2_x, d2_y, d2_z);
// EFGH
glTexCoord2d(1.0, 1.0); glVertex3d(e2_x, e2_y, e2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(f2_x, f2_y, f2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g2_x, g2_y, g2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(h2_x, h2_y, h2_z);
// BCGF
glTexCoord2d(1.0, 1.0); glVertex3d(b2_x, b2_y, b2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(c2_x, c2_y, c2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g2_x, g2_y, g2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(f2_x, f2_y, f2_z);
// ADHE
glTexCoord2d(1.0, 1.0); glVertex3d(a2_x, a2_y, a2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b2_x, b2_y, b2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(c2_x, c2_y, c2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(d2_x, d2_y, d2_z);
// ABFE
glTexCoord2d(1.0, 1.0); glVertex3d(a2_x, a2_y, a2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(b2_x, b2_y, b2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(f2_x, f2_y, f2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(e2_x, e2_y, e2_z);
// DCGH
glTexCoord2d(1.0, 1.0); glVertex3d(d2_x, d2_y, d2_z);
glTexCoord2d(1.0, 0.0); glVertex3d(c2_x, c2_y, c2_z);
glTexCoord2d(0.0, 0.0); glVertex3d(g2_x, g2_y, g2_z);
glTexCoord2d(0.0, 1.0); glVertex3d(h2_x, h2_y, h2_z);
// Pachołki
// d-----------c Y
// / /| ^
// a-----------b | \
// | h | g C->X
// | |/ |
// e-----------f v
// Z (płaszczyzna XZ, Y to trzeci wymiar)
GLfloat p_a_x, p_a_y, p_a_z;
GLfloat p_b_x, p_b_y, p_b_z;
GLfloat p_c_x, p_c_y, p_c_z;
GLfloat p_d_x, p_d_y, p_d_z;
GLfloat p_e_x, p_e_y, p_e_z;
GLfloat p_f_x, p_f_y, p_f_z;
GLfloat p_g_x, p_g_y, p_g_z;
GLfloat p_h_x, p_h_y, p_h_z;
if (!mod_x) {
p_a_x = xc + gruboscX / 2, p_a_y = yc + 1.5f * gruboscY, p_a_z = zc; // +3 dla y
p_b_x = xc - gruboscX / 2, p_b_y = yc + 1.5f * gruboscY, p_b_z = zc; // +3 dla y
p_c_x = xc + gruboscX / 2, p_c_y = yc + 1.5f * gruboscY, p_c_z = zc; // +3 dla y
p_d_x = xc - gruboscX / 2, p_d_y = yc + 1.5f * gruboscY, p_d_z = zc; // +3 dla y
p_e_x = xc + gruboscX / 2, p_e_y = yc - 6 , p_e_z = zc;
p_f_x = xc - gruboscX / 2, p_f_y = yc - 6 , p_f_z = zc;
p_g_x = xc + gruboscX / 2, p_g_y = yc - 6 , p_g_z = zc;
p_h_x = xc - gruboscX / 2, p_h_y = yc - 6 , p_h_z = zc;
} else {
p_a_x = xc, p_a_y = yc + 1.5f * gruboscY, p_a_z = zc - gruboscZ / 2; // +3 dla y
p_b_x = xc, p_b_y = yc + 1.5f * gruboscY, p_b_z = zc - gruboscZ / 2; // +3 dla y
p_c_x = xc, p_c_y = yc + 1.5f * gruboscY, p_c_z = zc + gruboscZ / 2; // +3 dla y
p_d_x = xc, p_d_y = yc + 1.5f * gruboscY, p_d_z = zc + gruboscZ / 2; // +3 dla y
p_e_x = xc, p_e_y = yc - 6 , p_e_z = zc - gruboscZ / 2;
p_f_x = xc, p_f_y = yc - 6 , p_f_z = zc - gruboscZ / 2;
p_g_x = xc, p_g_y = yc - 6 , p_g_z = zc + gruboscZ / 2;
p_h_x = xc, p_h_y = yc - 6 , p_h_z = zc + gruboscZ / 2;
}
for (int i = 0; i < 2; i++) {
// d-----------c Y
// / /| ^
// a-----------b | \
// | h | g C->X
// | |/ |
// e-----------f v
// Z (płaszczyzna XZ, Y to trzeci wymiar)
// timestampedCout("main.cpp (plot): p_a_x=" << p_a_x << " p_b_x=" << p_b_x << " p_c_x=" << p_c_x << " p_d_x=" << p_d_x);
// ABCD
glTexCoord2d(1.0, 1.0); glVertex3d(p_a_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_a_y, p_a_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_b_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_b_y, p_b_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_c_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_c_y, p_c_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_d_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_d_y, p_d_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
// EFGH
glTexCoord2d(1.0, 1.0); glVertex3d(p_e_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_e_y, p_e_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_f_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_f_y, p_f_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_g_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_g_y, p_g_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_h_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_h_y, p_h_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
// BCGF
glTexCoord2d(1.0, 1.0); glVertex3d(p_b_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_b_y, p_b_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_c_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_c_y, p_c_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_g_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_g_y, p_g_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_f_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_f_y, p_f_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
// ADHE
glTexCoord2d(1.0, 1.0); glVertex3d(p_a_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_a_y, p_a_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_d_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_d_y, p_d_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_h_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_h_y, p_h_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_e_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_e_y, p_e_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
// ABFE
glTexCoord2d(1.0, 1.0); glVertex3d(p_a_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_a_y, p_a_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_b_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_b_y, p_b_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_f_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_f_y, p_f_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_e_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_e_y, p_e_z + (2*i-1) * (gruboscZ/2 - 5) * !mod_x);
// DCGH
glTexCoord2d(1.0, 1.0); glVertex3d(p_d_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_d_y, p_d_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(1.0, 0.0); glVertex3d(p_c_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_c_y, p_c_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 0.0); glVertex3d(p_g_x + (2*i-1) * (gruboscX/2 - 5) * mod_x, p_g_y, p_g_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
glTexCoord2d(0.0, 1.0); glVertex3d(p_h_x + (2*i-1) * (gruboscX/2 - 8) * mod_x, p_h_y, p_h_z + (2*i-1) * (gruboscZ/2 - 8) * !mod_x);
}
glEnd();
glDisable(GL_TEXTURE_2D);
}
//GLuint programID, VertexArrayID, MatrixID;
lazik user(10.0f, 0.0f, 0.0f, "res/models/lazik4.obj"); // obiekty eksportujemy z Forward Axis Z, Up Axis Y.
plane mapa( 0.0f, 0.0f, 0.0f, "res/models/mapka3_nofence_noplatform.obj");
void SetupRC() { void SetupRC() {
// Light values and coordinates // Light values and coordinates
GLfloat ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f}; //GLfloat ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };
GLfloat diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f}; //GLfloat diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };
GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f };
GLfloat lightPos[] = {50.0f, -100.0f, 50.0f, 1.0f}; //GLfloat lightPos[] = { 0.0f, 150.0f, 150.0f, 1.0f };
GLfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //GLfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f };
glEnable(GL_DEPTH_TEST); // Hidden surface removal glEnable(GL_DEPTH_TEST); // Hidden surface removal
glFrontFace(GL_CCW); // Counter clock-wise polygons face out glFrontFace(GL_CCW); // Counter clock-wise polygons face out
//glEnable(GL_CULL_FACE); // Do not calculate inside of jet // !!! znacząco poprawia wydajność glEnable(GL_CULL_FACE); // Do not calculate inside of jet // !!! znacząco poprawia wydajność
glDepthFunc(GL_LESS);
// Enable lighting // Enable lighting
glEnable(GL_LIGHTING); //glEnable(GL_LIGHTING);
// Setup and enable light 0 // Setup and enable light 0
glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight); //glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight);
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight); //glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
glLightfv(GL_LIGHT0, GL_SPECULAR, specular); //glLightfv(GL_LIGHT0, GL_SPECULAR, specular);
glLightfv(GL_LIGHT0, GL_POSITION, lightPos); //glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
glEnable(GL_LIGHT0); //glEnable(GL_LIGHT0);
// Enable color tracking // Enable color tracking
glEnable(GL_COLOR_MATERIAL); //glEnable(GL_COLOR_MATERIAL);
// Set Material properties to follow glColor values // Set Material properties to follow glColor values
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE); //glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
// All materials hereafter have full specular reflectivity // All materials hereafter have full specular reflectivity
// with a high shine // with a high shine
glMaterialfv(GL_FRONT, GL_SPECULAR, specref); //glMaterialfv(GL_FRONT, GL_SPECULAR, specref);
glMateriali(GL_FRONT, GL_SHININESS, 128); //glMateriali(GL_FRONT, GL_SHININESS, 128);
// White background // White background
glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
// Black brush // Black brush
//glColor3f(0.0, 0.0, 0.0);
glColor3f(0.0, 0.0, 0.0);
// Initialize GLEW // Initialize GLEW
timestampedCout("Inicjalizowanie GLEW..."); timestampedCout("Inicjalizowanie GLEW...");
@@ -779,15 +393,6 @@ void SetupRC() {
} }
timestampedCout("Zainicjalizowano GLFW3."); timestampedCout("Zainicjalizowano GLFW3.");
// glGenVertexArrays(1, &VertexArrayID);
// glBindVertexArray(VertexArrayID);
// Załaduj shadery
// programID = LoadShaders("res/shaders/TransformVertexShader.vertexshader", "res/shaders/TextureFragmentShader.fragmentshader");
// MatrixID = glGetUniformLocation(programID, "MVP");
// user.passProgramID(programID);
// Załaduj model z pliku .obj // Załaduj model z pliku .obj
timestampedCout("Ladowanie modelu lazika..."); timestampedCout("Ladowanie modelu lazika...");
@@ -811,6 +416,8 @@ void RenderScene(void) {
glRotatef(yRot, 0.0f, 1.0f, 0.0f); glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glRotatef(zRot, 0.0f, 0.0f, 1.0f); glRotatef(zRot, 0.0f, 0.0f, 1.0f);
// gluLookAt( // gluLookAt(
// 0, 0, 0, // the position of your camera, in world space // 0, 0, 0, // the position of your camera, in world space
// 0, 0, 0, // where you want to look at, in world space // 0, 0, 0, // where you want to look at, in world space
@@ -818,32 +425,19 @@ void RenderScene(void) {
// ); // );
switch (polygonmode) { switch (polygonmode) {
case 1: case 1:
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
break; break;
default: default:
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
} }
// prymitywny licznik FPS
if (monitormode) {
std::time_t now_t = std::time(nullptr);
//yRot -= 1; // showcase demo
if (now_t > monitormodehelper) {
std::cout << (int)(monitormodecounter / (now_t - monitormodehelper)) << " fps\n";
monitormodehelper = now_t;
monitormodecounter = 0;
}
else {
monitormodecounter++;
}
}
// Clear the screen // Clear the screen
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Use our shader // Use our shader
//timestampedCout("programID wynosi " << programID);
//glUseProgram(programID); //glUseProgram(programID);
// // Bind our texture in Texture Unit 0 // // Bind our texture in Texture Unit 0
@@ -866,36 +460,19 @@ void RenderScene(void) {
// Rysowanie mapy (nie porusza się) // Rysowanie mapy (nie porusza się)
glPushMatrix(); glPushMatrix();
glColor3f(0.0, 1.0, 0.0); // Zielony kolor dla mapy glColor3f(0.0, 1.0, 0.0); // Zielony kolor dla mapy
platforma(50.0f, 0.0f, 45.0f, 60.0f, 65.0f); mapa.draw();
//mapa.draw();
glPopMatrix(); glPopMatrix();
// Rysowanie łazika (porusza się i obraca) // Rysowanie łazika (porusza się i obraca)
glPushMatrix(); glPushMatrix();
glTranslatef(Foward, 0.0f, Sides); // Translacja łazika na jego pozycję glTranslatef(Foward, 0.0f, Sides); // Translacja łazika na jego pozycję
glRotatef(Rotation, 0.0f, 1.0f, 0.0f); // Obrót łazika wokół własnej osi glRotatef(Rotation, 0.0f, 1.0f, 0.0f); // Obrót łazika wokół własnej osi
glColor3f(1.0, 0.0, 0.0); // Czerwony kolor dla łazika glColor3f(1.0, 0.0, 0.0); // Czerwony kolor dla łazika
user.draw(); user.draw();
UpdateRover(); UpdateRover();
glPopMatrix(); 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);
// stodola(2.0f, 0.0f, -7.5f, 20.0f);
stodola(10.0f, 0.0f, 2.0f, 40.0f);
// Zamiana buforów (double buffering)
//glColor3f(1.0, 0.0, 0.0);
//user.draw();
//glColor3f(0.0, 1.0, 0.0);
//mapa.draw();
//glColor3f(0.0, 0.0, 0.0);
fpsCounter.update(); fpsCounter.update();
// Zamiana buforów (double buffering) // Zamiana buforów (double buffering)
@@ -912,7 +489,7 @@ void RenderScene(void) {
glMatrixMode(GL_MODELVIEW); // zmniejsza zużycie GPU glMatrixMode(GL_MODELVIEW); // zmniejsza zużycie GPU
// Flush drawing commands // Flush drawing commands
//glFlush(); // glFlush();
} }
// If necessary, creates a 3-3-2 palette for the device context listed. // If necessary, creates a 3-3-2 palette for the device context listed.
@@ -986,9 +563,11 @@ HPALETTE GetOpenGLPalette(HDC hDC) {
// Return the handle to the new palette // Return the handle to the new palette
return hRetPal; return hRetPal;
} }
void CreateConsole() { void CreateConsole()
{
// Tworzenie nowej konsoli // Tworzenie nowej konsoli
if (AllocConsole()) { if (AllocConsole())
{
// Przekierowanie standardowych strumieni do konsoli // Przekierowanie standardowych strumieni do konsoli
FILE* conin; FILE* conin;
FILE* conout; FILE* conout;
@@ -997,7 +576,8 @@ void CreateConsole() {
freopen_s(&conout, "conout$", "w", stdout); freopen_s(&conout, "conout$", "w", stdout);
freopen_s(&conerr, "conout$", "w", stderr); freopen_s(&conerr, "conout$", "w", stderr);
} }
else { else
{
MessageBox(NULL, "Nie udało się utworzyć konsoli.", "Błąd", MB_OK | MB_ICONERROR); MessageBox(NULL, "Nie udało się utworzyć konsoli.", "Błąd", MB_OK | MB_ICONERROR);
} }
} }
@@ -1090,56 +670,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
wglMakeCurrent(hDC, hRC); wglMakeCurrent(hDC, hRC);
SetupRC(); SetupRC();
// Create the rendering context and make it current /*
hRC = wglCreateContext(hDC); glGenTextures(2, &texture[0]); // tworzy obiekt tekstury
wglMakeCurrent(hDC, hRC);
SetupRC();
glGenTextures(3, &texture[0]); // tworzy obiekt tekstury
// ładuje pierwszy obraz tekstury (płotki): // ładuje pierwszy obraz tekstury:
bitmapData = LoadBitmapFile((char*)"res/img/woodenTextureHighExposure.bmp", &bitmapInfoHeader); bitmapData = LoadBitmapFile((char*)"Bitmapy\\checker.bmp", &bitmapInfoHeader);
glBindTexture(GL_TEXTURE_2D, texture[0]); // aktywuje obiekt tekstury glBindTexture(GL_TEXTURE_2D, texture[0]); // aktywuje obiekt tekstury
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
// tworzy obraz tekstury
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, bitmapInfoHeader.biWidth,
bitmapInfoHeader.biHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, bitmapData);
if (bitmapData) free(bitmapData);
// ładuje drugi obraz tekstury (ziemia):
bitmapData = LoadBitmapFile((char*)"res/img/grass02.bmp", &bitmapInfoHeader);
glBindTexture(GL_TEXTURE_2D, texture[1]); // aktywuje obiekt tekstury
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
// tworzy obraz tekstury
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, bitmapInfoHeader.biWidth,
bitmapInfoHeader.biHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, bitmapData);
if (bitmapData) free(bitmapData);
// ładuje trzeci obraz tekstury (dach stodoły):
bitmapData = LoadBitmapFile((char*)"res/img/barnroof.bmp", &bitmapInfoHeader);
glBindTexture(GL_TEXTURE_2D, texture[2]); // aktywuje obiekt tekstury
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
@@ -1149,9 +690,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (bitmapData) free(bitmapData); if (bitmapData) free(bitmapData);
// ładuje czwarty obraz tekstury (kamienista ściana): // ładuje drugi obraz tekstury:
bitmapData = LoadBitmapFile((char*)"res/img/brickwall.bmp", &bitmapInfoHeader); bitmapData = LoadBitmapFile((char*)"Bitmapy\\crate.bmp", &bitmapInfoHeader);
glBindTexture(GL_TEXTURE_2D, texture[3]); // aktywuje obiekt tekstury glBindTexture(GL_TEXTURE_2D, texture[1]); // aktywuje obiekt tekstury
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@ -1168,47 +709,45 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// ustalenie sposobu mieszania tekstury z tłem // ustalenie sposobu mieszania tekstury z tłem
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
*/
break; break;
// Window is being destroyed, cleanup // Window is being destroyed, cleanup
case WM_DESTROY: case WM_DESTROY:
user.unload(); // Deselect the current rendering context and delete it
wglMakeCurrent(hDC, NULL);
wglDeleteContext(hRC);
//glDeleteProgram(programID); // Delete the palette if it was created
//glDeleteVertexArrays(1, &VertexArrayID); if (hPalette != NULL) DeleteObject(hPalette);
// Deselect the current rendering context and delete it // Tell the application to terminate after the window
wglMakeCurrent(hDC, NULL); // is gone.
wglDeleteContext(hRC); PostQuitMessage(0);
break;
// Delete the palette if it was created
if (hPalette != NULL) DeleteObject(hPalette);
// Tell the application to terminate after the window
// is gone.
PostQuitMessage(0);
break;
// Window is resized. // Window is resized.
case WM_SIZE: case WM_SIZE:
// Call our function which modifies the clipping // Call our function which modifies the clipping
// volume and viewport // volume and viewport
ChangeSize(LOWORD(lParam), HIWORD(lParam)); ChangeSize(LOWORD(lParam), HIWORD(lParam));
break; break;
// The painting function. This message sent by Windows // The painting function. This message sent by Windows
// whenever the screen needs updating. // whenever the screen needs updating.
case WM_PAINT: case WM_PAINT:
// Call OpenGL drawing code // Call OpenGL drawing code
RenderScene(); RenderScene();
SwapBuffers(hDC); SwapBuffers(hDC);
// Validate the newly painted client area // Validate the newly painted client area
if (!monitormode) ValidateRect(hWnd, NULL); if (!monitormode) {
else InvalidateRect(hWnd, NULL, FALSE); ValidateRect(hWnd, NULL);
break; }
else {
InvalidateRect(hWnd, NULL, FALSE);
}
// Limit FPS // Limit FPS
LimitFPS(targetFPS); LimitFPS(targetFPS);
@@ -1325,15 +864,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case 'D': case 'D':
keyDPressed = true; keyDPressed = true;
break; break;
case 114: // F3
monitormode = !monitormode;
if (monitormode) {
monitormodehelper = std::time(nullptr) - 1;
timestampedCout("Wlaczono tryb monitorowania wydajnosci.");
}
if (!monitormode) timestampedCout("Wylaczono tryb monitorowania wydajnosci.");
break;
default: default:
timestampedCout("Nacisnieto nierozpoznany klawisz: " << (int)wParam); timestampedCout("Nacisnieto nierozpoznany klawisz: " << (int)wParam);
@@ -1364,12 +896,12 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
break; break;
case WM_TIMER: case WM_TIMER:
{
RenderScene(); RenderScene();
SwapBuffers(hDC); SwapBuffers(hDC);
ValidateRect(hWnd, NULL); ValidateRect(hWnd, NULL);
break; break;
}
default: // Passes it on if unproccessed default: // Passes it on if unproccessed
return (DefWindowProc(hWnd, message, wParam, lParam)); return (DefWindowProc(hWnd, message, wParam, lParam));
} }

View File

@@ -8,7 +8,6 @@
#include "timeh.hpp" #include "timeh.hpp"
#include "GL/glm/glm.hpp" #include "GL/glm/glm.hpp"
#include "loadOBJ.h" #include "loadOBJ.h"
#include "texture.hpp"
class plane { class plane {
private: private:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

View File

@@ -1,47 +1,44 @@
# Blender3D v249 OBJ File: untitled.blend # Blender 4.2.1 LTS
# www.blender3d.org # www.blender.org
mtllib cube.mtl o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000 v 1.000000 1.000000 -1.000000
v 0.999999 1.000000 1.000001 v 1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000 v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 -1.000000 v -1.000000 1.000000 -1.000000
vt 0.748573 0.750412 v -1.000000 -1.000000 -1.000000
vt 0.749279 0.501284 v -1.000000 1.000000 1.000000
vt 0.999110 0.501077 v -1.000000 -1.000000 1.000000
vt 0.999455 0.750380 vn -0.0000 1.0000 -0.0000
vt 0.250471 0.500702 vn -0.0000 -0.0000 1.0000
vt 0.249682 0.749677 vn -1.0000 -0.0000 -0.0000
vt 0.001085 0.750380 vn -0.0000 -1.0000 -0.0000
vt 0.001517 0.499994 vn 1.0000 -0.0000 -0.0000
vt 0.499422 0.500239 vn -0.0000 -0.0000 -1.0000
vt 0.500149 0.750166 vt 0.875000 0.500000
vt 0.748355 0.998230 vt 0.625000 0.750000
vt 0.500193 0.998728 vt 0.625000 0.500000
vt 0.498993 0.250415 vt 0.375000 1.000000
vt 0.748953 0.250920 vt 0.375000 0.750000
vn 0.000000 0.000000 -1.000000 vt 0.625000 0.000000
vn -1.000000 -0.000000 -0.000000 vt 0.375000 0.250000
vn -0.000000 -0.000000 1.000000 vt 0.375000 0.000000
vn -0.000001 0.000000 1.000000 vt 0.375000 0.500000
vn 1.000000 -0.000000 0.000000 vt 0.125000 0.750000
vn 1.000000 0.000000 0.000001 vt 0.125000 0.500000
vn 0.000000 1.000000 -0.000000 vt 0.625000 0.250000
vn -0.000000 -1.000000 0.000000 vt 0.875000 0.750000
usemtl Material_ray.png vt 0.625000 1.000000
s off s 0
f 5/1/1 1/2/1 4/3/1 f 5/1/1 3/2/1 1/3/1
f 5/1/1 4/3/1 8/4/1 f 3/2/2 8/4/2 4/5/2
f 3/5/2 7/6/2 8/7/2 f 7/6/3 6/7/3 8/8/3
f 3/5/2 8/7/2 4/8/2 f 2/9/4 8/10/4 6/11/4
f 2/9/3 6/10/3 3/5/3 f 1/3/5 4/5/5 2/9/5
f 6/10/4 7/6/4 3/5/4 f 5/12/6 2/9/6 6/7/6
f 1/2/5 5/1/5 2/9/5 f 5/1/1 7/13/1 3/2/1
f 5/1/6 6/10/6 2/9/6 f 3/2/2 7/14/2 8/4/2
f 5/1/7 8/11/7 6/10/7 f 7/6/3 5/12/3 6/7/3
f 8/11/7 7/12/7 6/10/7 f 2/9/4 4/5/4 8/10/4
f 1/2/8 2/9/8 3/13/8 f 1/3/5 3/2/5 4/5/5
f 1/2/8 3/13/8 4/14/8 f 5/12/6 1/3/6 2/9/6

View File

@@ -1,44 +0,0 @@
# Blender 4.2.1 LTS
# www.blender.org
o Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 1.000000
vn -0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.625000 0.500000
vt 0.375000 1.000000
vt 0.375000 0.750000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.375000 0.500000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.625000 0.250000
vt 0.875000 0.750000
vt 0.625000 1.000000
s 0
f 5/1/1 3/2/1 1/3/1
f 3/2/2 8/4/2 4/5/2
f 7/6/3 6/7/3 8/8/3
f 2/9/4 8/10/4 6/11/4
f 1/3/5 4/5/5 2/9/5
f 5/12/6 2/9/6 6/7/6
f 5/1/1 7/13/1 3/2/1
f 3/2/2 7/14/2 8/4/2
f 7/6/3 5/12/3 6/7/3
f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6

View File

@@ -1,44 +0,0 @@
# Blender 4.2.1 LTS
# www.blender.org
o Cube
v 10.000000 10.000000 -10.000000
v 10.000000 -10.000000 -10.000000
v 10.000000 10.000000 10.000000
v 10.000000 -10.000000 10.000000
v -10.000000 10.000000 -10.000000
v -10.000000 -10.000000 -10.000000
v -10.000000 10.000000 10.000000
v -10.000000 -10.000000 10.000000
vn -0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vt 0.500000 0.250000
vt 0.750000 0.500000
vt 0.500000 0.500000
vt 1.000000 0.750000
vt 0.750000 0.750000
vt 0.000000 0.500000
vt 0.250000 0.750000
vt 0.000000 0.750000
vt 0.500000 0.750000
vt 0.750000 1.000000
vt 0.500000 1.000000
vt 0.250000 0.500000
vt 0.750000 0.250000
vt 1.000000 0.500000
s 0
f 5/1/1 3/2/1 1/3/1
f 3/2/2 8/4/2 4/5/2
f 7/6/3 6/7/3 8/8/3
f 2/9/4 8/10/4 6/11/4
f 1/3/5 4/5/5 2/9/5
f 5/12/6 2/9/6 6/7/6
f 5/1/1 7/13/1 3/2/1
f 3/2/2 7/14/2 8/4/2
f 7/6/3 5/12/3 6/7/3
f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6

View File

@@ -1,20 +1,20 @@
# Blender 4.2.1 LTS # Blender 4.2.1 LTS
# www.blender.org # www.blender.org
o platforma o platforma
v -10.000000 0.000000 110.000000 v 220.000000 0.000000 20.000000
v -10.000000 -2.000000 110.000000 v 220.000000 -4.000000 20.000000
v -10.000000 0.000000 -20.000000 v -40.000000 0.000000 20.000000
v -10.000000 -2.000000 -20.000000 v -40.000000 -4.000000 20.000000
v 110.000000 0.000000 110.000000 v 220.000000 0.000000 -220.000000
v 110.000000 -2.000000 110.000000 v 220.000000 -4.000000 -220.000000
v 110.000000 0.000000 -20.000000 v -40.000000 0.000000 -220.000000
v 110.000000 -2.000000 -20.000000 v -40.000000 -4.000000 -220.000000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn 1.0000 -0.0000 -0.0000
vt 0.875000 0.500000 vt 0.875000 0.500000
vt 0.625000 0.750000 vt 0.625000 0.750000
vt 0.625000 0.500000 vt 0.625000 0.500000
@@ -43,70 +43,70 @@ f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5 f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6 f 5/12/6 1/3/6 2/9/6
o szopa o szopa
v 10.000000 0.000000 -19.000000 v -38.000000 0.000000 -20.000000
v 10.000000 21.000000 -19.000000 v -38.000000 42.000000 -20.000000
v 10.000000 0.000000 -1.000000 v -2.000000 0.000000 -20.000000
v 10.000000 21.000000 -1.000000 v -2.000000 42.000000 -20.000000
v -9.000000 0.000000 -19.000000 v -38.000000 0.000000 18.000000
v -9.000000 21.000000 -19.000000 v -38.000000 42.000000 18.000000
v -9.000000 0.000000 -1.000000 v -2.000000 0.000000 18.000000
v -9.000000 21.000000 -1.000000 v -2.000000 42.000000 18.000000
v 10.000000 0.000000 -3.000000 v -6.000000 0.000000 -20.000000
v 10.000000 0.000000 -17.000000 v -34.000000 0.000000 -20.000000
v 10.000000 2.333333 -19.000000 v -38.000000 4.666666 -20.000000
v 10.000000 4.666667 -19.000000 v -38.000000 9.333333 -20.000000
v 10.000000 7.000000 -19.000000 v -38.000000 14.000000 -20.000000
v 10.000000 9.333334 -19.000000 v -38.000000 18.666668 -20.000000
v 10.000000 11.666667 -19.000000 v -38.000000 23.333334 -20.000000
v 10.000000 14.000000 -19.000000 v -38.000000 28.000000 -20.000000
v 10.000000 16.333334 -19.000000 v -38.000000 32.666668 -20.000000
v 10.000000 18.666668 -19.000000 v -38.000000 37.333336 -20.000000
v 10.000000 21.000000 -17.000000 v -34.000000 42.000000 -20.000000
v 10.000000 21.000000 -15.000000 v -30.000000 42.000000 -20.000000
v 10.000000 21.000000 -13.000000 v -26.000000 42.000000 -20.000000
v 10.000000 21.000000 -11.000000 v -22.000000 42.000000 -20.000000
v 10.000000 21.000000 -9.000000 v -18.000000 42.000000 -20.000000
v 10.000000 21.000000 -7.000000 v -14.000000 42.000000 -20.000000
v 10.000000 21.000000 -5.000000 v -10.000000 42.000000 -20.000000
v 10.000000 21.000000 -3.000000 v -6.000000 42.000000 -20.000000
v 10.000000 18.666668 -1.000000 v -2.000000 37.333336 -20.000000
v 10.000000 16.333334 -1.000000 v -2.000000 32.666668 -20.000000
v 10.000000 14.000000 -1.000000 v -2.000000 28.000000 -20.000000
v 10.000000 11.666666 -1.000000 v -2.000000 23.333332 -20.000000
v 10.000000 9.333333 -1.000000 v -2.000000 18.666666 -20.000000
v 10.000000 7.000000 -1.000000 v -2.000000 14.000000 -20.000000
v 10.000000 4.666667 -1.000000 v -2.000000 9.333333 -20.000000
v 10.000000 2.333333 -1.000000 v -2.000000 4.666666 -20.000000
v 10.000000 2.333333 -17.000000 v -34.000000 4.666666 -20.000000
v 10.000000 2.333333 -3.000000 v -6.000000 4.666666 -20.000000
v 10.000000 4.666667 -17.000000 v -34.000000 9.333333 -20.000000
v 10.000000 4.666667 -3.000000 v -6.000000 9.333333 -20.000000
v 10.000000 7.000000 -17.000000 v -34.000000 14.000000 -20.000000
v 10.000000 7.000000 -3.000000 v -6.000000 14.000000 -20.000000
v 10.000000 9.333334 -17.000000 v -34.000000 18.666668 -20.000000
v 10.000000 9.333334 -15.000000 v -30.000000 18.666668 -20.000000
v 10.000000 9.333333 -5.000000 v -10.000000 18.666666 -20.000000
v 10.000000 9.333333 -3.000000 v -6.000000 18.666666 -20.000000
v 10.000000 11.666667 -17.000000 v -34.000000 23.333334 -20.000000
v 10.000000 11.666667 -15.000000 v -30.000000 23.333334 -20.000000
v 10.000000 11.666667 -13.000000 v -26.000000 23.333334 -20.000000
v 10.000000 11.666667 -11.000000 v -22.000000 23.333334 -20.000000
v 10.000000 11.666667 -9.000000 v -18.000000 23.333334 -20.000000
v 10.000000 11.666667 -7.000000 v -14.000000 23.333334 -20.000000
v 10.000000 11.666667 -5.000000 v -10.000000 23.333334 -20.000000
v 10.000000 11.666666 -3.000000 v -6.000000 23.333332 -20.000000
v 10.000000 21.000000 -19.000000 v -38.000000 42.000000 -20.000000
v 10.000000 21.000000 -1.000000 v -2.000000 42.000000 -20.000000
v -9.000000 21.000000 -19.000000 v -38.000000 42.000000 18.000000
v -9.000000 21.000000 -1.000000 v -2.000000 42.000000 18.000000
v 10.000000 32.000000 -10.000000 v -20.000000 64.000000 -20.000000
v -9.000000 32.000000 -10.000000 v -20.000000 64.000000 18.000000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000 vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn -0.7740 0.6332 -0.0000
vn -0.0000 0.6332 -0.7740 vn 0.7740 0.6332 -0.0000
vn -0.0000 0.6332 0.7740
vt 0.513889 0.250000 vt 0.513889 0.250000
vt 0.541667 0.250000 vt 0.541667 0.250000
vt 0.375000 0.500000 vt 0.375000 0.500000
@@ -266,26 +266,26 @@ f 24/36/10 25/89/10 27/37/10
f 66/44/11 65/90/11 61/45/11 f 66/44/11 65/90/11 61/45/11
f 62/47/12 65/91/12 66/48/12 f 62/47/12 65/91/12 66/48/12
o plot_baza1 o plot_baza1
v -9.500000 1.000000 -23.000000 v -46.000000 2.000000 19.000000
v -9.500000 4.000000 -23.000000 v -46.000000 8.000000 19.000000
v -9.500000 1.000000 113.000000 v 226.000000 2.000000 19.000000
v -9.500000 4.000000 113.000000 v 226.000000 8.000000 19.000000
v -10.500000 1.000000 -23.000000 v -46.000000 2.000000 21.000000
v -10.500000 4.000000 -23.000000 v -46.000000 8.000000 21.000000
v -10.500000 1.000000 113.000000 v 226.000000 2.000000 21.000000
v -10.500000 4.000000 113.000000 v 226.000000 8.000000 21.000000
v -9.500000 5.000000 -23.000000 v -46.000000 10.000000 19.000000
v -9.500000 8.000000 -23.000000 v -46.000000 16.000000 19.000000
v -9.500000 5.000000 113.000000 v 226.000000 10.000000 19.000000
v -9.500000 8.000000 113.000000 v 226.000000 16.000000 19.000000
v -10.500000 5.000000 -23.000000 v -46.000000 10.000000 21.000000
v -10.500000 8.000000 -23.000000 v -46.000000 16.000000 21.000000
v -10.500000 5.000000 113.000000 v 226.000000 10.000000 21.000000
v -10.500000 8.000000 113.000000 v 226.000000 16.000000 21.000000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -328,26 +328,26 @@ f 80/99/16 76/104/16 75/100/16
f 81/96/17 79/98/17 75/101/17 f 81/96/17 79/98/17 75/101/17
f 78/103/18 76/105/18 80/99/18 f 78/103/18 76/105/18 80/99/18
o plot_baza2 o plot_baza2
v 111.500000 1.000000 -23.000000 v -46.000000 2.000000 -223.000000
v 111.500000 4.000000 -23.000000 v -46.000000 8.000000 -223.000000
v 111.500000 1.000000 113.000000 v 226.000000 2.000000 -223.000000
v 111.500000 4.000000 113.000000 v 226.000000 8.000000 -223.000000
v 110.500000 1.000000 -23.000000 v -46.000000 2.000000 -221.000000
v 110.500000 4.000000 -23.000000 v -46.000000 8.000000 -221.000000
v 110.500000 1.000000 113.000000 v 226.000000 2.000000 -221.000000
v 110.500000 4.000000 113.000000 v 226.000000 8.000000 -221.000000
v 111.500000 5.000000 -23.000000 v -46.000000 10.000000 -223.000000
v 111.500000 8.000000 -23.000000 v -46.000000 16.000000 -223.000000
v 111.500000 5.000000 113.000000 v 226.000000 10.000000 -223.000000
v 111.500000 8.000000 113.000000 v 226.000000 16.000000 -223.000000
v 110.500000 5.000000 -23.000000 v -46.000000 10.000000 -221.000000
v 110.500000 8.000000 -23.000000 v -46.000000 16.000000 -221.000000
v 110.500000 5.000000 113.000000 v 226.000000 10.000000 -221.000000
v 110.500000 8.000000 113.000000 v 226.000000 16.000000 -221.000000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -390,26 +390,26 @@ f 96/113/22 92/118/22 91/114/22
f 97/110/23 95/112/23 91/115/23 f 97/110/23 95/112/23 91/115/23
f 94/117/24 92/119/24 96/113/24 f 94/117/24 92/119/24 96/113/24
o plot_baza3 o plot_baza3
v -12.000000 1.000000 -21.499996 v -42.999992 2.000000 24.000000
v -12.000000 4.000000 -21.499996 v -42.999992 8.000000 24.000000
v 113.000000 1.000000 -21.500004 v -43.000008 2.000000 -226.000000
v 113.000000 4.000000 -21.500004 v -43.000008 8.000000 -226.000000
v -12.000000 1.000000 -20.499996 v -40.999992 2.000000 24.000000
v -12.000000 4.000000 -20.499996 v -40.999992 8.000000 24.000000
v 113.000000 1.000000 -20.500004 v -41.000008 2.000000 -226.000000
v 113.000000 4.000000 -20.500004 v -41.000008 8.000000 -226.000000
v -12.000000 5.000000 -21.499996 v -42.999992 10.000000 24.000000
v -12.000000 8.000000 -21.499996 v -42.999992 16.000000 24.000000
v 113.000000 5.000000 -21.500004 v -43.000008 10.000000 -226.000000
v 113.000000 8.000000 -21.500004 v -43.000008 16.000000 -226.000000
v -12.000000 5.000000 -20.499996 v -40.999992 10.000000 24.000000
v -12.000000 8.000000 -20.499996 v -40.999992 16.000000 24.000000
v 113.000000 5.000000 -20.500004 v -41.000008 10.000000 -226.000000
v 113.000000 8.000000 -20.500004 v -41.000008 16.000000 -226.000000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000 vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -452,26 +452,26 @@ f 112/127/28 108/132/28 107/128/28
f 113/124/29 111/126/29 107/129/29 f 113/124/29 111/126/29 107/129/29
f 110/131/30 108/133/30 112/127/30 f 110/131/30 108/133/30 112/127/30
o plot_baza4 o plot_baza4
v -12.000000 1.000000 110.500000 v 221.000000 2.000000 24.000000
v -12.000000 4.000000 110.500000 v 221.000000 8.000000 24.000000
v 113.000000 1.000000 110.500000 v 221.000000 2.000000 -226.000000
v 113.000000 4.000000 110.500000 v 221.000000 8.000000 -226.000000
v -12.000000 1.000000 111.500000 v 223.000000 2.000000 24.000000
v -12.000000 4.000000 111.500000 v 223.000000 8.000000 24.000000
v 113.000000 1.000000 111.500000 v 223.000000 2.000000 -226.000000
v 113.000000 4.000000 111.500000 v 223.000000 8.000000 -226.000000
v -12.000000 5.000000 110.500000 v 221.000000 10.000000 24.000000
v -12.000000 8.000000 110.500000 v 221.000000 16.000000 24.000000
v 113.000000 5.000000 110.500000 v 221.000000 10.000000 -226.000000
v 113.000000 8.000000 110.500000 v 221.000000 16.000000 -226.000000
v -12.000000 5.000000 111.500000 v 223.000000 10.000000 24.000000
v -12.000000 8.000000 111.500000 v 223.000000 16.000000 24.000000
v 113.000000 5.000000 111.500000 v 223.000000 10.000000 -226.000000
v 113.000000 8.000000 111.500000 v 223.000000 16.000000 -226.000000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000 vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -514,58 +514,58 @@ f 128/141/34 124/146/34 123/142/34
f 129/138/35 127/140/35 123/143/35 f 129/138/35 127/140/35 123/143/35
f 126/145/36 124/147/36 128/141/36 f 126/145/36 124/147/36 128/141/36
o plot_trzon1 o plot_trzon1
v -10.500000 -0.500000 -0.500000 v -1.000000 -1.000000 21.000000
v -10.500000 8.500000 -0.500000 v -1.000000 17.000000 21.000000
v -10.500000 -0.500000 1.500000 v 3.000000 -1.000000 21.000000
v -10.500000 8.500000 1.500000 v 3.000000 17.000000 21.000000
v -11.500000 -0.500000 -0.500000 v -1.000000 -1.000000 23.000000
v -11.500000 8.500000 -0.500000 v -1.000000 17.000000 23.000000
v -11.500000 -0.500000 1.500000 v 3.000000 -1.000000 23.000000
v -11.500000 8.500000 1.500000 v 3.000000 17.000000 23.000000
v -10.500000 -0.500000 19.500000 v 39.000000 -1.000000 21.000000
v -10.500000 8.500000 19.500000 v 39.000000 17.000000 21.000000
v -10.500000 -0.500000 21.500000 v 43.000000 -1.000000 21.000000
v -10.500000 8.500000 21.500000 v 43.000000 17.000000 21.000000
v -11.500000 -0.500000 19.500000 v 39.000000 -1.000000 23.000000
v -11.500000 8.500000 19.500000 v 39.000000 17.000000 23.000000
v -11.500000 -0.500000 21.500000 v 43.000000 -1.000000 23.000000
v -11.500000 8.500000 21.500000 v 43.000000 17.000000 23.000000
v -10.500000 -0.500000 39.500000 v 79.000000 -1.000000 21.000000
v -10.500000 8.500000 39.500000 v 79.000000 17.000000 21.000000
v -10.500000 -0.500000 41.500000 v 83.000000 -1.000000 21.000000
v -10.500000 8.500000 41.500000 v 83.000000 17.000000 21.000000
v -11.500000 -0.500000 39.500000 v 79.000000 -1.000000 23.000000
v -11.500000 8.500000 39.500000 v 79.000000 17.000000 23.000000
v -11.500000 -0.500000 41.500000 v 83.000000 -1.000000 23.000000
v -11.500000 8.500000 41.500000 v 83.000000 17.000000 23.000000
v -10.500000 -0.500000 59.500000 v 119.000000 -1.000000 21.000000
v -10.500000 8.500000 59.500000 v 119.000000 17.000000 21.000000
v -10.500000 -0.500000 61.500000 v 123.000000 -1.000000 21.000000
v -10.500000 8.500000 61.500000 v 123.000000 17.000000 21.000000
v -11.500000 -0.500000 59.500000 v 119.000000 -1.000000 23.000000
v -11.500000 8.500000 59.500000 v 119.000000 17.000000 23.000000
v -11.500000 -0.500000 61.500000 v 123.000000 -1.000000 23.000000
v -11.500000 8.500000 61.500000 v 123.000000 17.000000 23.000000
v -10.500000 -0.500000 79.500000 v 159.000000 -1.000000 21.000000
v -10.500000 8.500000 79.500000 v 159.000000 17.000000 21.000000
v -10.500000 -0.500000 81.500000 v 163.000000 -1.000000 21.000000
v -10.500000 8.500000 81.500000 v 163.000000 17.000000 21.000000
v -11.500000 -0.500000 79.500000 v 159.000000 -1.000000 23.000000
v -11.500000 8.500000 79.500000 v 159.000000 17.000000 23.000000
v -11.500000 -0.500000 81.500000 v 163.000000 -1.000000 23.000000
v -11.500000 8.500000 81.500000 v 163.000000 17.000000 23.000000
v -10.500000 -0.500000 99.500000 v 199.000000 -1.000000 21.000000
v -10.500000 8.500000 99.500000 v 199.000000 17.000000 21.000000
v -10.500000 -0.500000 101.500000 v 203.000000 -1.000000 21.000000
v -10.500000 8.500000 101.500000 v 203.000000 17.000000 21.000000
v -11.500000 -0.500000 99.500000 v 199.000000 -1.000000 23.000000
v -11.500000 8.500000 99.500000 v 199.000000 17.000000 23.000000
v -11.500000 -0.500000 101.500000 v 203.000000 -1.000000 23.000000
v -11.500000 8.500000 101.500000 v 203.000000 17.000000 23.000000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -656,58 +656,58 @@ f 176/155/40 172/160/40 171/156/40
f 177/152/41 175/154/41 171/157/41 f 177/152/41 175/154/41 171/157/41
f 174/159/42 172/161/42 176/155/42 f 174/159/42 172/161/42 176/155/42
o plot_trzon4 o plot_trzon4
v 1.000000 -0.500000 112.000000 v 224.000000 -1.000000 -2.000000
v 1.000000 8.500000 112.000000 v 224.000000 17.000000 -2.000000
v 3.000000 -0.500000 112.000000 v 224.000000 -1.000000 -6.000000
v 3.000000 8.500000 112.000000 v 224.000000 17.000000 -6.000000
v 1.000000 -0.500000 113.000000 v 226.000000 -1.000000 -2.000000
v 1.000000 8.500000 113.000000 v 226.000000 17.000000 -2.000000
v 3.000000 -0.500000 113.000000 v 226.000000 -1.000000 -6.000000
v 3.000000 8.500000 113.000000 v 226.000000 17.000000 -6.000000
v 21.000000 -0.500000 112.000000 v 224.000000 -1.000000 -42.000000
v 21.000000 8.500000 112.000000 v 224.000000 17.000000 -42.000000
v 23.000000 -0.500000 112.000000 v 224.000000 -1.000000 -46.000000
v 23.000000 8.500000 112.000000 v 224.000000 17.000000 -46.000000
v 21.000000 -0.500000 113.000000 v 226.000000 -1.000000 -42.000000
v 21.000000 8.500000 113.000000 v 226.000000 17.000000 -42.000000
v 23.000000 -0.500000 113.000000 v 226.000000 -1.000000 -46.000000
v 23.000000 8.500000 113.000000 v 226.000000 17.000000 -46.000000
v 41.000000 -0.500000 112.000000 v 224.000000 -1.000000 -82.000000
v 41.000000 8.500000 112.000000 v 224.000000 17.000000 -82.000000
v 43.000000 -0.500000 112.000000 v 224.000000 -1.000000 -86.000000
v 43.000000 8.500000 112.000000 v 224.000000 17.000000 -86.000000
v 41.000000 -0.500000 113.000000 v 226.000000 -1.000000 -82.000000
v 41.000000 8.500000 113.000000 v 226.000000 17.000000 -82.000000
v 43.000000 -0.500000 113.000000 v 226.000000 -1.000000 -86.000000
v 43.000000 8.500000 113.000000 v 226.000000 17.000000 -86.000000
v 61.000000 -0.500000 112.000000 v 224.000000 -1.000000 -122.000000
v 61.000000 8.500000 112.000000 v 224.000000 17.000000 -122.000000
v 63.000000 -0.500000 112.000000 v 224.000000 -1.000000 -126.000000
v 63.000000 8.500000 112.000000 v 224.000000 17.000000 -126.000000
v 61.000000 -0.500000 113.000000 v 226.000000 -1.000000 -122.000000
v 61.000000 8.500000 113.000000 v 226.000000 17.000000 -122.000000
v 63.000000 -0.500000 113.000000 v 226.000000 -1.000000 -126.000000
v 63.000000 8.500000 113.000000 v 226.000000 17.000000 -126.000000
v 81.000000 -0.500000 112.000000 v 224.000000 -1.000000 -162.000000
v 81.000000 8.500000 112.000000 v 224.000000 17.000000 -162.000000
v 83.000000 -0.500000 112.000000 v 224.000000 -1.000000 -166.000000
v 83.000000 8.500000 112.000000 v 224.000000 17.000000 -166.000000
v 81.000000 -0.500000 113.000000 v 226.000000 -1.000000 -162.000000
v 81.000000 8.500000 113.000000 v 226.000000 17.000000 -162.000000
v 83.000000 -0.500000 113.000000 v 226.000000 -1.000000 -166.000000
v 83.000000 8.500000 113.000000 v 226.000000 17.000000 -166.000000
v 101.000000 -0.500000 112.000000 v 224.000000 -1.000000 -202.000000
v 101.000000 8.500000 112.000000 v 224.000000 17.000000 -202.000000
v 103.000000 -0.500000 112.000000 v 224.000000 -1.000000 -206.000000
v 103.000000 8.500000 112.000000 v 224.000000 17.000000 -206.000000
v 101.000000 -0.500000 113.000000 v 226.000000 -1.000000 -202.000000
v 101.000000 8.500000 113.000000 v 226.000000 17.000000 -202.000000
v 103.000000 -0.500000 113.000000 v 226.000000 -1.000000 -206.000000
v 103.000000 8.500000 113.000000 v 226.000000 17.000000 -206.000000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000 vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -798,66 +798,66 @@ f 224/169/46 220/174/46 219/170/46
f 225/166/47 223/168/47 219/171/47 f 225/166/47 223/168/47 219/171/47
f 222/173/48 220/175/48 224/169/48 f 222/173/48 220/175/48 224/169/48
o plot_trzon2 o plot_trzon2
v 112.500000 -0.500000 3.500000 v 7.000000 -1.000000 -225.000000
v 112.500000 8.500000 3.500000 v 7.000000 17.000000 -225.000000
v 112.500000 -0.500000 5.500000 v 11.000000 -1.000000 -225.000000
v 112.500000 8.500000 5.500000 v 11.000000 17.000000 -225.000000
v 111.500000 -0.500000 3.500000 v 7.000000 -1.000000 -223.000000
v 111.500000 8.500000 3.500000 v 7.000000 17.000000 -223.000000
v 111.500000 -0.500000 5.500000 v 11.000000 -1.000000 -223.000000
v 111.500000 8.500000 5.500000 v 11.000000 17.000000 -223.000000
v 112.500000 -0.500000 23.500000 v 47.000000 -1.000000 -225.000000
v 112.500000 8.500000 23.500000 v 47.000000 17.000000 -225.000000
v 112.500000 -0.500000 25.500000 v 51.000000 -1.000000 -225.000000
v 112.500000 8.500000 25.500000 v 51.000000 17.000000 -225.000000
v 111.500000 -0.500000 23.500000 v 47.000000 -1.000000 -223.000000
v 111.500000 8.500000 23.500000 v 47.000000 17.000000 -223.000000
v 111.500000 -0.500000 25.500000 v 51.000000 -1.000000 -223.000000
v 111.500000 8.500000 25.500000 v 51.000000 17.000000 -223.000000
v 112.500000 -0.500000 43.500000 v 87.000000 -1.000000 -225.000000
v 112.500000 8.500000 43.500000 v 87.000000 17.000000 -225.000000
v 112.500000 -0.500000 45.500000 v 91.000000 -1.000000 -225.000000
v 112.500000 8.500000 45.500000 v 91.000000 17.000000 -225.000000
v 111.500000 -0.500000 43.500000 v 87.000000 -1.000000 -223.000000
v 111.500000 8.500000 43.500000 v 87.000000 17.000000 -223.000000
v 111.500000 -0.500000 45.500000 v 91.000000 -1.000000 -223.000000
v 111.500000 8.500000 45.500000 v 91.000000 17.000000 -223.000000
v 112.500000 -0.500000 63.500000 v 127.000000 -1.000000 -225.000000
v 112.500000 8.500000 63.500000 v 127.000000 17.000000 -225.000000
v 112.500000 -0.500000 65.500000 v 131.000000 -1.000000 -225.000000
v 112.500000 8.500000 65.500000 v 131.000000 17.000000 -225.000000
v 111.500000 -0.500000 63.500000 v 127.000000 -1.000000 -223.000000
v 111.500000 8.500000 63.500000 v 127.000000 17.000000 -223.000000
v 111.500000 -0.500000 65.500000 v 131.000000 -1.000000 -223.000000
v 111.500000 8.500000 65.500000 v 131.000000 17.000000 -223.000000
v 112.500000 -0.500000 83.500000 v 167.000000 -1.000000 -225.000000
v 112.500000 8.500000 83.500000 v 167.000000 17.000000 -225.000000
v 112.500000 -0.500000 85.500000 v 171.000000 -1.000000 -225.000000
v 112.500000 8.500000 85.500000 v 171.000000 17.000000 -225.000000
v 111.500000 -0.500000 83.500000 v 167.000000 -1.000000 -223.000000
v 111.500000 8.500000 83.500000 v 167.000000 17.000000 -223.000000
v 111.500000 -0.500000 85.500000 v 171.000000 -1.000000 -223.000000
v 111.500000 8.500000 85.500000 v 171.000000 17.000000 -223.000000
v 112.500000 -0.500000 103.500000 v 207.000000 -1.000000 -225.000000
v 112.500000 8.500000 103.500000 v 207.000000 17.000000 -225.000000
v 112.500000 -0.500000 105.500000 v 211.000000 -1.000000 -225.000000
v 112.500000 8.500000 105.500000 v 211.000000 17.000000 -225.000000
v 111.500000 -0.500000 103.500000 v 207.000000 -1.000000 -223.000000
v 111.500000 8.500000 103.500000 v 207.000000 17.000000 -223.000000
v 111.500000 -0.500000 105.500000 v 211.000000 -1.000000 -223.000000
v 111.500000 8.500000 105.500000 v 211.000000 17.000000 -223.000000
v 112.500000 -0.500000 -16.500000 v -33.000000 -1.000000 -225.000000
v 112.500000 8.500000 -16.500000 v -33.000000 17.000000 -225.000000
v 112.500000 -0.500000 -14.500000 v -29.000000 -1.000000 -225.000000
v 112.500000 8.500000 -14.500000 v -29.000000 17.000000 -225.000000
v 111.500000 -0.500000 -16.500000 v -33.000000 -1.000000 -223.000000
v 111.500000 8.500000 -16.500000 v -33.000000 17.000000 -223.000000
v 111.500000 -0.500000 -14.500000 v -29.000000 -1.000000 -223.000000
v 111.500000 8.500000 -14.500000 v -29.000000 17.000000 -223.000000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000 vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000
@@ -958,58 +958,58 @@ f 280/183/52 276/188/52 275/184/52
f 281/180/53 279/182/53 275/185/53 f 281/180/53 279/182/53 275/185/53
f 278/187/54 276/189/54 280/183/54 f 278/187/54 276/189/54 280/183/54
o plot_trzon3 o plot_trzon3
v 1.000000 -0.500000 -21.999998 v -43.999996 -1.000000 -2.000000
v 1.000000 8.500000 -21.999998 v -43.999996 17.000000 -2.000000
v 3.000000 -0.500000 -21.999998 v -43.999996 -1.000000 -6.000000
v 3.000000 8.500000 -21.999998 v -43.999996 17.000000 -6.000000
v 1.000000 -0.500000 -20.999998 v -41.999996 -1.000000 -2.000000
v 1.000000 8.500000 -20.999998 v -41.999996 17.000000 -2.000000
v 3.000000 -0.500000 -20.999998 v -41.999996 -1.000000 -6.000000
v 3.000000 8.500000 -20.999998 v -41.999996 17.000000 -6.000000
v 21.000000 -0.500000 -21.999998 v -43.999996 -1.000000 -42.000000
v 21.000000 8.500000 -21.999998 v -43.999996 17.000000 -42.000000
v 23.000000 -0.500000 -21.999998 v -43.999996 -1.000000 -46.000000
v 23.000000 8.500000 -21.999998 v -43.999996 17.000000 -46.000000
v 21.000000 -0.500000 -20.999998 v -41.999996 -1.000000 -42.000000
v 21.000000 8.500000 -20.999998 v -41.999996 17.000000 -42.000000
v 23.000000 -0.500000 -20.999998 v -41.999996 -1.000000 -46.000000
v 23.000000 8.500000 -20.999998 v -41.999996 17.000000 -46.000000
v 41.000000 -0.500000 -22.000000 v -44.000000 -1.000000 -82.000000
v 41.000000 8.500000 -22.000000 v -44.000000 17.000000 -82.000000
v 43.000000 -0.500000 -22.000000 v -44.000000 -1.000000 -86.000000
v 43.000000 8.500000 -22.000000 v -44.000000 17.000000 -86.000000
v 41.000000 -0.500000 -21.000000 v -42.000000 -1.000000 -82.000000
v 41.000000 8.500000 -21.000000 v -42.000000 17.000000 -82.000000
v 43.000000 -0.500000 -21.000000 v -42.000000 -1.000000 -86.000000
v 43.000000 8.500000 -21.000000 v -42.000000 17.000000 -86.000000
v 61.000000 -0.500000 -22.000000 v -44.000000 -1.000000 -122.000000
v 61.000000 8.500000 -22.000000 v -44.000000 17.000000 -122.000000
v 63.000000 -0.500000 -22.000000 v -44.000000 -1.000000 -126.000000
v 63.000000 8.500000 -22.000000 v -44.000000 17.000000 -126.000000
v 61.000000 -0.500000 -21.000000 v -42.000000 -1.000000 -122.000000
v 61.000000 8.500000 -21.000000 v -42.000000 17.000000 -122.000000
v 63.000000 -0.500000 -21.000000 v -42.000000 -1.000000 -126.000000
v 63.000000 8.500000 -21.000000 v -42.000000 17.000000 -126.000000
v 81.000000 -0.500000 -22.000002 v -44.000004 -1.000000 -162.000000
v 81.000000 8.500000 -22.000002 v -44.000004 17.000000 -162.000000
v 83.000000 -0.500000 -22.000002 v -44.000004 -1.000000 -166.000000
v 83.000000 8.500000 -22.000002 v -44.000004 17.000000 -166.000000
v 81.000000 -0.500000 -21.000002 v -42.000004 -1.000000 -162.000000
v 81.000000 8.500000 -21.000002 v -42.000004 17.000000 -162.000000
v 83.000000 -0.500000 -21.000002 v -42.000004 -1.000000 -166.000000
v 83.000000 8.500000 -21.000002 v -42.000004 17.000000 -166.000000
v 101.000000 -0.500000 -22.000002 v -44.000004 -1.000000 -202.000000
v 101.000000 8.500000 -22.000002 v -44.000004 17.000000 -202.000000
v 103.000000 -0.500000 -22.000002 v -44.000004 -1.000000 -206.000000
v 103.000000 8.500000 -22.000002 v -44.000004 17.000000 -206.000000
v 101.000000 -0.500000 -21.000002 v -42.000004 -1.000000 -202.000000
v 101.000000 8.500000 -21.000002 v -42.000004 17.000000 -202.000000
v 103.000000 -0.500000 -21.000002 v -42.000004 -1.000000 -206.000000
v 103.000000 8.500000 -21.000002 v -42.000004 17.000000 -206.000000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000 vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000 vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000 vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000 vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000 vn -0.0000 1.0000 -0.0000
vt 0.625000 0.000000 vt 0.625000 0.000000

View File

@@ -1,267 +0,0 @@
# Blender 4.2.1 LTS
# www.blender.org
o platforma
v -10.000000 0.000000 110.000000
v -10.000000 -2.000000 110.000000
v -10.000000 0.000000 -20.000000
v -10.000000 -2.000000 -20.000000
v 110.000000 0.000000 110.000000
v 110.000000 -2.000000 110.000000
v 110.000000 0.000000 -20.000000
v 110.000000 -2.000000 -20.000000
vn -0.0000 1.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -1.0000 -0.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vt 0.875000 0.500000
vt 0.625000 0.750000
vt 0.625000 0.500000
vt 0.375000 1.000000
vt 0.375000 0.750000
vt 0.625000 0.000000
vt 0.375000 0.250000
vt 0.375000 0.000000
vt 0.375000 0.500000
vt 0.125000 0.750000
vt 0.125000 0.500000
vt 0.625000 0.250000
vt 0.875000 0.750000
vt 0.625000 1.000000
s 0
f 5/1/1 3/2/1 1/3/1
f 3/2/2 8/4/2 4/5/2
f 7/6/3 6/7/3 8/8/3
f 2/9/4 8/10/4 6/11/4
f 1/3/5 4/5/5 2/9/5
f 5/12/6 2/9/6 6/7/6
f 5/1/1 7/13/1 3/2/1
f 3/2/2 7/14/2 8/4/2
f 7/6/3 5/12/3 6/7/3
f 2/9/4 4/5/4 8/10/4
f 1/3/5 3/2/5 4/5/5
f 5/12/6 1/3/6 2/9/6
o szopa
v 10.000000 0.000000 -19.000000
v 10.000000 21.000000 -19.000000
v 10.000000 0.000000 -1.000000
v 10.000000 21.000000 -1.000000
v -9.000000 0.000000 -19.000000
v -9.000000 21.000000 -19.000000
v -9.000000 0.000000 -1.000000
v -9.000000 21.000000 -1.000000
v 10.000000 0.000000 -3.000000
v 10.000000 0.000000 -17.000000
v 10.000000 2.333333 -19.000000
v 10.000000 4.666667 -19.000000
v 10.000000 7.000000 -19.000000
v 10.000000 9.333334 -19.000000
v 10.000000 11.666667 -19.000000
v 10.000000 14.000000 -19.000000
v 10.000000 16.333334 -19.000000
v 10.000000 18.666668 -19.000000
v 10.000000 21.000000 -17.000000
v 10.000000 21.000000 -15.000000
v 10.000000 21.000000 -13.000000
v 10.000000 21.000000 -11.000000
v 10.000000 21.000000 -9.000000
v 10.000000 21.000000 -7.000000
v 10.000000 21.000000 -5.000000
v 10.000000 21.000000 -3.000000
v 10.000000 18.666668 -1.000000
v 10.000000 16.333334 -1.000000
v 10.000000 14.000000 -1.000000
v 10.000000 11.666666 -1.000000
v 10.000000 9.333333 -1.000000
v 10.000000 7.000000 -1.000000
v 10.000000 4.666667 -1.000000
v 10.000000 2.333333 -1.000000
v 10.000000 2.333333 -17.000000
v 10.000000 2.333333 -3.000000
v 10.000000 4.666667 -17.000000
v 10.000000 4.666667 -3.000000
v 10.000000 7.000000 -17.000000
v 10.000000 7.000000 -3.000000
v 10.000000 9.333334 -17.000000
v 10.000000 9.333334 -15.000000
v 10.000000 9.333333 -5.000000
v 10.000000 9.333333 -3.000000
v 10.000000 11.666667 -17.000000
v 10.000000 11.666667 -15.000000
v 10.000000 11.666667 -13.000000
v 10.000000 11.666667 -11.000000
v 10.000000 11.666667 -9.000000
v 10.000000 11.666667 -7.000000
v 10.000000 11.666667 -5.000000
v 10.000000 11.666666 -3.000000
v 10.000000 21.000000 -19.000000
v 10.000000 21.000000 -1.000000
v -9.000000 21.000000 -19.000000
v -9.000000 21.000000 -1.000000
v 10.000000 32.000000 -10.000000
v -9.000000 32.000000 -10.000000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 0.6332 -0.7740
vn -0.0000 0.6332 0.7740
vt 0.513889 0.250000
vt 0.541667 0.250000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.375000 0.750000
vt 0.625000 0.750000
vt 0.486111 1.000000
vt 0.458333 1.000000
vt 0.486111 0.000000
vt 0.486111 0.027778
vt 0.458333 0.027778
vt 0.486111 0.222222
vt 0.458333 0.222222
vt 0.486111 0.194444
vt 0.513889 0.027778
vt 0.486111 0.055556
vt 0.513889 0.194444
vt 0.486111 0.250000
vt 0.458333 0.250000
vt 0.000000 0.000000
vt 0.513889 0.055556
vt 0.541667 0.000000
vt 0.625000 0.027778
vt 0.001001 0.997998
vt 0.001001 0.501001
vt 0.497998 0.501001
vt 0.498999 0.502002
vt 0.498999 0.998999
vt 0.002002 0.998999
vt 0.501001 0.001001
vt 0.998999 0.498999
vt 0.998999 0.001001
vt 0.001001 0.001001
vt 0.498999 0.498999
vt 0.498999 0.001001
vt 0.375000 0.250000
vt 0.402778 0.250000
vt 0.430556 0.250000
vt 0.625000 0.250000
vt 0.597222 0.250000
vt 0.569444 0.250000
vt 0.375000 1.000000
vt 0.625000 1.000000
vt 0.597222 1.000000
vt 0.569444 1.000000
vt 0.402778 1.000000
vt 0.430556 1.000000
vt 0.541667 1.000000
vt 0.513889 1.000000
vt 0.375000 0.027778
vt 0.375000 0.000000
vt 0.402778 0.000000
vt 0.430556 0.000000
vt 0.402778 0.027778
vt 0.458333 0.000000
vt 0.430556 0.027778
vt 0.513889 0.000000
vt 0.513889 0.222222
vt 0.375000 0.222222
vt 0.402778 0.222222
vt 0.430556 0.222222
vt 0.625000 0.222222
vt 0.625000 0.194444
vt 0.625000 0.166667
vt 0.513889 0.166667
vt 0.625000 0.138889
vt 0.625000 0.111111
vt 0.513889 0.138889
vt 0.513889 0.111111
vt 0.625000 0.083333
vt 0.625000 0.055556
vt 0.513889 0.083333
vt 0.597222 0.000000
vt 0.625000 0.000000
vt 0.569444 0.000000
vt 0.501001 0.498999
vt 0.001001 0.498999
s 0
f 38/15/7 37/16/7 15/17/7
f 16/18/8 13/19/8 15/17/8
f 14/20/9 22/21/9 21/22/9
f 22/23/10 49/24/10 47/25/10
f 52/26/10 48/27/10 51/28/10
f 53/29/10 50/30/10 49/24/10
f 59/31/10 52/26/10 51/28/10
f 52/26/10 39/32/10 40/33/10
f 50/30/10 47/25/10 49/24/10
f 56/34/10 50/30/10 54/35/10
f 51/28/10 57/34/10 59/31/10
f 53/29/10 24/36/10 27/37/10
f 61/38/10 65/39/10 62/40/10
f 64/41/8 66/42/8 63/43/8
f 66/44/11 61/45/11 63/46/11
f 62/47/12 66/48/12 64/49/12
f 15/17/7 11/50/7 42/51/7
f 15/17/7 42/51/7 41/52/7
f 12/53/7 16/18/7 15/17/7
f 35/54/7 12/53/7 15/17/7
f 15/17/7 41/52/7 40/33/7
f 15/17/7 40/33/7 39/32/7
f 36/55/7 35/54/7 15/17/7
f 37/16/7 36/55/7 15/17/7
f 15/17/7 39/32/7 38/15/7
f 16/18/8 14/20/8 13/19/8
f 9/56/9 13/19/9 14/20/9
f 14/20/9 10/57/9 26/58/9
f 14/20/9 26/58/9 25/59/9
f 19/60/9 9/56/9 14/20/9
f 20/61/9 19/60/9 14/20/9
f 14/20/9 25/59/9 24/62/9
f 14/20/9 24/62/9 23/63/9
f 21/22/9 20/61/9 14/20/9
f 14/20/9 23/63/9 22/21/9
f 18/64/10 9/65/10 19/66/10
f 18/64/10 19/66/10 20/67/10
f 43/68/10 18/64/10 20/67/10
f 43/68/10 20/67/10 21/69/10
f 45/70/10 43/68/10 21/69/10
f 22/23/10 23/71/10 53/29/10
f 45/70/10 21/69/10 22/23/10
f 47/25/10 45/70/10 22/23/10
f 22/23/10 53/29/10 49/24/10
f 53/29/10 54/35/10 50/30/10
f 59/31/10 60/72/10 52/26/10
f 11/50/10 17/73/10 44/74/10
f 11/50/10 44/74/10 46/75/10
f 42/51/10 11/50/10 46/75/10
f 42/51/10 46/75/10 48/27/10
f 41/52/10 42/51/10 48/27/10
f 52/26/10 60/72/10 38/15/10
f 41/52/10 48/27/10 52/26/10
f 40/33/10 41/52/10 52/26/10
f 52/26/10 38/15/10 39/32/10
f 34/76/10 12/53/10 35/54/10
f 34/76/10 35/54/10 36/55/10
f 33/77/10 34/76/10 36/55/10
f 37/16/10 38/15/10 60/72/10
f 33/77/10 36/55/10 37/16/10
f 32/78/10 33/77/10 37/16/10
f 37/16/10 60/72/10 59/31/10
f 37/16/10 59/31/10 58/79/10
f 31/80/10 32/78/10 37/16/10
f 30/81/10 31/80/10 37/16/10
f 37/16/10 58/79/10 57/82/10
f 37/16/10 57/82/10 56/83/10
f 29/84/10 30/81/10 37/16/10
f 28/85/10 29/84/10 37/16/10
f 37/16/10 56/83/10 55/86/10
f 37/16/10 55/86/10 54/35/10
f 27/37/10 28/85/10 37/16/10
f 26/87/10 10/88/10 27/37/10
f 25/89/10 26/87/10 27/37/10
f 27/37/10 37/16/10 54/35/10
f 53/29/10 23/71/10 24/36/10
f 27/37/10 54/35/10 53/29/10
f 24/36/10 25/89/10 27/37/10
f 66/44/11 65/90/11 61/45/11
f 62/47/12 65/91/12 66/48/12

View File

@@ -1,225 +0,0 @@
# Blender 4.2.1 LTS
# www.blender.org
o szopa
v 10.000000 0.000000 -19.000000
v 10.000000 21.000000 -19.000000
v 10.000000 0.000000 -1.000000
v 10.000000 21.000000 -1.000000
v -9.000000 0.000000 -19.000000
v -9.000000 21.000000 -19.000000
v -9.000000 0.000000 -1.000000
v -9.000000 21.000000 -1.000000
v 10.000000 0.000000 -3.000000
v 10.000000 0.000000 -17.000000
v 10.000000 2.333333 -19.000000
v 10.000000 4.666667 -19.000000
v 10.000000 7.000000 -19.000000
v 10.000000 9.333334 -19.000000
v 10.000000 11.666667 -19.000000
v 10.000000 14.000000 -19.000000
v 10.000000 16.333334 -19.000000
v 10.000000 18.666668 -19.000000
v 10.000000 21.000000 -17.000000
v 10.000000 21.000000 -15.000000
v 10.000000 21.000000 -13.000000
v 10.000000 21.000000 -11.000000
v 10.000000 21.000000 -9.000000
v 10.000000 21.000000 -7.000000
v 10.000000 21.000000 -5.000000
v 10.000000 21.000000 -3.000000
v 10.000000 18.666668 -1.000000
v 10.000000 16.333334 -1.000000
v 10.000000 14.000000 -1.000000
v 10.000000 11.666666 -1.000000
v 10.000000 9.333333 -1.000000
v 10.000000 7.000000 -1.000000
v 10.000000 4.666667 -1.000000
v 10.000000 2.333333 -1.000000
v 10.000000 2.333333 -17.000000
v 10.000000 2.333333 -3.000000
v 10.000000 4.666667 -17.000000
v 10.000000 4.666667 -3.000000
v 10.000000 7.000000 -17.000000
v 10.000000 7.000000 -3.000000
v 10.000000 9.333334 -17.000000
v 10.000000 9.333334 -15.000000
v 10.000000 9.333333 -5.000000
v 10.000000 9.333333 -3.000000
v 10.000000 11.666667 -17.000000
v 10.000000 11.666667 -15.000000
v 10.000000 11.666667 -13.000000
v 10.000000 11.666667 -11.000000
v 10.000000 11.666667 -9.000000
v 10.000000 11.666667 -7.000000
v 10.000000 11.666667 -5.000000
v 10.000000 11.666666 -3.000000
v 10.000000 21.000000 -19.000000
v 10.000000 21.000000 -1.000000
v -9.000000 21.000000 -19.000000
v -9.000000 21.000000 -1.000000
v 10.000000 32.000000 -10.000000
v -9.000000 32.000000 -10.000000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 0.6332 -0.7740
vn -0.0000 0.6332 0.7740
vt 0.513889 0.250000
vt 0.541667 0.250000
vt 0.375000 0.500000
vt 0.625000 0.500000
vt 0.375000 0.750000
vt 0.625000 0.750000
vt 0.486111 1.000000
vt 0.458333 1.000000
vt 0.486111 0.000000
vt 0.486111 0.027778
vt 0.458333 0.027778
vt 0.486111 0.222222
vt 0.458333 0.222222
vt 0.486111 0.194444
vt 0.513889 0.027778
vt 0.486111 0.055556
vt 0.513889 0.194444
vt 0.486111 0.250000
vt 0.458333 0.250000
vt 0.000000 0.000000
vt 0.513889 0.055556
vt 0.541667 0.000000
vt 0.625000 0.027778
vt 0.001001 0.997998
vt 0.001001 0.501001
vt 0.497998 0.501001
vt 0.498999 0.502002
vt 0.498999 0.998999
vt 0.002002 0.998999
vt 0.501001 0.001001
vt 0.998999 0.498999
vt 0.998999 0.001001
vt 0.001001 0.001001
vt 0.498999 0.498999
vt 0.498999 0.001001
vt 0.375000 0.250000
vt 0.402778 0.250000
vt 0.430556 0.250000
vt 0.625000 0.250000
vt 0.597222 0.250000
vt 0.569444 0.250000
vt 0.375000 1.000000
vt 0.625000 1.000000
vt 0.597222 1.000000
vt 0.569444 1.000000
vt 0.402778 1.000000
vt 0.430556 1.000000
vt 0.541667 1.000000
vt 0.513889 1.000000
vt 0.375000 0.027778
vt 0.375000 0.000000
vt 0.402778 0.000000
vt 0.430556 0.000000
vt 0.402778 0.027778
vt 0.458333 0.000000
vt 0.430556 0.027778
vt 0.513889 0.000000
vt 0.513889 0.222222
vt 0.375000 0.222222
vt 0.402778 0.222222
vt 0.430556 0.222222
vt 0.625000 0.222222
vt 0.625000 0.194444
vt 0.625000 0.166667
vt 0.513889 0.166667
vt 0.625000 0.138889
vt 0.625000 0.111111
vt 0.513889 0.138889
vt 0.513889 0.111111
vt 0.625000 0.083333
vt 0.625000 0.055556
vt 0.513889 0.083333
vt 0.597222 0.000000
vt 0.625000 0.000000
vt 0.569444 0.000000
vt 0.501001 0.498999
vt 0.001001 0.498999
s 0
f 30/1/1 29/2/1 7/3/1
f 8/4/2 5/5/2 7/3/2
f 6/6/3 14/7/3 13/8/3
f 14/9/4 41/10/4 39/11/4
f 44/12/4 40/13/4 43/14/4
f 45/15/4 42/16/4 41/10/4
f 51/17/4 44/12/4 43/14/4
f 44/12/4 31/18/4 32/19/4
f 42/16/4 39/11/4 41/10/4
f 48/20/4 42/16/4 46/21/4
f 43/14/4 49/20/4 51/17/4
f 45/15/4 16/22/4 19/23/4
f 53/24/4 57/25/4 54/26/4
f 56/27/2 58/28/2 55/29/2
f 58/30/5 53/31/5 55/32/5
f 54/33/6 58/34/6 56/35/6
f 7/3/1 3/36/1 34/37/1
f 7/3/1 34/37/1 33/38/1
f 4/39/1 8/4/1 7/3/1
f 27/40/1 4/39/1 7/3/1
f 7/3/1 33/38/1 32/19/1
f 7/3/1 32/19/1 31/18/1
f 28/41/1 27/40/1 7/3/1
f 29/2/1 28/41/1 7/3/1
f 7/3/1 31/18/1 30/1/1
f 8/4/2 6/6/2 5/5/2
f 1/42/3 5/5/3 6/6/3
f 6/6/3 2/43/3 18/44/3
f 6/6/3 18/44/3 17/45/3
f 11/46/3 1/42/3 6/6/3
f 12/47/3 11/46/3 6/6/3
f 6/6/3 17/45/3 16/48/3
f 6/6/3 16/48/3 15/49/3
f 13/8/3 12/47/3 6/6/3
f 6/6/3 15/49/3 14/7/3
f 10/50/4 1/51/4 11/52/4
f 10/50/4 11/52/4 12/53/4
f 35/54/4 10/50/4 12/53/4
f 35/54/4 12/53/4 13/55/4
f 37/56/4 35/54/4 13/55/4
f 14/9/4 15/57/4 45/15/4
f 37/56/4 13/55/4 14/9/4
f 39/11/4 37/56/4 14/9/4
f 14/9/4 45/15/4 41/10/4
f 45/15/4 46/21/4 42/16/4
f 51/17/4 52/58/4 44/12/4
f 3/36/4 9/59/4 36/60/4
f 3/36/4 36/60/4 38/61/4
f 34/37/4 3/36/4 38/61/4
f 34/37/4 38/61/4 40/13/4
f 33/38/4 34/37/4 40/13/4
f 44/12/4 52/58/4 30/1/4
f 33/38/4 40/13/4 44/12/4
f 32/19/4 33/38/4 44/12/4
f 44/12/4 30/1/4 31/18/4
f 26/62/4 4/39/4 27/40/4
f 26/62/4 27/40/4 28/41/4
f 25/63/4 26/62/4 28/41/4
f 29/2/4 30/1/4 52/58/4
f 25/63/4 28/41/4 29/2/4
f 24/64/4 25/63/4 29/2/4
f 29/2/4 52/58/4 51/17/4
f 29/2/4 51/17/4 50/65/4
f 23/66/4 24/64/4 29/2/4
f 22/67/4 23/66/4 29/2/4
f 29/2/4 50/65/4 49/68/4
f 29/2/4 49/68/4 48/69/4
f 21/70/4 22/67/4 29/2/4
f 20/71/4 21/70/4 29/2/4
f 29/2/4 48/69/4 47/72/4
f 29/2/4 47/72/4 46/21/4
f 19/23/4 20/71/4 29/2/4
f 18/73/4 2/74/4 19/23/4
f 17/75/4 18/73/4 19/23/4
f 19/23/4 29/2/4 46/21/4
f 45/15/4 15/57/4 16/22/4
f 19/23/4 46/21/4 45/15/4
f 16/22/4 17/75/4 19/23/4
f 58/30/5 57/76/5 53/31/5
f 54/33/6 57/77/6 58/34/6

Binary file not shown.

View File

@@ -1,17 +0,0 @@
#version 330 core
// Interpolated values from the vertex shaders
in vec2 UV;
// Output data
out vec3 color;
// Values that stay constant for the whole mesh.
uniform sampler2D myTextureSampler;
void main() {
// Output color = color of the texture at the specified UV
color = texture(myTextureSampler, UV).rgb;
}

View File

@@ -1,20 +0,0 @@
#version 330 core
// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec2 vertexUV;
// Output data; will be interpolated for each fragment.
out vec2 UV;
// Values that stay constant for the whole mesh.
uniform mat4 MVP;
void main() {
// Output position of the vertex, in clip space: MVP * position
gl_Position = MVP * vec4(vertexPosition_modelspace, 1);
// UV of the vertex. No special space for this one.
UV = vertexUV;
}

View File

@@ -1,94 +0,0 @@
#include "shader.hpp"
GLuint LoadShaders(const char * vertex_file_path, const char * fragment_file_path) {
// Create the shaders
GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER);
GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
// Read the Vertex Shader code from the file
std::string VertexShaderCode;
std::ifstream VertexShaderStream(vertex_file_path, std::ios::in);
if (VertexShaderStream.is_open()) {
std::stringstream sstr;
sstr << VertexShaderStream.rdbuf();
VertexShaderCode = sstr.str();
VertexShaderStream.close();
} else {
timestampedCout("shader.cpp: Impossible to open " << vertex_file_path << ". Are you in the right directory?");
return 0;
}
// Read the Fragment Shader code from the file
std::string FragmentShaderCode;
std::ifstream FragmentShaderStream(fragment_file_path, std::ios::in);
if(FragmentShaderStream.is_open()){
std::stringstream sstr;
sstr << FragmentShaderStream.rdbuf();
FragmentShaderCode = sstr.str();
FragmentShaderStream.close();
}
GLint Result = GL_FALSE;
int InfoLogLength;
// Compile Vertex Shader
timestampedCout("shader.cpp: Compiling shader: " << vertex_file_path << "...");
char const * VertexSourcePointer = VertexShaderCode.c_str();
glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);
glCompileShader(VertexShaderID);
// Check Vertex Shader
glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);
glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
if (InfoLogLength > 0) {
std::vector<char> VertexShaderErrorMessage(InfoLogLength + 1);
glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &VertexShaderErrorMessage[0]);
timestampedCout("shader.cpp: VertexErrorMessage " << &VertexShaderErrorMessage[0]);
}
// Compile Fragment Shader
timestampedCout("shader.cpp: Compiling shader: " << fragment_file_path << "...");
char const * FragmentSourcePointer = FragmentShaderCode.c_str();
glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);
glCompileShader(FragmentShaderID);
// Check Fragment Shader
glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);
glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
if (InfoLogLength > 0) {
std::vector<char> FragmentShaderErrorMessage(InfoLogLength + 1);
glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, &FragmentShaderErrorMessage[0]);
timestampedCout("shader.cpp: FragmentShaderErrorMessage " << &FragmentShaderErrorMessage[0]);
}
// Link the program
timestampedCout("shader.cpp: Linking program...");
GLuint ProgramID = glCreateProgram();
glAttachShader(ProgramID, VertexShaderID);
glAttachShader(ProgramID, FragmentShaderID);
glLinkProgram(ProgramID);
// Check the program
glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength);
if (InfoLogLength > 0){
std::vector<char> ProgramErrorMessage(InfoLogLength + 1);
glGetProgramInfoLog(ProgramID, InfoLogLength, NULL, &ProgramErrorMessage[0]);
timestampedCout("shader.cpp: ProgramErrorMessage " << &ProgramErrorMessage[0]);
}
glDetachShader(ProgramID, VertexShaderID);
glDetachShader(ProgramID, FragmentShaderID);
glDeleteShader(VertexShaderID);
glDeleteShader(FragmentShaderID);
return ProgramID;
}

View File

@@ -1,16 +0,0 @@
#include <stdio.h>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <sstream>
using namespace std;
#include <stdlib.h>
#include <string.h>
#include "timeh.hpp"
#include "GL/glew.h"
GLuint LoadShaders(const char * vertex_file_path, const char * fragment_file_path);

View File

@@ -1,188 +0,0 @@
#include "texture.hpp"
GLuint loadBMP_custom(const char * imagepath){
return 0;
timestampedCout("texture.cpp: Reading image " << imagepath << "...");
// Data read from the header of the BMP file
unsigned char header[54];
unsigned int dataPos;
unsigned int imageSize;
unsigned int width, height;
// Actual RGB data
unsigned char * data;
// Open the file
FILE * file = fopen(imagepath, "rb");
if (!file) {
timestampedCout("texture.cpp: " << imagepath << " could not be opened. Are you in the right directory?");
return 0;
}
// Read the header, i.e. the 54 first bytes
// If less than 54 bytes are read, problem
if (fread(header, 1, 54, file) != 54) {
timestampedCout("texture.cpp: Not a correct BMP file.");
fclose(file);
return 0;
}
// A BMP files always begins with "BM"
if (header[0] != 'B' || header[1] != 'M') {
timestampedCout("texture.cpp: Not a correct BMP file.");
fclose(file);
return 0;
}
// Make sure this is a 24bpp file
if (*(int*)&(header[0x1E]) != 0) { timestampedCout("texture.cpp: Not a correct BMP file."); fclose(file); return 0;}
if (*(int*)&(header[0x1C]) != 24) { timestampedCout("texture.cpp: Not a correct BMP file."); fclose(file); return 0;}
// Read the information about the image
dataPos = *(int*)&(header[0x0A]);
imageSize = *(int*)&(header[0x22]);
width = *(int*)&(header[0x12]);
height = *(int*)&(header[0x16]);
// Some BMP files are misformatted, guess missing information
if (imageSize == 0) imageSize = width * height * 3; // 3 : one byte for each Red, Green and Blue component
if (dataPos == 0) dataPos = 54; // The BMP header is done that way
// Create a buffer
data = new unsigned char [imageSize];
// Read the actual data from the file into the buffer
fread(data, 1, imageSize, file);
// Everything is in memory now, the file can be closed.
fclose(file);
// Create one OpenGL texture
GLuint textureID;
glGenTextures(1, &textureID);
// "Bind" the newly created texture : all future texture functions will modify this texture
glBindTexture(GL_TEXTURE_2D, textureID);
// Give the image to OpenGL
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_BGR, GL_UNSIGNED_BYTE, data);
// OpenGL has now copied the data. Free our own version
delete [] data;
// Poor filtering, or ...
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// ... nice trilinear filtering ...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
// ... which requires mipmaps. Generate them automatically.
glGenerateMipmap(GL_TEXTURE_2D);
// Return the ID of the texture we just created
return textureID;
}
#define FOURCC_DXT1 0x31545844 // Equivalent to "DXT1" in ASCII
#define FOURCC_DXT3 0x33545844 // Equivalent to "DXT3" in ASCII
#define FOURCC_DXT5 0x35545844 // Equivalent to "DXT5" in ASCII
GLuint loadDDS(const char * imagepath){
return 0;
unsigned char header[124];
FILE *fp;
// timestampedCout("texture.cpp: Hello!");
/* try to open the file */
fp = fopen(imagepath, "rb");
if (fp == NULL){
timestampedCout("texture.cpp: " << imagepath << " could not be opened. Are you in the right directory?");
return 0;
}
/* verify the type of file */
char filecode[4];
fread(filecode, 1, 4, fp);
if (strncmp(filecode, "DDS ", 4) != 0) {
fclose(fp);
return 0;
}
/* get the surface desc */
fread(&header, 124, 1, fp);
unsigned int height = *(unsigned int*)&(header[8 ]);
unsigned int width = *(unsigned int*)&(header[12]);
unsigned int linearSize = *(unsigned int*)&(header[16]);
unsigned int mipMapCount = *(unsigned int*)&(header[24]);
unsigned int fourCC = *(unsigned int*)&(header[80]);
unsigned char * buffer;
unsigned int bufsize;
/* how big is it going to be including all mipmaps? */
bufsize = mipMapCount > 1 ? linearSize * 2 : linearSize;
buffer = (unsigned char*)malloc(bufsize * sizeof(unsigned char));
fread(buffer, 1, bufsize, fp);
/* close the file pointer */
fclose(fp);
unsigned int components = (fourCC == FOURCC_DXT1) ? 3 : 4;
unsigned int format;
switch(fourCC) {
case FOURCC_DXT1:
format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
break;
case FOURCC_DXT3:
format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
break;
case FOURCC_DXT5:
format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
break;
default:
free(buffer);
return 0;
}
// Create one OpenGL texture
GLuint textureID;
glGenTextures(1, &textureID);
// "Bind" the newly created texture : all future texture functions will modify this texture
glBindTexture(GL_TEXTURE_2D, textureID);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
unsigned int blockSize = (format == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) ? 8 : 16;
unsigned int offset = 0;
/* load the mipmaps */
for (unsigned int level = 0; level < mipMapCount && (width || height); ++level) {
unsigned int size = ((width + 3) / 4) * ((height + 3) / 4) * blockSize;
glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height,
0, size, buffer + offset);
offset += size;
width /= 2;
height /= 2;
// Deal with Non-Power-Of-Two textures. This code is not included in the webpage to reduce clutter.
if (width < 1) width = 1;
if (height < 1) height = 1;
}
free(buffer);
return textureID;
}

View File

@@ -1,11 +0,0 @@
#include <iostream>
//#include <stdlib.h>
#include "timeh.hpp"
#include <string.h>
#include "GL/glew.h"
// Load a .BMP file using our custom loader
GLuint loadBMP_custom(const char * imagepath);
// Load a .DDS file using GLFW's own loader
GLuint loadDDS(const char * imagepath);

View File

@@ -1,4 +1,5 @@
#pragma once #pragma once
#include <ctime> #include <ctime>
#include <iostream>
std::time_t getTime(); std::time_t getTime();
#define timestampedCout(msg) {std::time_t currentTime = getTime(); std::cout << "( " << currentTime << ") " << msg << "\n";} #define timestampedCout(msg) {std::time_t currentTime = getTime(); std::cout << "( " << currentTime << ") " << msg << "\n";}