-
Notifications
You must be signed in to change notification settings - Fork 6
/
storm.h
76 lines (56 loc) · 1.4 KB
/
storm.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
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 2002-2004 Frozenbyte Ltd.
#ifndef INCLUDED_EDITOR_STORM_H
#define INCLUDED_EDITOR_STORM_H
#ifndef INCLUDED_BOOST_SCOPED_PTR_HPP
#define INCLUDED_BOOST_SCOPED_PTR_HPP
#include <boost/scoped_ptr.hpp>
#endif
#ifndef INCLUDED_DATATYPEDEF_H
#define INCLUDED_DATATYPEDEF_H
#include <DatatypeDef.h>
#endif
#ifdef _WIN32
#include <windows.h>
#endif // _WIN32
#ifndef INCLUDED_EDITOR_ALIGN_UNITS_H
#include "align_units.h"
#endif
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <set>
class IStorm3D;
class IStorm3D_Model;
class IStorm3D_Scene;
class IStorm3D_Terrain;
namespace ui {
class LightManager;
} // ui
struct Storm3D_CollisionInfo;
namespace frozenbyte {
namespace editor {
class Mouse;
struct Storm
{
IStorm3D *storm;
IStorm3D_Scene *scene;
IStorm3D_Terrain *terrain;
::ui::LightManager *lightManager;
VC2I heightmapResolution;
VC3 heightmapSize;
AlignUnits unitAligner;
bool viewerCamera;
IStorm3D_Scene *floorScene;
std::set<boost::weak_ptr<IStorm3D_Model> > floorModels;
explicit Storm(HWND hwnd);
~Storm();
void recreate(HWND hwnd, bool disableBuffers = false);
bool rayTrace(Storm3D_CollisionInfo &info, const Mouse &mouse) const;
float getHeight(const VC2 &position) const;
bool onFloor(const VC2 &position) const;
private:
Storm(const Storm &);
Storm &operator = (const Storm &);
};
} // end of namespace editor
} // end of namespace frozenbyte
#endif