-
Notifications
You must be signed in to change notification settings - Fork 1
/
Urho3DApplication.h
64 lines (51 loc) · 1.79 KB
/
Urho3DApplication.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef URHO3DAPPLICATION_H
#define URHO3DAPPLICATION_H
#include "Windows.h"
#include <Urho3D/Core/CoreEvents.h>
#include <Urho3D/Core/Context.h>
#include <Urho3D/Engine/Engine.h>
#include <Urho3D/Resource/ResourceCache.h>
#include <Urho3D/Scene/Scene.h>
#include <Urho3D/Graphics/Graphics.h>
#include <Urho3D/Graphics/Camera.h>
#include <Urho3D/Graphics/Octree.h>
#include <Urho3D/Graphics/Light.h>
#include <Urho3D/Graphics/Model.h>
#include <Urho3D/Graphics/StaticModel.h>
#include <Urho3D/Graphics/Material.h>
#include <Urho3D/Graphics/Texture2D.h>
using namespace Urho3D;
#include <QObject>
class Urho3DApplication : public QObject, public Object
{
Q_OBJECT
private:
int mUrho3DWidth;
int mUrho3DHeight;
HWND mHWnd;
SharedPtr<Engine> mEngine;
SharedPtr<Scene> mScene;
Viewport* mViewport;
SharedPtr<Node> mCameraNode;
Camera* mCamera;
SharedPtr<Node> mBoxNode;
unsigned char* mRenderTextureWholeSceneData;
SharedPtr<Texture2D> renderTextureWholeScene;
public:
Urho3DApplication(Context * context);
~Urho3DApplication();
virtual void Setup();
virtual void Start();
void HandleUpdate(StringHash eventType,VariantMap& eventData);
void HandleRenderUpdate(StringHash eventType, VariantMap & eventData);
//functions to implement as this clas inherits from Object from Urho3D
virtual StringHash GetType() const { return StringHash(""); };
const String stra = "a";
const String& GetTypeName() const { return stra; };
virtual const TypeInfo* GetTypeInfo() const { return new TypeInfo("", 0); };
signals:
void updateSceneTexture(unsigned char* inRenderTextureData, int inWidth, int inHeight);
public slots:
void refreshUrho3D();
};
#endif // URHO3DAPPLICATION_H