1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
991 B
C++
Raw Normal View History

2020-03-30 18:45:38 +00:00
#ifndef OPENMW_MWPHYSICS_CLOSESTNOTMERAYRESULTCALLBACK_H
#define OPENMW_MWPHYSICS_CLOSESTNOTMERAYRESULTCALLBACK_H
#include <span>
2020-03-30 18:45:38 +00:00
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
class btCollisionObject;
namespace MWPhysics
{
2020-10-31 13:01:14 +00:00
class Projectile;
2020-03-30 18:45:38 +00:00
class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
{
public:
2024-02-12 15:52:47 +00:00
explicit ClosestNotMeRayResultCallback(std::span<const btCollisionObject*> ignore,
std::span<const btCollisionObject*> targets, const btVector3& from, const btVector3& to)
: btCollisionWorld::ClosestRayResultCallback(from, to)
2024-02-12 15:52:47 +00:00
, mIgnoreList(ignore)
, mTargets(targets)
{
}
2020-03-30 18:45:38 +00:00
btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) override;
2020-03-30 18:45:38 +00:00
private:
2024-02-12 15:52:47 +00:00
const std::span<const btCollisionObject*> mIgnoreList;
const std::span<const btCollisionObject*> mTargets;
2020-03-30 18:45:38 +00:00
};
}
#endif