diff --git a/ege/Environement.cpp b/ege/Environement.cpp index a9871e2..59db828 100644 --- a/ege/Environement.cpp +++ b/ege/Environement.cpp @@ -16,7 +16,9 @@ #include #include +#include +ETK_DECLARE_TYPE(ege::gameStatus); void ege::Environement::addEngine(const ememory::SharedPtr& _ref) { if (_ref == nullptr) { @@ -212,8 +214,8 @@ void ege::Environement::getEntityNearestFixed(const vec3& _sourcePosition, } */ -static etk::Hash& getHachTableCreating() { - static etk::Hash s_table; +static etk::Map& getHachTableCreating() { + static etk::Map s_table(0,false); return s_table; } @@ -532,7 +534,7 @@ void ege::Environement::onCallbackPeriodicCall(const ewol::event::Time& _event) void ege::Environement::addCamera(const etk::String& _name, const ememory::SharedPtr& _camera) { - m_listCamera.insert(etk::makePair(_name, _camera)); + m_listCamera.set(_name, _camera); } ememory::SharedPtr ege::Environement::getCamera(const etk::String& _name) { diff --git a/ege/physics/Component.cpp b/ege/physics/Component.cpp index 9592cf7..c2674b0 100644 --- a/ege/physics/Component.cpp +++ b/ege/physics/Component.cpp @@ -197,7 +197,7 @@ void ege::physics::Component::generate() { EGE_DEBUG(" Concave"); const ege::physics::shape::Concave* tmpElement = it->toConcave(); if (tmpElement == nullptr) { - EGE_ERROR(" Concave ==> can not cast in Concave"); + EGE_ERROR(" etkConcave ==> can not cast in Concave"); continue; } #if 0 diff --git a/ege/physics/Engine.cpp b/ege/physics/Engine.cpp index 8f3e2b2..e7a29eb 100644 --- a/ege/physics/Engine.cpp +++ b/ege/physics/Engine.cpp @@ -226,13 +226,13 @@ etk::Pair, etk::Pair> ege::physics if (callbackObject.m_haveImpact == true) { if ( callbackObject.m_body == nullptr || callbackObject.m_body->getUserData() == nullptr) { - etk::Pair, etk::Pair>(nullptr, etk::pair(callbackObject.m_position, callbackObject.m_normal)); + etk::Pair, etk::Pair>(nullptr, etk::Pair(callbackObject.m_position, callbackObject.m_normal)); } // TODO: je n'ai pas une entity, main un component ... ege::physics::Component* elem = static_cast(callbackObject.m_body->getUserData()); - return etk::Pair, etk::Pair>(elem->sharedFromThis(), etk::pair(callbackObject.m_position, callbackObject.m_normal)); + return etk::Pair, etk::Pair>(elem->sharedFromThis(), etk::Pair(callbackObject.m_position, callbackObject.m_normal)); } EGE_VERBOSE(" No Hit"); - return etk::Pair, etk::Pair>(nullptr, etk::pair(vec3(0,0,0),vec3(0,0,0))); + return etk::Pair, etk::Pair>(nullptr, etk::Pair(vec3(0,0,0),vec3(0,0,0))); } \ No newline at end of file diff --git a/ege/resource/Mesh.cpp b/ege/resource/Mesh.cpp index f594db8..a800691 100644 --- a/ege/resource/Mesh.cpp +++ b/ege/resource/Mesh.cpp @@ -24,6 +24,8 @@ ege::resource::Mesh::Mesh() : m_GLColor(-1), m_bufferOfset(-1), m_numberOfElments(-1), + m_listFaces(0,false), + m_materials(0,false), m_pointerShape(nullptr), m_functionFreeShape(nullptr) { addResourceType("ege::resource::Mesh"); diff --git a/ege/resource/Mesh.hpp b/ege/resource/Mesh.hpp index 247f554..c2fabe3 100644 --- a/ege/resource/Mesh.hpp +++ b/ege/resource/Mesh.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +#include #include #include #include @@ -110,8 +110,8 @@ namespace ege { etk::Vector> m_listColor; //!< List of all Color point in the mesh etk::Vector m_listFacesNormal; //!< List of all Face normal, when calculated etk::Vector m_listVertexNormal; //!< List of all Face normal, when calculated - etk::Hash m_listFaces; //!< List of all Face for the mesh - etk::Hash> m_materials; + etk::Map m_listFaces; //!< List of all Face for the mesh + etk::Map> m_materials; etk::Vector> m_physics; //!< collision shape module ... (independent of bullet lib) void clean(); protected: diff --git a/ege/resource/MeshGird.cpp b/ege/resource/MeshGird.cpp index 721c69d..30e641c 100644 --- a/ege/resource/MeshGird.cpp +++ b/ege/resource/MeshGird.cpp @@ -79,7 +79,7 @@ ememory::SharedPtr ege::resource::Mesh::createGrid(int32_t list.pushBack(_position+vec3(1,1,iii)*_size); list.pushBack(_position+vec3(-1,1,iii)*_size); list.pushBack(_position+vec3(-1,-1,iii)*_size); - out->addLines(_materialName, list, etk::color::gray); + out->addLines(_materialName, list, etk::Color(etk::color::gray)); } //out->addPoint(_materialName, vec3(iii,-_lineCount,0), etk::color::white); //out->addPoint(_materialName, vec3(iii,_lineCount,0), etk::color::white); diff --git a/ege/resource/tools/icoSphere.cpp b/ege/resource/tools/icoSphere.cpp index 6266d50..f2c8d67 100644 --- a/ege/resource/tools/icoSphere.cpp +++ b/ege/resource/tools/icoSphere.cpp @@ -30,7 +30,7 @@ static int32_t addUV(etk::Vector& _listUV, int32_t _uvId, float _add) { return _listUV.size()-1; } -void ege::icoSphere::create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, +void ege::icoSphere::create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, float _size, int32_t _recursionLevel) { /* 5 diff --git a/ege/resource/tools/icoSphere.hpp b/ege/resource/tools/icoSphere.hpp index 943d152..4e24fb2 100644 --- a/ege/resource/tools/icoSphere.hpp +++ b/ege/resource/tools/icoSphere.hpp @@ -7,12 +7,12 @@ #include #include -#include +#include #include namespace ege { namespace icoSphere { - void create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, + void create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, float _size, int32_t _recursionLevel); } } diff --git a/ege/resource/tools/isoSphere.cpp b/ege/resource/tools/isoSphere.cpp index 3cea467..6c8757f 100644 --- a/ege/resource/tools/isoSphere.cpp +++ b/ege/resource/tools/isoSphere.cpp @@ -7,7 +7,7 @@ #include #include -void ege::isoSphere::create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, +void ege::isoSphere::create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, int32_t _recursionLevel) { _recursionLevel = etk::max(_recursionLevel, 3); float size = 1.0f; diff --git a/ege/resource/tools/isoSphere.hpp b/ege/resource/tools/isoSphere.hpp index e418155..81d1bb1 100644 --- a/ege/resource/tools/isoSphere.hpp +++ b/ege/resource/tools/isoSphere.hpp @@ -7,12 +7,12 @@ #include #include -#include +#include #include namespace ege { namespace isoSphere { - void create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, + void create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, int32_t _recursionLevel); } } diff --git a/ege/resource/tools/viewBox.cpp b/ege/resource/tools/viewBox.cpp index 7fb5a77..e5c5f4c 100644 --- a/ege/resource/tools/viewBox.cpp +++ b/ege/resource/tools/viewBox.cpp @@ -9,7 +9,7 @@ -void ege::viewBox::create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, +void ege::viewBox::create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, float _size) { // This is the direct generation basis on the .obj system /* diff --git a/ege/resource/tools/viewBox.hpp b/ege/resource/tools/viewBox.hpp index 8aeb0a1..6c85be9 100644 --- a/ege/resource/tools/viewBox.hpp +++ b/ege/resource/tools/viewBox.hpp @@ -7,12 +7,12 @@ #include #include -#include +#include #include namespace ege { namespace viewBox { - void create(etk::Hash>& _materials, etk::Hash& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, + void create(etk::Map>& _materials, etk::Map& _listFaces, etk::Vector& _listVertex, etk::Vector& _listUV, const etk::String& _materialName, float _size); } } diff --git a/ege/widget/Scene.cpp b/ege/widget/Scene.cpp index 2ed7b8a..f28af69 100644 --- a/ege/widget/Scene.cpp +++ b/ege/widget/Scene.cpp @@ -39,7 +39,7 @@ ege::widget::Scene::Scene() : void ege::widget::Scene::init() { ewol::Widget::init(); - setKeyboardRepeate(false); + setKeyboardRepeat(false); propertyCanFocus.set(true); m_PCH = getObjectManager().periodicCall.connect(this, &ege::widget::Scene::periodicCall); m_debugDrawProperty = ewol::resource::Colored3DObject::create();