Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 323 vs 331 for /trunk/Source Code/Scenes/SceneInput.cpp

Diff revisions: vs.
  @@ -43,10 +43,15 @@
43 43
44 44 // see if we select another one
45 45 _sceneSelectionCandidates.clear();
46 - // Cast the picking ray and find items between the nearPlane (with a small offset) and limit the range to half of the far plane
47 - _sceneGraph->Intersect(Ray(startRay, startRay.direction(endRay)), zPlanes.x + 0.5f, zPlanes.y * 0.5f, _sceneSelectionCandidates);
46 + // Cast the picking ray and find items between the nearPlane (with an offset) and limit the range to half of the far plane
47 + _sceneGraph->Intersect(Ray(startRay, startRay.direction(endRay)),
48 + zPlanes.x + 0.5f,
49 + zPlanes.y * 0.5f,
50 + _sceneSelectionCandidates);
51 +
48 52 if(!_sceneSelectionCandidates.empty()){
49 - std::sort(_sceneSelectionCandidates.begin(), _sceneSelectionCandidates.end(), selectionQueueDistanceFrontToBack(renderState().getCameraConst().getEye()));
53 + std::sort(_sceneSelectionCandidates.begin(), _sceneSelectionCandidates.end(),
54 + selectionQueueDistanceFrontToBack(renderState().getCameraConst().getEye()));
50 55 _currentSelection = _sceneSelectionCandidates[0];
51 56 // set it's state to selected
52 57 _currentSelection->setSelected(true);
  @@ -170,16 +175,19 @@
170 175 bool Scene::onKeyUp(const Input::KeyEvent& key){
171 176 switch( key._key ) {
172 177 case KeyCode::KC_P: {
173 - _paramHandler.setParam("freezeLoopTime", !_paramHandler.getParam("freezeLoopTime", false));
178 + _paramHandler.setParam("freezeLoopTime",
179 + !_paramHandler.getParam("freezeLoopTime", false));
174 180 } break;
175 181 case KeyCode::KC_F2: {
176 182 renderState().toggleSkeletons();
177 183 } break;
178 184 case KeyCode::KC_F3: {
179 - _paramHandler.setParam("postProcessing.enableDepthOfField", !_paramHandler.getParam<bool>("postProcessing.enableDepthOfField"));
185 + _paramHandler.setParam("postProcessing.enableDepthOfField",
186 + !_paramHandler.getParam<bool>("postProcessing.enableDepthOfField"));
180 187 } break;
181 188 case KeyCode::KC_F4: {
182 - _paramHandler.setParam("postProcessing.enableBloom", !_paramHandler.getParam<bool>("postProcessing.enableBloom"));
189 + _paramHandler.setParam("postProcessing.enableBloom",
190 + !_paramHandler.getParam<bool>("postProcessing.enableBloom"));
183 191 } break;
184 192 case KeyCode::KC_F5: {
185 193 renderState().toggleAxisLines();
  @@ -198,8 +206,10 @@
198 206 } break;
199 207 # endif
200 208 case KeyCode::KC_F10: {
209 + ParamHandler& param = ParamHandler::getInstance();
201 210 LightManager::getInstance().togglePreviewShadowMaps();
202 - ParamHandler::getInstance().setParam<bool>("rendering.previewDepthBuffer", !ParamHandler::getInstance().getParam<bool>("rendering.previewDepthBuffer", false));
211 + param.setParam<bool>("rendering.previewDepthBuffer",
212 + !param.getParam<bool>("rendering.previewDepthBuffer", false));
203 213 } break;
204 214 case KeyCode::KC_F7: {
205 215 GFX_DEVICE.Screenshot("screenshot_");