From: Peter Schaefer Date: Tue, 5 Apr 2016 11:16:19 +0000 (+0200) Subject: fixed some MemoryLeaks X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=26abaa962e3474fdf1d4748c2e3ad50f02ee6e9e;p=cgue_weave.git fixed some MemoryLeaks optimized bind and draw collMesh (_col.dae) will be loaded as mesh if exist GL Warning disabled --- diff --git a/Weave/Game.cpp b/Weave/Game.cpp index 9375f8a..3ef93e4 100644 --- a/Weave/Game.cpp +++ b/Weave/Game.cpp @@ -48,7 +48,7 @@ Game::Game() : playing(true) // load LVL - SceneObject* tmp_world = new Level(shader1, "level_1.dae", "model_levelTest_2D.jpg"); + SceneObject* tmp_world = new Level(shader1, "level_1", "model_levelTest_2D.jpg"); //tmp_world->ignore = true; current_world->addObject(tmp_world); @@ -65,11 +65,11 @@ Game::Game() : playing(true) //current_world->addObject(new SceneObject(shader1, glm::mat4(1.0f), "Player.dae", "model_player.png")); //current_world->addObject(new SceneObject(shader1, translate(vec3(-3.f, .4f, 0.f))*scale(vec3(3.f)), "cow/cow.dae", "model_cow_2D.jpg")); - current_world->addObject(new SceneObject(shader1, translate(vec3(-3.f, .4f, 0.f)), vec4(3.0f, 0.5f, 0.4f, 1.5f), "duck.dae", "model_duck_2D.png")); - current_world->addObject(new SceneObject(shader1, translate(vec3(-5.f, .4f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "duck.dae", "model_duck_2D.png")); - current_world->addObject(new SceneObject(shader1, translate(vec3(0.f, .4f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever.dae", "model_duck_2D.png")); + current_world->addObject(new SceneObject(shader1, translate(vec3(-3.f, .4f, 0.f)), vec4(3.0f, 0.5f, 0.4f, 1.5f), "duck_col", "model_duck_2D.png")); + current_world->addObject(new SceneObject(shader1, translate(vec3(-5.f, .4f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "duck", "model_duck_2D.png")); + current_world->addObject(new SceneObject(shader1, translate(vec3(0.f, .4f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "lever", "model_duck_2D.png")); - current_world->addObject(new SceneObject(shader1, translate(vec3(-5.f, 3.f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "SkyBox.dae", "model_SkyBox_2D.png")); + current_world->addObject(new SceneObject(shader1, translate(vec3(-5.f, 3.f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "SkyBox", "model_SkyBox_2D.png")); //current_world->addObject(new EventBox(translate(vec3(3.f, .4f, 0.f)),EB_LOSTZONE)); current_world->addObject(new EventBox(translate(vec3(3.f, .4f, -15.f)), EB_WINZONE)); @@ -79,6 +79,8 @@ Game::Game() : playing(true) Game::~Game() { + + delete current_world; //RALLLY BAD HACK!!!! No Texture will be freed!!!! diff --git a/Weave/Graphix/Debug.h b/Weave/Graphix/Debug.h index 6cd1a7c..3280d0e 100644 --- a/Weave/Graphix/Debug.h +++ b/Weave/Graphix/Debug.h @@ -124,6 +124,13 @@ static void APIENTRY DebugCallback(GLenum source, GLenum type, GLuint id, GLenum return; } + case 131185: { + // Buffer detailed Info: + // Buffer object ## (bound to GL_ELEMENT_ARRAY_BUFFER/GL_ARRAY_BUFFER, usage hint is GL_STATIC_DRAW) + // will use VIDEO memory as the source for buffer object operations. + + return; + } default: { break; } @@ -141,6 +148,13 @@ static void APIENTRY DebugCallbackAMD(GLuint id, GLenum category, GLenum severit return; } + case 131185: { + // Buffer detailed Info: + // Buffer object ## (bound to GL_ELEMENT_ARRAY_BUFFER/GL_ARRAY_BUFFER, usage hint is GL_STATIC_DRAW) + // will use VIDEO memory as the source for buffer object operations. + + return; + } default: { break; } diff --git a/Weave/Graphix/Model/IMesh.cpp b/Weave/Graphix/Model/IMesh.cpp index 65f6146..1ccc687 100644 --- a/Weave/Graphix/Model/IMesh.cpp +++ b/Weave/Graphix/Model/IMesh.cpp @@ -43,13 +43,12 @@ IMesh::IMesh(const aiMesh* _mesh, const vec3& _scale) : modelpath("IMesh") { loadMesh(_mesh, numvertices, numfaces, vertex, uvs, normals, index, name, _scale); - bindModel(); + //bindModel(); } IMesh::~IMesh() { - unbindModel(); } //void IMesh::useModelMat(const mat4& _model, Shader* _shader) const diff --git a/Weave/Graphix/Model/IMetaMesh.cpp b/Weave/Graphix/Model/IMetaMesh.cpp index 0d7c1f3..619380f 100644 --- a/Weave/Graphix/Model/IMetaMesh.cpp +++ b/Weave/Graphix/Model/IMetaMesh.cpp @@ -34,8 +34,6 @@ IMetaMesh::IMetaMesh(const string& _modelpath, const vec3& _scale, bool _isConve //vec3 BBmin, BBmax, tmpMin, tmpMax; IMesh* tmpIMesh; - - //if (!scene->HasAnimations()) { @@ -47,11 +45,8 @@ IMetaMesh::IMetaMesh(const string& _modelpath, const vec3& _scale, bool _isConve tmpIMesh = new IMesh(scene->mMeshes[i], _scale* getScale(tmpModelMat)); models.push_back(std::pair(tmpIMesh, tmpModelMatClean)); - } - - } /* else @@ -113,9 +108,6 @@ IMetaMesh::IMetaMesh(const string& _modelpath, const vec3& _scale, bool _isConve IMetaMesh::~IMetaMesh() { - if (bt_collision_shape != nullptr) - delete bt_collision_shape; - for (auto i = models.begin(); i != models.end(); ++i) { delete i->first; diff --git a/Weave/Graphix/Model/Model.cpp b/Weave/Graphix/Model/Model.cpp index be721f2..c655d75 100644 --- a/Weave/Graphix/Model/Model.cpp +++ b/Weave/Graphix/Model/Model.cpp @@ -20,24 +20,27 @@ using namespace std; -Model::Model() : -numfaces(0), -numvertices(0), -vertexBuffer(-1), -normalBuffer(-1), -uvBuffer(-1), -indexBuffer(-1), -bt_collision_shape(nullptr) +Model::Model() { } Model::~Model() { - if (bt_collision_shape != nullptr) - delete bt_collision_shape; + //collisionShape + //if (bt_collision_shape != nullptr) + delete bt_collision_shape; + //Shader for (auto i = shader_map.begin(); i != shader_map.end(); ++i) { glDeleteVertexArrays(1, &(i->second)); } + shader_map.clear(); + //Buffer + unbindModel(); + //Arrays + delete index; + delete normals; + delete uvs; + delete vertex; } @@ -48,31 +51,42 @@ Model::operator std::string() const void Model::bindModel() { - if(vertex!=nullptr) - genBuffer(vertexBuffer, numvertices * 3 * sizeof(float), (void*)vertex); + if(vertex != nullptr) + genBuffer(vertexBuffer,GL_ARRAY_BUFFER, numvertices * 3 * sizeof(float), (void*)vertex); if (normals != nullptr) - genBuffer(normalBuffer, numvertices * 3 * sizeof(float), (void*)normals); + genBuffer(normalBuffer, GL_ARRAY_BUFFER, numvertices * 3 * sizeof(float), (void*)normals); if (uvs != nullptr) - genBuffer(uvBuffer, numvertices * 2 * sizeof(float), (void*)uvs); + genBuffer(uvBuffer, GL_ARRAY_BUFFER, numvertices * 2 * sizeof(float), (void*)uvs); if (index != nullptr) - genBuffer(indexBuffer, numfaces * 3 * sizeof(uint), (void*)index); + genBuffer(indexBuffer, GL_ELEMENT_ARRAY_BUFFER, numfaces * 3 * sizeof(uint), (void*)index); + + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); } void Model::unbindModel() { - if(vertexBuffer!= (uint)-1) - glDeleteBuffers(1, &vertexBuffer); - if (indexBuffer != (uint)-1) - glDeleteBuffers(1, &indexBuffer); - if (normalBuffer != (uint)-1) - glDeleteBuffers(1, &normalBuffer); - if (uvBuffer != (uint)-1) - glDeleteBuffers(1, &uvBuffer); + deleteBuffer(vertexBuffer); + deleteBuffer(indexBuffer); + deleteBuffer(normalBuffer); + deleteBuffer(uvBuffer); + } void Model::bindShader(Shader* _shader) { + auto i = shader_map.find(*_shader); + if (i != shader_map.end()) + { + //Message::info("Model: Shader wurde schon an das Model gebunden."); + return; + } + if (vertexBuffer == (uint)-1 && uvBuffer == (uint)-1 && normalBuffer == (uint)-1 && indexBuffer == (uint)-1) + { + //Message::error("Model: kein Buffer wurde gebunden. Binden des Shaders wird ausgelassen."); + return; + } uint vao; glGenVertexArrays(1, &vao); @@ -80,13 +94,13 @@ void Model::bindShader(Shader* _shader) if (vertexBuffer != (uint)-1) - bindBuffer(vertexBuffer, _shader->getAttribLocation("aPosition")); + bindBuffer(vertexBuffer, GL_ARRAY_BUFFER, _shader->getAttribLocation("aPosition")); if (uvBuffer != (uint)-1) - bindBuffer(uvBuffer, _shader->getAttribLocation("aUV"), 2); + bindBuffer(uvBuffer, GL_ARRAY_BUFFER, _shader->getAttribLocation("aUV"), 2); if (normalBuffer != (uint)-1) - bindBuffer(normalBuffer, _shader->getAttribLocation("aNormal")); + bindBuffer(normalBuffer, GL_ARRAY_BUFFER, _shader->getAttribLocation("aNormal")); if (indexBuffer != (uint)-1) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuffer); @@ -109,10 +123,13 @@ void Model::unbindShader(Shader* _shader) void Model::drawModel() const { - if (Events::isKToggleActive(SDLK_F3)) - glDrawElements(GL_LINE_LOOP, numfaces * 3, GL_UNSIGNED_INT, 0); - else - glDrawElements(GL_TRIANGLES, numfaces * 3, GL_UNSIGNED_INT, 0); + glDrawElements(GL_TRIANGLES, numfaces * 3, GL_UNSIGNED_INT, 0); + glBindVertexArray(0); +} + +void Model::drawWire() const +{ + glDrawElements(GL_LINE_LOOP, numfaces * 3, GL_UNSIGNED_INT, 0); glBindVertexArray(0); } @@ -129,7 +146,29 @@ void Model::drawModel(Shader* _shader, Texture* _texture, const mat4& _modelMat) useModelMat(_modelMat, _shader); //Message::info("IMesh loading MMatrix"); //Graphix::getGlError(); - drawModel(); + if (Events::isKToggleActive(SDLK_F3)) + drawWire(); + else + drawModel(); + //Message::info("IMesh drawing Elements"); + //Graphix::getGlError(); + //system("pause"); +} + +void Model::drawWire(Shader* _shader, const mat4& _modelMat) const +{ + //Message::info("Error from before?"); + //Graphix::getGlError(); + useModel(_shader); + //Message::info("IMesh loading Coordinates"); + //Graphix::getGlError(); + //useTexture(_texture, _shader); + //Message::info("IMesh loading Texture"); + //Graphix::getGlError(); + useModelMat(_modelMat, _shader); + //Message::info("IMesh loading MMatrix"); + //Graphix::getGlError(); + drawWire(); //Message::info("IMesh drawing Elements"); //Graphix::getGlError(); //system("pause"); @@ -172,27 +211,42 @@ void Model::drawBBox(const mat4& _modelMat, const vec4& _color) const // _center = (max + min) * .5f; //} -void Model::genBuffer(uint &buffer, uint size, void* value) +void Model::genBuffer(uint &buffer, const uint target, const uint size, const void* value) { + if (buffer != (uint)-1) + { +// Message::error("genBuffer: Buffer wurde schon gesetzt und ausgelassen."); + return; + } + glGenBuffers(1, &buffer); - glBindBuffer(GL_ARRAY_BUFFER, buffer); - glBufferData(GL_ARRAY_BUFFER, size, value, GL_STATIC_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(target, buffer); + glBufferData(target, size, value, GL_STATIC_DRAW); + //glBindBuffer(target, 0); } -void Model::bindBuffer(const uint &buffer, const uint index, const uint dim) +void Model::deleteBuffer(uint &buffer) +{ + if (buffer != (uint)-1) + { + glDeleteBuffers(1, &buffer); + buffer = -1; + } +} + +void Model::bindBuffer(const uint &buffer, const uint target, const uint index, const uint dim) { //Falls index nicht gefunden werden konnte if (index == (uint)-1) { - Message::info("Model: BindBuffer wird ausgelassen da index fehlerhaft ist."); + Message::error("Model: BindBuffer wird ausgelassen da index fehlerhaft ist."); return; } - glBindBuffer(GL_ARRAY_BUFFER, buffer); + glBindBuffer(target, buffer); glEnableVertexAttribArray(index); - glVertexAttribPointer(index, dim, GL_FLOAT, GL_FALSE, 0, 0); - glBindBuffer(GL_ARRAY_BUFFER, 0); + glVertexAttribPointer(index, dim, GL_FLOAT, GL_FALSE, 0, 0); //FLOAT as Default + //glBindBuffer(target, 0); } @@ -282,7 +336,6 @@ Model* Model::newIMetaModel(const string& _modelpath, bool _isConvex) if (ptr == nullptr) { ptr = new IMetaMesh(_modelpath,vec3(1.f),_isConvex); - //ptr->bindShader(Graphix::shader_BBox); } ++IMetaModel_count[_modelpath]; return ptr; diff --git a/Weave/Graphix/Model/Model.h b/Weave/Graphix/Model/Model.h index abea013..1c07c3d 100644 --- a/Weave/Graphix/Model/Model.h +++ b/Weave/Graphix/Model/Model.h @@ -8,7 +8,6 @@ class Shader; class Texture; -class Overlap; struct aiMesh; typedef unsigned int uint; @@ -28,6 +27,7 @@ public: /* Draws Model */ virtual void drawModel(Shader* shader, Texture* texture, const mat4& modelMat) const; + virtual void drawWire(Shader* shader, const mat4& modelMat) const; /* Draws a BoundingBox around the Model */ virtual void drawBBox(const mat4& modelMat, const vec4& color = vec4(0.9f, 0.f, 0.f, 1.f)) const; @@ -73,13 +73,19 @@ protected: std::unordered_map shader_map; - void genBuffer(uint &buffer, uint size, void* value); - void bindBuffer(const uint &buffer, const uint index, const uint dim = 3); + //gen Buffer + void genBuffer(uint &buffer, const uint target, const uint size, const void* value); + //delete Buffer + void deleteBuffer(uint &buffer); + //bind Buffer to VAO + void bindBuffer(const uint &buffer, const uint tartget, const uint index, const uint dim = 3); + virtual void useModel(Shader* shader) const; virtual void useTexture(Texture* texture, Shader* shader) const; virtual void useModelMat(const mat4& model, Shader* shader) const; virtual void drawModel() const; + virtual void drawWire() const; static Model* BoundingBox; static Model* SkyBoxModel; @@ -89,7 +95,7 @@ protected: static vec3 rotateSize(const vec3& size, const mat4& modelMat); static float directSize(const vec3& size, const vec3& direction); - btCollisionShape* bt_collision_shape; + btCollisionShape* bt_collision_shape = nullptr; private: diff --git a/Weave/Graphix/Model/SkyBox.cpp b/Weave/Graphix/Model/SkyBox.cpp index 9a9f6cd..1e7a038 100644 --- a/Weave/Graphix/Model/SkyBox.cpp +++ b/Weave/Graphix/Model/SkyBox.cpp @@ -16,7 +16,7 @@ SkyBox::SkyBox() delete normals; normals = nullptr; - bindModel(); + //bindModel(); } diff --git a/Weave/Overlap.cpp b/Weave/Overlap.cpp deleted file mode 100644 index c237d0a..0000000 --- a/Weave/Overlap.cpp +++ /dev/null @@ -1,89 +0,0 @@ - -#include "Overlap.h" - -Overlap::Overlap() : unset(true) -{ -} - -Overlap::Overlap(const Overlap& _over) : unset(_over.unset), in(_over.in), over(_over.over) -{ -} - -Overlap::Overlap(float _over, float _in) : in(_in), over(_over), unset(false) -{ -} - -Overlap::~Overlap() -{ -} - -float Overlap::overlap() const -{ - if (unset) - return -1; - else - return over; -} - -float Overlap::inside() const -{ - if (unset) - return -1; - else - return in; -} - -Overlap::operator bool() const -{ - if (unset) - return false; - else - return over >= 0; -} - -void Overlap::update(float _over, float _in) -{ - if (unset) - { - over = _over; - in = _in; - unset = false; - return; - } - - // select closest distance - if (over > _over) - { - over = _over; - } - - //sync inside - in = min(in, _in); -} - -void Overlap::update(const Overlap& _other) -{ - if (unset) - { - *this = _other; - return; - } - - // select closest distance - if (over > _other.over) - { - over = _other.over; - } - - //sync inside - in = min(in, _other.in); - -} - -Overlap Overlap::merge(const Overlap& _first, const Overlap& _second) -{ - // select closest distance - Overlap ret = _first; - ret.update(_second); - return ret; -} \ No newline at end of file diff --git a/Weave/Overlap.h b/Weave/Overlap.h deleted file mode 100644 index 79b7833..0000000 --- a/Weave/Overlap.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "GLM.h" - -class Overlap -{ -public: - Overlap(); - Overlap(const Overlap& over); - Overlap(float over, float in); - ~Overlap(); - - float overlap() const; - float inside() const; - - operator bool() const; - - static Overlap merge(const Overlap& first, const Overlap& second); - void update(float over, float in); - void update(const Overlap& other); - -protected: - bool unset; - float over; - float in; - - vec3 center; - vec3 normal; -}; \ No newline at end of file diff --git a/Weave/Scene/Level.cpp b/Weave/Scene/Level.cpp index 8db7f00..81ba5c8 100644 --- a/Weave/Scene/Level.cpp +++ b/Weave/Scene/Level.cpp @@ -7,11 +7,14 @@ #include "../GLM.h" -Level::Level(Shader* _shader, std::string _modelpath, std::string _texturepath) : SceneObject(_shader, mat4(1.f), vec4(1.f), Model::newIMetaModel(_modelpath), _texturepath) +Level::Level(Shader* _shader, std::string _modelpath, std::string _texturepath) : SceneObject(_shader, mat4(1.f), vec4(1.f), Model::newIMetaModel(_modelpath+".dae"), _texturepath) { collide_group = COL_LEVEL; collide_with = COL_MARVIN | COL_ENEMY; + model->bindModel(); + model->bindShader(_shader); + collision = model; collision->bt_init(false); bt_collision_object->setCollisionShape(*collision); @@ -31,6 +34,7 @@ Level::Level(Shader* _shader, std::string _modelpath, std::string _texturepath) Level::~Level() { + Model::deleteIMetaModel(*model); } void Level::collides(SceneObject* _other, btPersistentManifold* _contactManifold, float _deltaT) @@ -63,7 +67,7 @@ void Level::collides(SceneObject* _other, btPersistentManifold* _contactManifold { if (_other->yFloorDist < 0) { - _other->move(-pdist * vec3(0.f, normal[1], 0.f)); + _other->move(-pdist * (float).5 * vec3(0.f, normal[1], 0.f)); } _other->ySpeed = 0; } @@ -71,7 +75,7 @@ void Level::collides(SceneObject* _other, btPersistentManifold* _contactManifold if (normal[1] <= .3f && pdist<0 && pdist > -1) { - _other->move(-pdist * vec3(normal[0], 0.f, normal[2])); + _other->move(-pdist * (float).5 * vec3(normal[0], 0.f, normal[2])); _other->move_delta = 0; } diff --git a/Weave/Scene/Marvin.cpp b/Weave/Scene/Marvin.cpp index f8b314a..75db2fc 100644 --- a/Weave/Scene/Marvin.cpp +++ b/Weave/Scene/Marvin.cpp @@ -13,7 +13,7 @@ #define MOVE_FASTER 2.5f Marvin::Marvin(Shader* _shader, const mat4& _modelMat) : -SceneObject(_shader, _modelMat, vec4(7.0f, 0.7f, 1.0f, 3.0f), "Player.dae", "model_player_2D.png") +SceneObject(_shader, _modelMat, vec4(7.0f, 0.7f, 1.0f, 3.0f), "Player", "model_player_2D.png") { collide_group = COL_MARVIN; collide_with = COL_LEVEL | COL_ENEMY | COL_EVENT; diff --git a/Weave/Scene/Scene.cpp b/Weave/Scene/Scene.cpp index 0f79ff3..7871ed4 100644 --- a/Weave/Scene/Scene.cpp +++ b/Weave/Scene/Scene.cpp @@ -12,8 +12,6 @@ #include "../Message.h" #include "../Events.h" -#include "../Overlap.h" - #include #include @@ -62,10 +60,10 @@ lookat(_lookat) Scene::~Scene() { - //for (auto i = SceneObjects.begin(); i != SceneObjects.end(); ++i) - //{ - // delete (*i); - //} + for (auto i = SceneObjects.begin(); i != SceneObjects.end(); ++i) + { + delete (*i); + } timestamps.empty(); //Bullet diff --git a/Weave/Scene/SceneObject.cpp b/Weave/Scene/SceneObject.cpp index ceca5e9..53bcc9c 100644 --- a/Weave/Scene/SceneObject.cpp +++ b/Weave/Scene/SceneObject.cpp @@ -4,7 +4,8 @@ #include #include "../GLM.h" -#include "../Overlap.h" + +#include #include "../Graphix/Graphix.h" #include "../Graphix/Shader.h" @@ -21,6 +22,12 @@ using std::string; #define YFALL_SPEED 9.8f +static inline bool file_exist(const std::string& name) { + struct stat buffer; + return (stat(name.c_str(), &buffer) == 0); +} + + SceneObject::SceneObject(Shader* _shader, const mat4& _modelMat, const vec4& _material, string _modelpath, string texturepath) : model(nullptr), collision(nullptr), @@ -47,13 +54,23 @@ move_delta(0) //modelID = _shader->getUniformLocation("modelMat"); if (_modelpath != "") { - model = Model::newIMetaModel(_modelpath); + model = Model::newIMetaModel(_modelpath+".dae"); model->bindModel(); model->bindShader(shader); - /* BADHACK */ - collision = model; - collision->bt_init(); + if (file_exist("../models/" + _modelpath + "_col.dae")) + { + //Message::info("SceneObject loaded."); + collision = Model::newIMetaModel(_modelpath + "_col.dae"); + collision->bindModel(); + collision->bindShader(shader); + } + + //Model::deleteIMetaModel(_modelpath); + + //model = Model::newIMetaModel(_modelpath); + //model->bindModel(); + //model->bindShader(shader); } @@ -64,6 +81,12 @@ move_delta(0) { collide_group = COL_ENEMY; collide_with = COL_MARVIN;// | COL_LEVEL; + + if (collision != nullptr) + { + collision->bt_init(); + } + } //Message::info("Creating SkyBox Shader"); //Graphix::getGlError(); @@ -73,6 +96,13 @@ move_delta(0) //Graphix::getGlError(); //Message::info("Done"); + if (collision == nullptr) + { + /* BADHACK */ + collision = model; + collision->bt_init(); + } + btTransform btModelMat; btModelMat.setFromOpenGLMatrix(value_ptr(modelMat)); @@ -125,9 +155,10 @@ move_delta(0) if (texturepath == "model_duck_2D.png") { collide_group = COL_ENEMY; + collision = Model::getBBoxModel(); } - model->bindModel(); +// model->bindModel(); model->bindShader(shader); //Message::info("Binding Shader"); //Graphix::getGlError(); @@ -154,6 +185,7 @@ SceneObject::~SceneObject() if (texture!=nullptr) Texture::deleteTexture(*texture); + if (newModel) { Model::deleteIMetaModel(*model); @@ -207,12 +239,15 @@ void SceneObject::draw() const // drawModel(); + //model->drawWire(shader, modelMat); //BUG model->drawModel(shader, texture, modelMat); - if (Events::isKToggleActive(SDLK_F6)&&collision!=nullptr) + if (Events::isKToggleActive(SDLK_F6) && collision != nullptr) + { collision->drawBBox(modelMat); + //collision->drawWire(shader, modelMat); + } } - void SceneObject::collides(SceneObject* _other, btPersistentManifold* _contactManifold, float _deltaT) { int numContacts = _contactManifold->getNumContacts(); diff --git a/models/duck_col.dae b/models/duck_col.dae new file mode 100644 index 0000000..9e2c81b --- /dev/null +++ b/models/duck_col.dae @@ -0,0 +1,121 @@ + + + + + Blender User + Blender 2.76.0 commit date:2015-11-03, commit time:10:56, hash:f337fea + + 2016-04-05T12:53:25 + 2016-04-05T12:53:25 + + Z_UP + + + + + + + + + 0 0 0 1 + + + 0 0 0 1 + + + 0.64 0.64 0.64 1 + + + 0.5 0.5 0.5 1 + + + 50 + + + 1 + + + + + + + + + + + + + + + + -0.3404275 0.1319163 0.3622324 0.7155537 0.1302953 0.2124933 0.8782958 0.6457911 -0.06648218 0.6422351 0.4980415 0.4325124 0.1648924 0.8488432 0.2091314 -0.2385709 0.7869215 -0.1044702 -0.4737056 0.9494248 0.09821081 -0.6746715 0.6461758 0.2528271 -0.01528608 0.2465015 0.518988 0.5792465 0.8698844 0.1000403 0.2067952 0.6081221 0.5239487 -0.3577662 0.6250944 0.424212 0.0778653 0.8491837 -0.1883417 -0.5526532 0.9403451 -0.2016456 -0.3199719 0.1032722 -0.4293621 0.6856923 0.1218348 -0.2850894 0.6653214 0.520116 -0.4790521 0.4125474 0.8650568 -0.2832988 -0.6065488 0.6040313 -0.4054532 -0.6382614 0.2796174 -0.0883705 -0.3577952 0.6136891 -0.5125897 0.1304355 0.35175 -0.6307933 0.2784205 0.6265416 -0.567996 -0.1081433 1.05023 0.1036295 -0.1250797 1.363818 -0.06315225 -0.001057386 1.34129 0.2714496 0.221625 1.041535 0.3607848 0.1677418 1.610404 0.1372938 0.4082725 1.411804 0.3675711 0.645998 1.08258 0.2752171 0.6265283 1.556604 0.02157908 0.7464315 1.071434 -0.153465 0.6582272 1.43788 0.0989499 0.6488699 1.317408 0.1771066 0.8213895 1.158983 -0.00840646 0.76231 1.152902 0.09088063 0.7747189 1.334625 -0.1825433 0.9503379 1.09845 -0.1852431 0.9213675 1.429416 -0.2281164 0.9770843 1.315699 -0.1244195 -0.007109463 1.135188 -0.3745834 0.1888556 1.644561 -0.1919016 0.6004547 1.098275 -0.3938312 0.5252035 1.300607 -0.3948721 0.4847622 1.482288 -0.3541942 0.7241689 1.144264 -0.3632044 0.8706573 1.259531 -0.3532637 + + + + + + + + + + 0.5642123 0.1380087 0.8140136 0.6033637 -0.7045957 0.3734934 0.9349633 0.3506684 -0.05362266 0.8489812 0.07837307 0.5225791 -0.2840155 0.2964676 0.9118345 -0.4023677 -0.7323129 0.5493797 -0.8447071 0.1740808 0.5061284 -0.856261 -0.5134453 -0.05648994 0.1343742 0.9857871 -0.100834 -0.2747305 0.4185658 0.8656362 -0.01944059 0.9390997 0.3430944 -0.04727393 -0.4479584 0.8928038 0.1081282 0.4284539 0.8970706 -0.3442223 -0.7680989 -0.5399398 0.5623418 -0.733553 -0.3816697 -0.363092 0.8646517 -0.3471913 0.6226531 0.1471636 -0.768535 0.384937 0.1843657 -0.9043411 -0.2268498 0.3825592 -0.8956494 -0.6675506 0.4456441 -0.596471 -0.7656273 0.1007733 -0.6353422 0.03879016 -0.2662208 -0.9631314 0.1149659 0.4848283 -0.8670205 -0.8893577 -0.3577451 0.2847129 -0.6455116 0.2781215 0.711311 -0.927042 0.3571626 -0.1141406 -0.1561062 -0.3385506 0.9279087 -0.2850476 0.873088 0.3955569 0.1941028 0.4240962 0.8845715 0.6285643 -0.2817186 0.7249426 -0.2636256 0.8773988 -0.4008402 0.5883524 0.794175 0.152078 0.3881458 -0.9150328 -0.1098088 0.8516427 -0.2013972 0.4838844 0.8020195 0.4176581 0.426997 0.7290995 0.2991474 0.6155687 0.9692793 -0.1413329 -0.2013024 0.3195332 0.9226179 -0.2160435 0.1626359 0.9627843 -0.2158612 0.9207881 -0.07812857 0.3821586 0.3244179 -0.1541213 -0.9332737 0.9298803 0.09677541 0.3549042 0.3972063 -0.05679607 -0.9159703 -0.6044373 -0.1100225 -0.7890188 0.2465642 0.5960695 -0.7641384 0.2682312 0.1848838 -0.945447 0.3707811 -0.3318077 -0.8674244 + + + + + + + + + + 0.9433688 0.4335573 0.9506893 0.4074094 0.9603548 0.4437835 0.9379898 0.4676786 0.9433688 0.4335573 0.9603548 0.4437835 0.9026065 0.4658179 0.9433688 0.4335573 0.9379898 0.4676786 0.8583504 0.4053266 0.8418427 0.4328144 0.8327439 0.4169436 0.865365 0.4604417 0.86329 0.4557901 0.9026065 0.4658179 0.6184377 0.3894612 0.7732395 0.1889771 0.585522 0.1866587 0.3629334 0.3699127 0.1592101 0.4983767 0.2505877 0.2419575 0.8583504 0.4053266 0.9506893 0.4074094 0.8853886 0.413343 0.9026065 0.4658179 0.9098182 0.4428211 0.9433688 0.4335573 0.9506893 0.4074094 0.9433688 0.4335573 0.8853886 0.413343 0.8853886 0.413343 0.8595796 0.4432578 0.8583504 0.4053266 0.8583504 0.4053266 0.8595796 0.4432578 0.8418427 0.4328144 0.8853886 0.413343 0.9433688 0.4335573 0.9098182 0.4428211 0.8595796 0.4432578 0.9098182 0.4428211 0.9026065 0.4658179 0.1203175 0.8678436 0.3843301 0.6165178 0.5620092 0.8714398 0.8583504 0.4053266 0.8327439 0.4169436 0.8535594 0.4076067 0.9506893 0.4074094 0.9463743 0.4037379 0.9603548 0.4437835 0.468306 0.320445 0.5597947 0.1754326 0.6271627 0.3910006 0.9463743 0.4037379 0.946934 0.435267 0.9603548 0.4437835 0.9264555 0.4674634 0.9603548 0.4437835 0.946934 0.435267 0.8614528 0.4449928 0.865365 0.4604417 0.8973118 0.4665536 0.8327439 0.4169436 0.840195 0.4334283 0.8535594 0.4076067 0.8973118 0.4665536 0.9264555 0.4674634 0.8614528 0.4449928 0.7896648 0.1590367 0.6271627 0.3910006 0.5597947 0.1754326 0.332864 0.2028664 0.09556597 0.04251468 0.047288 0.3024232 0.332864 0.2028664 0.1615267 0.4796304 0.3743533 0.3627839 0.047288 0.3024232 0.1615267 0.4796304 0.332864 0.2028664 0.9116024 0.4223324 0.9463743 0.4037379 0.8535594 0.4076067 0.946934 0.435267 0.9110977 0.4454931 0.9264555 0.4674634 0.946934 0.435267 0.9463743 0.4037379 0.9116024 0.4223324 0.840195 0.4334283 0.8614528 0.4449928 0.8535594 0.4076067 0.8535594 0.4076067 0.8614528 0.4449928 0.8650894 0.4202201 0.9116024 0.4223324 0.9110977 0.4454931 0.946934 0.435267 0.9264555 0.4674634 0.9379898 0.4676786 0.9603548 0.4437835 0.8834033 0.4869037 0.8900656 0.509462 0.8812107 0.5123705 0.8834033 0.4869037 0.9097041 0.4849873 0.8900656 0.509462 0.8812107 0.5123705 0.8900656 0.509462 0.9039085 0.5301012 0.8834033 0.4869037 0.9026065 0.4658179 0.9097041 0.4849873 0.8900656 0.509462 0.9242113 0.5148543 0.9039085 0.5301012 0.8900656 0.509462 0.9097041 0.4849873 0.9242113 0.5148543 0.9242113 0.5148543 0.9097041 0.4849873 0.9448367 0.490479 0.9097041 0.4849873 0.9026065 0.4658179 0.9379898 0.4676786 0.9097041 0.4849873 0.9379898 0.4676786 0.9448367 0.490479 0.9088414 0.5312103 0.9039085 0.5301012 0.9445356 0.5270704 0.9039085 0.5301012 0.9242113 0.5148543 0.9445356 0.5270704 0.9448367 0.490479 0.954503 0.4847933 0.9566265 0.4978669 0.9242113 0.5148543 0.947681 0.5180243 0.9445356 0.5270704 0.9478963 0.5107031 0.947681 0.5180243 0.9242113 0.5148543 0.9242113 0.5148543 0.9448367 0.490479 0.9478963 0.5107031 0.947681 0.5180243 0.9478963 0.5107031 0.9566265 0.4978669 0.947681 0.5180243 0.9566265 0.4978669 0.9445356 0.5270704 0.9478963 0.5107031 0.9448367 0.490479 0.9566265 0.4978669 0.8600196 0.2155466 0.8777934 0.2830937 0.9417938 0.2763346 0.8600196 0.2155466 0.9535861 0.2866017 0.8887072 0.2885825 0.8907013 0.2304376 0.9417938 0.2763346 0.894321 0.3396503 0.9540566 0.255533 0.8600196 0.2155466 0.8907013 0.2304376 0.9535861 0.2866017 0.8600196 0.2155466 0.9540566 0.255533 0.9540566 0.255533 0.8907013 0.2304376 0.9349892 0.3258717 0.9566265 0.4978669 0.9538914 0.5119308 0.9445356 0.5270704 0.8600196 0.2155466 0.9417938 0.2763346 0.8907013 0.2304376 0.9448367 0.490479 0.9379898 0.4676786 0.954503 0.4847933 0.8812107 0.5123705 0.8934651 0.492972 0.8834033 0.4869037 0.9026065 0.4658179 0.8834033 0.4869037 0.8973118 0.4665536 0.9039085 0.5301012 0.9088414 0.5312103 0.8812107 0.5123705 0.8812107 0.5123705 0.9088414 0.5312103 0.8934651 0.492972 0.8973118 0.4665536 0.8934651 0.492972 0.9264555 0.4674634 0.9088414 0.5312103 0.9308995 0.5217764 0.8934651 0.492972 0.9308995 0.5217764 0.9345514 0.5092844 0.8934651 0.492972 0.9345514 0.5092844 0.9438121 0.4904912 0.8934651 0.492972 0.8934651 0.492972 0.9438121 0.4904912 0.9264555 0.4674634 0.9445356 0.5270704 0.9308995 0.5217764 0.9088414 0.5312103 0.9438121 0.4904912 0.954503 0.4847933 0.9379898 0.4676786 0.9445356 0.5270704 0.9538914 0.5119308 0.9308995 0.5217764 0.9345514 0.5092844 0.9538914 0.5119308 0.9438121 0.4904912 0.9308995 0.5217764 0.9538914 0.5119308 0.9345514 0.5092844 0.894321 0.3396503 0.8777934 0.2830937 0.8529679 0.356206 0.8529679 0.356206 0.8887072 0.2885825 0.894321 0.3396503 0.8887072 0.2885825 0.9535861 0.2866017 0.894321 0.3396503 0.894321 0.3396503 0.9417938 0.2763346 0.8777934 0.2830937 0.9349892 0.3258717 0.894321 0.3396503 0.9535861 0.2866017 0.9349892 0.3258717 0.8907013 0.2304376 0.894321 0.3396503 0.9540566 0.255533 0.9349892 0.3258717 0.9535861 0.2866017 0.8834033 0.4869037 0.8934651 0.492972 0.8973118 0.4665536 0.9264555 0.4674634 0.9106404 0.4479658 0.8614528 0.4449928 0.4991149 0.6468294 0.1500257 0.8268148 0.5718731 0.9044082 0.9264555 0.4674634 0.9438121 0.4904912 0.9379898 0.4676786 0.9506893 0.4074094 0.8583504 0.4053266 0.8535594 0.4076067 0.9463743 0.4037379 0.9506893 0.4074094 0.8535594 0.4076067 0.03916096 0.5172801 0.1615267 0.4796304 0.047288 0.3024232 0.865365 0.4604417 0.9026065 0.4658179 0.8973118 0.4665536 + + + + + + + + + 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9921569 0.9921569 0.9921569 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9921569 0.9921569 0.9921569 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 1 1 1 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 0.9960784 + + + + + + + + + + + + + + + + + 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +

3 0 0 0 1 1 1 1 2 2 2 2 9 3 3 3 3 0 4 4 2 2 5 5 4 4 6 6 3 0 7 7 9 3 8 8 0 5 9 9 7 6 10 10 19 7 11 11 5 8 12 12 11 9 13 13 4 4 14 14 6 10 15 15 11 9 16 16 5 8 17 17 11 9 18 18 6 10 19 19 7 6 20 20 0 5 21 21 1 1 22 22 8 11 23 23 4 4 24 24 10 12 25 25 3 0 26 26 1 1 27 27 3 0 28 28 8 11 29 29 8 11 30 30 11 9 31 31 0 5 32 32 0 5 33 33 11 9 34 34 7 6 35 35 8 11 36 36 3 0 37 37 10 12 38 38 11 9 39 39 10 12 40 40 4 4 41 41 11 9 42 42 8 11 43 43 10 12 44 44 0 5 45 45 19 7 46 46 14 13 47 47 1 1 48 48 15 14 49 49 2 2 50 50 6 10 51 51 5 8 52 52 13 15 53 53 15 14 54 54 16 16 55 55 2 2 56 56 17 17 57 57 2 2 58 58 16 16 59 59 20 18 60 60 5 8 61 61 12 19 62 62 19 7 63 63 18 20 64 64 14 13 65 65 12 19 66 66 17 17 67 67 20 18 68 68 20 18 69 69 13 15 70 70 5 8 71 71 18 20 72 72 19 7 73 73 7 6 74 74 18 20 75 75 13 15 76 76 20 18 77 77 7 6 78 78 13 15 79 79 18 20 80 80 21 21 81 81 15 14 82 82 14 13 83 83 16 16 84 84 22 22 85 85 17 17 86 86 16 16 87 87 15 14 88 88 21 21 89 89 18 20 90 90 20 18 91 91 14 13 92 92 14 13 93 93 20 18 94 94 21 21 95 95 21 21 96 96 22 22 97 97 16 16 98 98 17 17 99 99 9 3 100 100 2 2 101 101 23 23 102 102 25 24 103 103 24 25 104 104 23 23 105 105 26 26 106 106 25 24 107 107 24 25 108 108 25 24 109 109 27 27 110 110 23 23 111 111 4 4 112 112 26 26 113 113 25 24 114 114 28 28 115 115 27 27 116 116 25 24 117 117 26 26 118 118 28 28 119 119 28 28 120 120 26 26 121 121 29 29 122 122 26 26 123 123 4 4 124 124 9 3 125 125 26 26 126 126 9 3 127 127 29 29 128 128 41 30 129 129 27 27 130 130 30 31 131 131 27 27 132 132 28 28 133 133 30 31 134 134 29 29 135 135 31 32 136 136 35 33 137 137 28 28 138 138 32 34 139 139 30 31 140 140 33 35 141 141 32 34 142 142 28 28 143 143 28 28 144 144 29 29 145 145 33 35 146 146 32 34 147 147 33 35 148 148 35 33 149 149 32 34 150 150 35 33 151 151 30 31 152 152 33 35 153 153 29 29 154 154 35 33 155 155 35 33 156 156 31 32 157 157 37 36 158 158 35 33 159 159 38 37 160 160 36 38 161 161 34 39 162 162 37 36 163 163 45 40 164 164 39 41 165 165 35 33 166 166 34 39 167 167 38 37 168 168 35 33 169 169 39 41 170 170 39 41 171 171 34 39 172 172 46 42 173 173 35 33 174 174 36 38 175 175 30 31 176 176 35 33 177 177 37 36 178 178 34 39 179 179 29 29 180 180 9 3 181 181 31 32 182 182 24 25 183 183 40 43 184 184 23 23 185 185 4 4 186 186 23 23 187 187 12 19 188 188 27 27 189 189 41 30 190 190 24 25 191 191 24 25 192 192 41 30 193 193 40 43 194 194 12 19 195 195 40 43 196 196 17 17 197 197 41 30 198 198 44 44 199 199 40 43 200 200 44 44 201 201 43 45 202 202 40 43 203 203 43 45 204 204 42 46 205 205 40 43 206 206 40 43 207 207 42 46 208 208 17 17 209 209 30 31 210 210 44 44 211 211 41 30 212 212 42 46 213 213 31 32 214 214 9 3 215 215 30 31 216 216 36 38 217 217 44 44 218 218 43 45 219 219 36 38 220 220 42 46 221 221 44 44 222 222 36 38 223 223 43 45 224 224 45 40 225 225 31 32 226 226 42 46 227 227 42 46 228 228 36 38 229 229 45 40 230 230 36 38 231 231 38 37 232 232 45 40 233 233 45 40 234 234 37 36 235 235 31 32 236 236 46 42 237 237 45 40 238 238 38 37 239 239 46 42 240 240 34 39 241 241 45 40 242 242 39 41 243 243 46 42 244 244 38 37 245 245 23 23 246 246 40 43 247 247 12 19 248 248 17 17 249 249 22 22 250 250 20 18 251 251 21 21 252 252 20 18 253 253 22 22 254 254 17 17 255 255 42 46 256 256 9 3 257 257 1 1 258 258 0 5 259 259 14 13 260 260 15 14 261 261 1 1 262 262 14 13 263 263 6 10 264 264 13 15 265 265 7 6 266 266 5 8 267 267 4 4 268 268 12 19 269 269

+
+
+
+
+ + + + + 1 0 0 0 0 -1.62921e-7 -1 0 0 1 -1.62921e-7 0 0 0 0 1 + + + + + + + + + + + + + +
\ No newline at end of file