Remove unused functions and parameters

actorid
Chris Robinson 12 years ago
parent 3843357cd2
commit f2889e4bb5

@ -256,7 +256,7 @@ namespace MWWorld
return mEngine;
}
std::pair<float, std::string> PhysicsSystem::getFacedHandle (MWWorld::World& world, float queryDistance)
std::pair<float, std::string> PhysicsSystem::getFacedHandle(float queryDistance)
{
Ray ray = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
@ -266,8 +266,7 @@ namespace MWWorld
btVector3 dir(dir_.x, dir_.y, dir_.z);
btVector3 dest = origin + dir * queryDistance;
std::pair <std::string, float> result;
/*auto*/ result = mEngine->rayTest(origin, dest);
std::pair <std::string, float> result = mEngine->rayTest(origin, dest);
result.second *= queryDistance;
return std::make_pair (result.second, result.first);
@ -338,24 +337,6 @@ namespace MWWorld
}
btVector3 PhysicsSystem::getRayPoint(float extent)
{
//get a ray pointing to the center of the viewport
Ray centerRay = mRender.getCamera()->getCameraToViewportRay(
mRender.getViewport()->getWidth()/2,
mRender.getViewport()->getHeight()/2);
btVector3 result(centerRay.getPoint(extent).x,centerRay.getPoint(extent).y,centerRay.getPoint(extent).z);
return result;
}
btVector3 PhysicsSystem::getRayPoint(float extent, float mouseX, float mouseY)
{
//get a ray pointing to the center of the viewport
Ray centerRay = mRender.getCamera()->getCameraToViewportRay(mouseX, mouseY);
btVector3 result(centerRay.getPoint(extent).x,centerRay.getPoint(extent).y,centerRay.getPoint(extent).z);
return result;
}
bool PhysicsSystem::castRay(const Vector3& from, const Vector3& to, bool raycastingObjectOnly,bool ignoreHeightMap)
{
btVector3 _from, _to;

@ -56,7 +56,7 @@ namespace MWWorld
std::vector<std::string> getCollisions(const MWWorld::Ptr &ptr); ///< get handles this object collides with
Ogre::Vector3 traceDown(const MWWorld::Ptr &ptr);
std::pair<float, std::string> getFacedHandle (MWWorld::World& world, float queryDistance);
std::pair<float, std::string> getFacedHandle(float queryDistance);
std::pair<std::string,Ogre::Vector3> getHitContact(const std::string &name,
const Ogre::Vector3 &origin,
const Ogre::Quaternion &orientation,
@ -64,10 +64,6 @@ namespace MWWorld
std::vector < std::pair <float, std::string> > getFacedHandles (float queryDistance);
std::vector < std::pair <float, std::string> > getFacedHandles (float mouseX, float mouseY, float queryDistance);
btVector3 getRayPoint(float extent);
btVector3 getRayPoint(float extent, float mouseX, float mouseY);
// cast ray, return true if it hit something. if raycasringObjectOnlt is set to false, it ignores NPCs and objects with no collisions.
bool castRay(const Ogre::Vector3& from, const Ogre::Vector3& to, bool raycastingObjectOnly = true,bool ignoreHeightMap = false);

@ -761,7 +761,7 @@ namespace MWWorld
std::pair<float, std::string> result;
if (!mRendering->occlusionQuerySupported())
result = mPhysics->getFacedHandle (*this, getMaxActivationDistance ());
result = mPhysics->getFacedHandle (getMaxActivationDistance ());
else
result = std::make_pair (mFacedDistance, mFacedHandle);

Loading…
Cancel
Save