Mesh.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <ewol/widget/Widget.hpp>
10 #include <ege/resource/Mesh.hpp>
11 
12 namespace ege {
13  namespace widget {
17  class Mesh :public ewol::Widget {
18  public:
19  esignal::Signal<> signalPressed;
20  private:
21  // mesh name :
22  std::string m_meshName;
24  // mesh display properties:
25  vec3 m_position;
26  vec3 m_angle;
27  vec3 m_angleSpeed;
28  float m_cameraDistance;
29  protected:
30  Mesh();
31  void init(); // automatic considering in the appl Data older
32  public:
33  virtual ~Mesh();
34  public:
35  void onRegenerateDisplay() override;
36  void systemDraw(const ewol::DrawProperty& _displayProp) override;
37  void onDraw() override;
38  bool onEventInput(const ewol::event::Input& _event) override;
39  protected:
40  esignal::Connection m_PCH;
41 
45  void periodicCall(const ewol::event::Time& _event);
46  public:
51  void setFile(const std::string& _filename);
56  void setPosition(const vec3& _pos);
61  void setAngle(const vec3& _angle);
66  void setAngleSpeed(const vec3& _speed);
71  void setDistance(float _distance);
72  };
73  }
74 }
void setDistance(float _distance)
set the camera distance of the mesh
Definition: Mesh.hpp:17
void setPosition(const vec3 &_pos)
set the mesh position
void setAngle(const vec3 &_angle)
set the mesh angle of view
void setFile(const std::string &_filename)
set a mesh name file
void periodicCall(const ewol::event::Time &_event)
Periodic call to update grapgic display.
Definition: AudioElement.hpp:8
void setAngleSpeed(const vec3 &_speed)
set the mesh angle speed
esignal::Connection m_PCH
Periodic call handle to remove it when needed.
Definition: Mesh.hpp:40