mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 05:10:26 +00:00
Remove unused functions and parameters
This commit is contained in:
parent
3843357cd2
commit
f2889e4bb5
3 changed files with 4 additions and 27 deletions
|
@ -256,7 +256,7 @@ namespace MWWorld
|
||||||
return mEngine;
|
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);
|
Ray ray = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
|
||||||
|
|
||||||
|
@ -266,8 +266,7 @@ namespace MWWorld
|
||||||
btVector3 dir(dir_.x, dir_.y, dir_.z);
|
btVector3 dir(dir_.x, dir_.y, dir_.z);
|
||||||
|
|
||||||
btVector3 dest = origin + dir * queryDistance;
|
btVector3 dest = origin + dir * queryDistance;
|
||||||
std::pair <std::string, float> result;
|
std::pair <std::string, float> result = mEngine->rayTest(origin, dest);
|
||||||
/*auto*/ result = mEngine->rayTest(origin, dest);
|
|
||||||
result.second *= queryDistance;
|
result.second *= queryDistance;
|
||||||
|
|
||||||
return std::make_pair (result.second, result.first);
|
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)
|
bool PhysicsSystem::castRay(const Vector3& from, const Vector3& to, bool raycastingObjectOnly,bool ignoreHeightMap)
|
||||||
{
|
{
|
||||||
btVector3 _from, _to;
|
btVector3 _from, _to;
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace MWWorld
|
||||||
std::vector<std::string> getCollisions(const MWWorld::Ptr &ptr); ///< get handles this object collides with
|
std::vector<std::string> getCollisions(const MWWorld::Ptr &ptr); ///< get handles this object collides with
|
||||||
Ogre::Vector3 traceDown(const MWWorld::Ptr &ptr);
|
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,
|
std::pair<std::string,Ogre::Vector3> getHitContact(const std::string &name,
|
||||||
const Ogre::Vector3 &origin,
|
const Ogre::Vector3 &origin,
|
||||||
const Ogre::Quaternion &orientation,
|
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 queryDistance);
|
||||||
std::vector < std::pair <float, std::string> > getFacedHandles (float mouseX, float mouseY, 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.
|
// 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);
|
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;
|
std::pair<float, std::string> result;
|
||||||
|
|
||||||
if (!mRendering->occlusionQuerySupported())
|
if (!mRendering->occlusionQuerySupported())
|
||||||
result = mPhysics->getFacedHandle (*this, getMaxActivationDistance ());
|
result = mPhysics->getFacedHandle (getMaxActivationDistance ());
|
||||||
else
|
else
|
||||||
result = std::make_pair (mFacedDistance, mFacedHandle);
|
result = std::make_pair (mFacedDistance, mFacedHandle);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue