1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 03:32:36 +00:00
OpenMW/apps/openmw/mwphysics/contacttestresultcallback.hpp

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

34 lines
887 B
C++
Raw Normal View History

2020-03-30 21:49:47 +03:00
#ifndef OPENMW_MWPHYSICS_CONTACTTESTRESULTCALLBACK_H
#define OPENMW_MWPHYSICS_CONTACTTESTRESULTCALLBACK_H
#include <vector>
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
#include "physicssystem.hpp"
2020-03-30 21:49:47 +03:00
class btCollisionObject;
struct btCollisionObjectWrapper;
2020-03-30 21:49:47 +03:00
namespace MWPhysics
{
class ContactTestResultCallback : public btCollisionWorld::ContactResultCallback
{
public:
explicit ContactTestResultCallback(const btCollisionObject* testedAgainst)
: mTestedAgainst(testedAgainst)
{
}
2020-03-30 21:49:47 +03:00
btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObjectWrapper* col0Wrap, int partId0, int index0,
const btCollisionObjectWrapper* col1Wrap, int partId1, int index1) override;
2020-03-30 21:49:47 +03:00
std::vector<ContactPoint> mResult;
private:
const btCollisionObject* mTestedAgainst;
2020-03-30 21:49:47 +03:00
};
}
#endif