mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	Make gcc happy.
This commit is contained in:
		
							parent
							
								
									4d86371ca3
								
							
						
					
					
						commit
						39cd89a9af
					
				
					 3 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -199,6 +199,7 @@ void CSVRender::PagedWorldspaceWidget::mouseReleaseEvent (QMouseEvent *event)
 | 
			
		|||
        float mouseY = (float) event->y()/viewportHeight;
 | 
			
		||||
 | 
			
		||||
        getPhysics()->castRay(mouseX, mouseY, NULL, NULL, getCamera());
 | 
			
		||||
        flagAsModified();
 | 
			
		||||
#if 0
 | 
			
		||||
        std::cout << "geometry: " + std::to_string(width()) + ", " + std::to_string(height()) << std::endl;
 | 
			
		||||
        std::cout << "event: " + std::to_string(event->x()) + ", " + std::to_string(event->y()) << std::endl;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,11 +4,11 @@
 | 
			
		|||
 | 
			
		||||
#include <OgreRay.h>
 | 
			
		||||
#include <OgreCamera.h>
 | 
			
		||||
#include <OgreSceneManager.h>
 | 
			
		||||
#include <OgreManualObject.h> // FIXME: debug cursor position
 | 
			
		||||
#include <OgreEntity.h>              // FIXME: visual highlight, clone
 | 
			
		||||
#include <OgreMaterialManager.h>     // FIXME: visual highlight, material
 | 
			
		||||
#include <OgreHardwarePixelBuffer.h> // FIXME: visual highlight, texture
 | 
			
		||||
#include <OgreRoot.h> // FIXME: renderOneFrame
 | 
			
		||||
 | 
			
		||||
#include <openengine/bullet/physic.hpp>
 | 
			
		||||
#include <components/nifbullet/bulletnifloader.hpp>
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +133,6 @@ namespace CSVWorld
 | 
			
		|||
    {
 | 
			
		||||
        mEngine->toggleDebugRendering();
 | 
			
		||||
        mEngine->stepSimulation(0.0167); // FIXME: DebugDrawer::step() not accessible
 | 
			
		||||
        Ogre::Root::getSingleton().renderOneFrame(); // FIXME: temporary workaround for immediate visual feedback
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    std::pair<bool, Ogre::Vector3> PhysicsSystem::castRay(float mouseX, float mouseY,
 | 
			
		||||
| 
						 | 
				
			
			@ -167,7 +166,7 @@ namespace CSVWorld
 | 
			
		|||
        {
 | 
			
		||||
            //TODO: Try http://www.ogre3d.org/tikiwiki/Create+outline+around+a+character
 | 
			
		||||
            Ogre::SceneNode *scene = mSceneMgr->getSceneNode(result.first);
 | 
			
		||||
            std::map<std::string, std::vector<std::string>>::iterator iter =
 | 
			
		||||
            std::map<std::string, std::vector<std::string> >::iterator iter =
 | 
			
		||||
                                                    mSelectedEntities.find(result.first);
 | 
			
		||||
            if(iter != mSelectedEntities.end()) // currently selected
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -217,8 +216,6 @@ namespace CSVWorld
 | 
			
		|||
                // FIXME: show cursor position for debugging
 | 
			
		||||
                showHitPoint(mSceneMgr, result.first, ray.getPoint(farClipDist*result.second));
 | 
			
		||||
            }
 | 
			
		||||
            // FIXME: temporary workaround for immediate visual feedback
 | 
			
		||||
            Ogre::Root::getSingleton().renderOneFrame();
 | 
			
		||||
#if 0
 | 
			
		||||
            std::cout << "hit " << result.first
 | 
			
		||||
                      + " result " + std::to_string(result.second*farClipDist) << std::endl;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#ifndef CSV_WORLD_PHYSICSSYSTEM_H
 | 
			
		||||
#define CSV_WORLD_PHYSICSSYSTEM_H
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <map>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +28,7 @@ namespace CSVWorld
 | 
			
		|||
            //std::map<std::string, std::string> mHandleToMesh;
 | 
			
		||||
            OEngine::Physic::PhysicEngine* mEngine;
 | 
			
		||||
            Ogre::SceneManager *mSceneMgr;
 | 
			
		||||
            std::map<std::string, std::vector<std::string>> mSelectedEntities;
 | 
			
		||||
            std::map<std::string, std::vector<std::string> > mSelectedEntities;
 | 
			
		||||
 | 
			
		||||
        public:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue