[DEV] update new API of ewol ==> not update local ...
This commit is contained in:
parent
4a685a1c8f
commit
7214cbbe8c
@ -293,7 +293,7 @@ ege::Environement::Environement() :
|
||||
m_listElement(),
|
||||
m_status(*this, "status", gameStop, "Satus of the activity of the Environement"),
|
||||
m_ratio(*this, "ratio", 1.0f, "game speed ratio"),
|
||||
m_particuleEngine(*this) {
|
||||
m_particuleEngine(this) {
|
||||
// nothing to do ...
|
||||
m_status.add(gameStart, "start", "Scene is started");
|
||||
m_status.add(gamePause, "pause", "Scene is paused");
|
||||
|
@ -12,6 +12,7 @@ namespace ege {
|
||||
class ElementInteraction;
|
||||
};
|
||||
#include <ege/camera/Camera.h>
|
||||
#include <ege/ParticuleEngine.h>
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <BulletDynamics/Dynamics/btActionInterface.h>
|
||||
@ -21,11 +22,10 @@ class btDynamicsWorld;
|
||||
#include <etk/math/Vector3D.h>
|
||||
#include <ejson/ejson.h>
|
||||
#include <exml/exml.h>
|
||||
#include <ege/ParticuleEngine.h>
|
||||
#include <ewol/object/Object.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <ewol/event/Time.h>
|
||||
#include <ewol/parameter/Value.h>
|
||||
#include <eproperty/Value.h>
|
||||
#include <ege/resource/Mesh.h>
|
||||
#include <ege/physics/Engine.h>
|
||||
|
||||
|
@ -8,13 +8,14 @@
|
||||
|
||||
#include <ege/debug.h>
|
||||
#include <ege/Particule.h>
|
||||
#include <ege/ParticuleEngine.h>
|
||||
|
||||
#undef __class__
|
||||
#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_particuleType(_particuleType) {
|
||||
m_particuleEngine.add(this);
|
||||
m_particuleEngine->add(this);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace ege {
|
||||
class Particule;
|
||||
class ParticuleEngine;
|
||||
};
|
||||
|
||||
#include <etk/types.h>
|
||||
@ -24,7 +24,7 @@ namespace ege {
|
||||
*/
|
||||
class Particule {
|
||||
protected:
|
||||
ege::ParticuleEngine& m_particuleEngine;
|
||||
ege::ParticuleEngine* m_particuleEngine;
|
||||
const char* m_particuleType;
|
||||
public:
|
||||
/**
|
||||
@ -32,7 +32,7 @@ namespace ege {
|
||||
* @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 ...)
|
||||
*/
|
||||
Particule(ege::ParticuleEngine& _particuleEngine, const char* _particuleType = nullptr);
|
||||
Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType = nullptr);
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
|
@ -8,11 +8,13 @@
|
||||
|
||||
#include <ege/debug.h>
|
||||
#include <ege/ParticuleEngine.h>
|
||||
#include <ege/Environement.h>
|
||||
#include <ege/Particule.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ParticuleEngine"
|
||||
|
||||
ege::ParticuleEngine::ParticuleEngine(ege::Environement& _env) :
|
||||
ege::ParticuleEngine::ParticuleEngine(ege::Environement* _env) :
|
||||
m_env(_env) {
|
||||
|
||||
}
|
||||
|
@ -5,24 +5,21 @@
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ege/Environement.h>
|
||||
#pragma once
|
||||
|
||||
namespace ege {
|
||||
class ParticuleEngine;
|
||||
class Environement;
|
||||
class Particule;
|
||||
};
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <vector>
|
||||
#include <ege/Particule.h>
|
||||
#include <ege/camera/Camera.h>
|
||||
|
||||
namespace ege {
|
||||
class ParticuleEngine {
|
||||
private:
|
||||
ege::Environement& m_env;
|
||||
ege::Environement* m_env;
|
||||
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();
|
||||
private:
|
||||
std::vector<Particule*> m_particuleList; //!< all particule created and active
|
||||
|
@ -12,7 +12,7 @@
|
||||
#undef __class__
|
||||
#define __class__ "ParticuleSimple"
|
||||
|
||||
ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine& _particuleEngine, const char* _particuleType) :
|
||||
ege::ParticuleSimple::ParticuleSimple(ege::ParticuleEngine* _particuleEngine, const char* _particuleType) :
|
||||
Particule(_particuleEngine, _particuleType) {
|
||||
init();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace ege {
|
||||
* @param[in] _name Name of the particule.
|
||||
* @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.
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@ void ege::widget::Scene::init(std::shared_ptr<ege::Environement> _env) {
|
||||
m_env = _env;
|
||||
ewol::Widget::init();
|
||||
setKeyboardRepeate(false);
|
||||
setCanHaveFocus(true);
|
||||
propertyCanFocus.set(true);
|
||||
periodicCallEnable();
|
||||
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) {
|
||||
ewol::Widget::calculateSize(_available);
|
||||
void ege::widget::Scene::calculateSize() {
|
||||
ewol::Widget::calculateSize();
|
||||
// Update camera aspect ratio:
|
||||
std::shared_ptr<ege::Camera> camera = m_env->getCamera(m_cameraName);
|
||||
if (camera != nullptr) {
|
||||
|
@ -78,7 +78,7 @@ namespace ege {
|
||||
virtual void systemDraw(const ewol::DrawProperty& _displayProp);
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual void periodicCall(const ewol::event::Time& _event);
|
||||
virtual void calculateSize(const vec2& _available);
|
||||
virtual void calculateSize();
|
||||
protected:
|
||||
eproperty::Value<bool> m_debugPhysic; //!< display Physic Debug
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user