1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00
OpenMW/apps/openmw/mwphysics/closestnotmerayresultcallback.hpp

34 lines
991 B
C++
Raw Normal View History

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