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>
|
|
|
|
|
2020-11-01 22:30:48 +01:00
|
|
|
#include "physicssystem.hpp"
|
|
|
|
|
2020-03-30 21:49:47 +03:00
|
|
|
class btCollisionObject;
|
2020-03-31 18:31:46 +03:00
|
|
|
struct btCollisionObjectWrapper;
|
2020-03-30 21:49:47 +03:00
|
|
|
|
|
|
|
namespace MWPhysics
|
|
|
|
{
|
|
|
|
class ContactTestResultCallback : public btCollisionWorld::ContactResultCallback
|
|
|
|
{
|
|
|
|
const btCollisionObject* mTestedAgainst;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ContactTestResultCallback(const btCollisionObject* testedAgainst);
|
|
|
|
|
2020-10-16 22:18:54 +04:00
|
|
|
btScalar addSingleResult(btManifoldPoint& cp,
|
2020-03-30 21:49:47 +03:00
|
|
|
const btCollisionObjectWrapper* col0Wrap,int partId0,int index0,
|
2020-10-16 22:18:54 +04:00
|
|
|
const btCollisionObjectWrapper* col1Wrap,int partId1,int index1) override;
|
2020-03-30 21:49:47 +03:00
|
|
|
|
2020-11-01 22:30:48 +01:00
|
|
|
std::vector<ContactPoint> mResult;
|
2020-03-30 21:49:47 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|