-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectInspector.h
56 lines (50 loc) · 1.78 KB
/
ObjectInspector.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
#pragma once
#include "BaseInspector.h"
#include "Gwen/Controls/NumericUpDown.h"
#include "Gwen/Controls/HorizontalSlider.h"
#include "d3dUtil.h"
#include <string>
using namespace std;
// Forward declarations.
#pragma region Forward declarations.
namespace GLib {
class StaticObject;
}
class ObjectTool;
#pragma endregion
//! The inspector for Object3D objects.
class ObjectInspector : public BaseInspector
{
public:
ObjectInspector(Gwen::Controls::Base* pParent, ObjectTool* pTool);
~ObjectInspector();
void Init();
void Cleanup();
void Update(float dt);
void Draw(GLib::Graphics* pGraphics);
void SetObject(void* pObject);
void OnRotationSliderMoved(Base* pControl);
void OnRotationChange(Base* pControl);
void OnScaleSliderMoved(Base* pControl);
void OnScaleChange(Base* pControl);
void OnOrientationChange(Gwen::Controls::Base* pControl);
void OnAABBCheckBoxChange(Base* pControl);
bool IsResponsible(int type);
bool IsInspecting(int id);
GLib::Object3D* GetInspectedObject();
// Callback.
void OnPositionChangeEvent(XMFLOAT3 position);
void OnScaleChangeEvent(XMFLOAT3 scale);
void SetObjectMover(ObjectTool* pObjectMover);
GLib::StaticObject* GetSelectedObject();
private:
void InitSlider(Gwen::Controls::HorizontalSlider* slider, string name, int y, float value, float start, float end, bool clamp = true);
private:
GLib::StaticObject* mObject;
Gwen::Controls::PropertyRow* mXProperty, *mYProperty, *mZProperty;
Gwen::Controls::PropertyRow* mXRotationProperty, *mYRotationProperty, *mZRotationProperty;
Gwen::Controls::PropertyRow* mXScaleProperty, *mYScaleProperty, *mZScaleProperty;
Gwen::Controls::HorizontalSlider* mXRotationSlider, *mYRotationSlider, *mZRotationSlider;
Gwen::Controls::HorizontalSlider* mXScaleSlider, *mYScaleSlider, *mZScaleSlider;
ObjectTool* mObjectTool;
};