[DEV] update new API of ewol ==> not update local ...

This commit is contained in:
Edouard DUPIN 2016-02-15 23:03:13 +01:00
parent 4a685a1c8f
commit 7214cbbe8c
10 changed files with 23 additions and 23 deletions

View File

@ -293,7 +293,7 @@ ege::Environement::Environement() :
m_listElement(), m_listElement(),
m_status(*this, "status", gameStop, "Satus of the activity of the Environement"), m_status(*this, "status", gameStop, "Satus of the activity of the Environement"),
m_ratio(*this, "ratio", 1.0f, "game speed ratio"), m_ratio(*this, "ratio", 1.0f, "game speed ratio"),
m_particuleEngine(*this) { m_particuleEngine(this) {
// nothing to do ... // nothing to do ...
m_status.add(gameStart, "start", "Scene is started"); m_status.add(gameStart, "start", "Scene is started");
m_status.add(gamePause, "pause", "Scene is paused"); m_status.add(gamePause, "pause", "Scene is paused");

View File

@ -12,6 +12,7 @@ namespace ege {
class ElementInteraction; class ElementInteraction;
}; };
#include <ege/camera/Camera.h> #include <ege/camera/Camera.h>
#include <ege/ParticuleEngine.h>
#include <etk/types.h> #include <etk/types.h>
#include <BulletDynamics/Dynamics/btActionInterface.h> #include <BulletDynamics/Dynamics/btActionInterface.h>
@ -21,11 +22,10 @@ class btDynamicsWorld;
#include <etk/math/Vector3D.h> #include <etk/math/Vector3D.h>
#include <ejson/ejson.h> #include <ejson/ejson.h>
#include <exml/exml.h> #include <exml/exml.h>
#include <ege/ParticuleEngine.h>
#include <ewol/object/Object.h> #include <ewol/object/Object.h>
#include <esignal/Signal.h> #include <esignal/Signal.h>
#include <ewol/event/Time.h> #include <ewol/event/Time.h>
#include <ewol/parameter/Value.h> #include <eproperty/Value.h>
#include <ege/resource/Mesh.h> #include <ege/resource/Mesh.h>
#include <ege/physics/Engine.h> #include <ege/physics/Engine.h>

View File

@ -8,13 +8,14 @@
#include <ege/debug.h> #include <ege/debug.h>
#include <ege/Particule.h> #include <ege/Particule.h>
#include <ege/ParticuleEngine.h>
#undef __class__ #undef __class__
#define __class__ "Particule" #define __class__ "Particule"
ege::Particule::Particule(ege::ParticuleEngine& _particuleEngine, const char* _particuleType) : ege::Particule::Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType) :
m_particuleEngine(_particuleEngine), m_particuleEngine(_particuleEngine),
m_particuleType(_particuleType) { m_particuleType(_particuleType) {
m_particuleEngine.add(this); m_particuleEngine->add(this);
} }

View File

@ -8,7 +8,7 @@
#pragma once #pragma once
namespace ege { namespace ege {
class Particule; class ParticuleEngine;
}; };
#include <etk/types.h> #include <etk/types.h>
@ -24,7 +24,7 @@ namespace ege {
*/ */
class Particule { class Particule {
protected: protected:
ege::ParticuleEngine& m_particuleEngine; ege::ParticuleEngine* m_particuleEngine;
const char* m_particuleType; const char* m_particuleType;
public: public:
/** /**
@ -32,7 +32,7 @@ namespace ege {
* @param[in] _particuleEngine reference on the particule engine ... * @param[in] _particuleEngine reference on the particule engine ...
* @param[in] _particuleType Type of the particule (set nullptr if you did not want to use the respowner ...) * @param[in] _particuleType Type of the particule (set nullptr if you did not want to use the respowner ...)
*/ */
Particule(ege::ParticuleEngine& _particuleEngine, const char* _particuleType = nullptr); Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType = nullptr);
/** /**
* @brief Destructor. * @brief Destructor.
*/ */

View File

@ -8,11 +8,13 @@
#include <ege/debug.h> #include <ege/debug.h>
#include <ege/ParticuleEngine.h> #include <ege/ParticuleEngine.h>
#include <ege/Environement.h>
#include <ege/Particule.h>
#undef __class__ #undef __class__
#define __class__ "ParticuleEngine" #define __class__ "ParticuleEngine"
ege::ParticuleEngine::ParticuleEngine(ege::Environement& _env) : ege::ParticuleEngine::ParticuleEngine(ege::Environement* _env) :
m_env(_env) { m_env(_env) {
} }

View File

@ -5,24 +5,21 @@
* *
* @license BSD v3 (see license file) * @license BSD v3 (see license file)
*/ */
#include <ege/Environement.h>
#pragma once #pragma once
namespace ege { namespace ege {
class ParticuleEngine; class Environement;
class Particule;
}; };
#include <etk/types.h> #include <etk/types.h>
#include <vector> #include <vector>
#include <ege/Particule.h> #include <ege/camera/Camera.h>
namespace ege { namespace ege {
class ParticuleEngine { class ParticuleEngine {
private: private:
ege::Environement& m_env; ege::Environement* m_env;
public: public:
ParticuleEngine(ege::Environement& _env); // note : need the engine to register has an dynamic element ... (the first ...) ParticuleEngine(ege::Environement* _env); // note : need the engine to register has an dynamic element ... (the first ...)
~ParticuleEngine(); ~ParticuleEngine();
private: private:
std::vector<Particule*> m_particuleList; //!< all particule created and active std::vector<Particule*> m_particuleList; //!< all particule created and active

View File

@ -12,7 +12,7 @@
#undef __class__ #undef __class__
#define __class__ "ParticuleSimple" #define __class__ "ParticuleSimple"
ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine& _particuleEngine, const char* _particuleType) : ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine* _particuleEngine, const char* _particuleType) :
Particule(_particuleEngine, _particuleType) { Particule(_particuleEngine, _particuleType) {
init(); init();
} }

View File

@ -32,7 +32,7 @@ namespace ege {
* @param[in] _name Name of the particule. * @param[in] _name Name of the particule.
* @param[in] _standalone The particule are created and have there own life (no dynamic control) * @param[in] _standalone The particule are created and have there own life (no dynamic control)
*/ */
ParticuleSimple(ege::ParticuleEngine& _particuleEngine, const char* _particuleType); ParticuleSimple(ege::ParticuleEngine* _particuleEngine, const char* _particuleType);
/** /**
* @brief Destructor. * @brief Destructor.
*/ */

View File

@ -47,7 +47,7 @@ void ege::widget::Scene::init(std::shared_ptr<ege::Environement> _env) {
m_env = _env; m_env = _env;
ewol::Widget::init(); ewol::Widget::init();
setKeyboardRepeate(false); setKeyboardRepeate(false);
setCanHaveFocus(true); propertyCanFocus.set(true);
periodicCallEnable(); periodicCallEnable();
m_debugDrawProperty = ewol::resource::Colored3DObject::create(); m_debugDrawProperty = ewol::resource::Colored3DObject::create();
} }
@ -207,8 +207,8 @@ void ege::widget::Scene::setCamera(const std::string& _cameraName) {
} }
} }
void ege::widget::Scene::calculateSize(const vec2& _available) { void ege::widget::Scene::calculateSize() {
ewol::Widget::calculateSize(_available); ewol::Widget::calculateSize();
// Update camera aspect ratio: // Update camera aspect ratio:
std::shared_ptr<ege::Camera> camera = m_env->getCamera(m_cameraName); std::shared_ptr<ege::Camera> camera = m_env->getCamera(m_cameraName);
if (camera != nullptr) { if (camera != nullptr) {

View File

@ -78,7 +78,7 @@ namespace ege {
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void periodicCall(const ewol::event::Time& _event); virtual void periodicCall(const ewol::event::Time& _event);
virtual void calculateSize(const vec2& _available); virtual void calculateSize();
protected: protected:
eproperty::Value<bool> m_debugPhysic; //!< display Physic Debug eproperty::Value<bool> m_debugPhysic; //!< display Physic Debug
public: public: