diff options
author | David Walter Seikel | 2014-04-22 15:13:38 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-22 15:13:38 +1000 |
commit | dd009ccdfd62f9153dbc72f5f5de5d5f72979690 (patch) | |
tree | 50d62438c6d47dccf82f440986919b1ed3edbbd9 /src/extantz/extantzCamera.h | |
parent | Move most of the README's and other docs into the new docs directory. (diff) | |
download | SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.zip SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.gz SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.bz2 SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.xz |
Move all source into the new src directory, and shuffle a few other things around.
Diffstat (limited to 'src/extantz/extantzCamera.h')
-rw-r--r-- | src/extantz/extantzCamera.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/src/extantz/extantzCamera.h b/src/extantz/extantzCamera.h new file mode 100644 index 0000000..9d74236 --- /dev/null +++ b/src/extantz/extantzCamera.h | |||
@@ -0,0 +1,101 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __EXTANTZ_CAMERA_H_INCLUDED__ | ||
6 | #define __EXTANTZ_CAMERA_H_INCLUDED__ | ||
7 | |||
8 | |||
9 | #ifdef __cplusplus | ||
10 | #include <ISceneNodeAnimator.h> | ||
11 | #include <vector2d.h> | ||
12 | #include <position2d.h> | ||
13 | #include <SKeyMap.h> | ||
14 | #include <irrArray.h> | ||
15 | #include <ICameraSceneNode.h> | ||
16 | |||
17 | using namespace irr; | ||
18 | using namespace scene; | ||
19 | |||
20 | extern "C"{ | ||
21 | #else | ||
22 | typedef struct extantzCamera extantzCamera; | ||
23 | typedef struct ICameraSceneNode ICameraSceneNode; | ||
24 | #endif | ||
25 | |||
26 | typedef struct | ||
27 | { | ||
28 | float x, y, z; | ||
29 | float r, s, t; | ||
30 | float jump; | ||
31 | float JumpSpeed, RotateSpeed, MoveSpeed; | ||
32 | } cameraMove; | ||
33 | |||
34 | cameraMove *getCameraMove(ICameraSceneNode *camera); | ||
35 | |||
36 | #ifdef __cplusplus | ||
37 | } | ||
38 | |||
39 | |||
40 | //namespace irr::gui | ||
41 | //{ | ||
42 | // class ICursorControl; | ||
43 | //} | ||
44 | |||
45 | |||
46 | namespace irr | ||
47 | { | ||
48 | namespace scene | ||
49 | { | ||
50 | ICameraSceneNode *addExtantzCamera(ISceneManager* sm, ISceneNode* parent, s32 id); | ||
51 | |||
52 | class extantzCamera : public ISceneNodeAnimator | ||
53 | { | ||
54 | public: | ||
55 | |||
56 | //! Constructor | ||
57 | // extantzCamera(gui::ICursorControl* cursorControl); | ||
58 | extantzCamera(); | ||
59 | |||
60 | //! Destructor | ||
61 | virtual ~extantzCamera(); | ||
62 | |||
63 | //! Animates the scene node, currently only works on cameras | ||
64 | virtual void animateNode(ISceneNode* node, u32 timeMs); | ||
65 | |||
66 | //! This animator will receive events when attached to the active camera | ||
67 | virtual bool isEventReceiverEnabled() const | ||
68 | { | ||
69 | return false; | ||
70 | } | ||
71 | |||
72 | //! Returns the type of this animator | ||
73 | virtual ESCENE_NODE_ANIMATOR_TYPE getType() const | ||
74 | { | ||
75 | return ESNAT_CAMERA_FPS; | ||
76 | } | ||
77 | |||
78 | //! Creates a clone of this animator. | ||
79 | /** Please note that you will have to drop | ||
80 | (IReferenceCounted::drop()) the returned pointer once you're | ||
81 | done with it. */ | ||
82 | virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); | ||
83 | |||
84 | bool NoVerticalMovement; | ||
85 | // -1.0f for inverted mouse, defaults to 1.0f | ||
86 | f32 MouseYDirection; | ||
87 | |||
88 | cameraMove move; | ||
89 | |||
90 | private: | ||
91 | f32 MaxVerticalAngle; | ||
92 | s32 LastAnimationTime; | ||
93 | // core::position2d<f32> CenterCursor, CursorPos; | ||
94 | }; | ||
95 | }; | ||
96 | }; | ||
97 | #endif | ||
98 | |||
99 | |||
100 | #endif // __EXTANTZ_CAMERA_H_INCLUDED__ | ||
101 | |||