Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 116 vs 117 for /trunk/Source Code/Scenes/Headers/Scene.h

Diff revisions: vs.
  @@ -47,11 +47,16 @@
47 47 _lightTexture(NULL),
48 48 _deferredBuffer(NULL),
49 49 _deferredShader(NULL),
50 + _camera(NULL),
50 51 _inputManager(InputManagerInterface::getInstance()),
51 52 _sceneGraph(New SceneGraph())
52 53 {
53 54 _white = vec4<F32>(1.0f,1.0f,1.0f,1.0f);
54 55 _black = vec4<F32>(0.0f,0.0f,0.0f,0.0f);
56 + _moveFB = 0.0f;
57 + _moveLR = 0.0f;
58 + _angleUD = 0.0f;
59 + _angleLR = 0.0f;
55 60 };
56 61
57 62 virtual ~Scene() {
  @@ -70,6 +75,8 @@
70 75
71 76 /// Update animations, network data, sounds, triggers etc.
72 77 virtual void updateSceneState(D32 sceneTime);
78 + /// Update current camera (simple, fast, inlined poitner swap)
79 + inline void updateCamera(Camera* const camera) {_camera = camera;}
73 80
74 81 inline F32& getWindSpeed() {return _windSpeed;}
75 82 inline F32& getWindDirX() {return _windDirX;}
  @@ -132,9 +139,17 @@
132 139 FrameBufferObject* _deferredBuffer;
133 140 PixelBufferObject* _lightTexture;
134 141 ShaderProgram* _deferredShader;
142 +
143 + ///Global info
144 + Camera* _camera;
135 145 SceneGraph* _sceneGraph;
136 146 F32 _grassVisibility,_treeVisibility,_generalVisibility,
137 147 _windSpeed,_windDirX, _windDirZ, _waterHeight, _waterDepth;
148 + F32 _moveFB; ///< forward-back move change detected
149 + F32 _moveLR; ///< left-right move change detected
150 + F32 _angleUD; ///< up-down angle change detected
151 + F32 _angleLR; ///< left-right angle change detected
152 +
138 153 private:
139 154 std::vector<Event_ptr> _events;
140 155 Event_ptr _inputEvent;