mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 12:01:51 +00:00
506824cb9d
* Do not copy with allocations. * Remove unused DeepestNotMeContactTestResultCallback. * Avoid using pointers which should not be nullptr. * Move constructors implementation to headers. * Move types defined in .cpp are to unnamed namespace. * Comment unused arguments. * Avoid C-style casts.
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
#ifndef OPENMW_MWPHYSICS_ACTORCONVEXCALLBACK_H
|
|
#define OPENMW_MWPHYSICS_ACTORCONVEXCALLBACK_H
|
|
|
|
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
|
|
|
|
class btCollisionObject;
|
|
|
|
namespace MWPhysics
|
|
{
|
|
class ActorConvexCallback : public btCollisionWorld::ClosestConvexResultCallback
|
|
{
|
|
public:
|
|
explicit ActorConvexCallback(const btCollisionObject* me, const btVector3& motion, btScalar minCollisionDot,
|
|
const btCollisionWorld* world)
|
|
: btCollisionWorld::ClosestConvexResultCallback(btVector3(0.0, 0.0, 0.0), btVector3(0.0, 0.0, 0.0))
|
|
, mMe(me)
|
|
, mMotion(motion)
|
|
, mMinCollisionDot(minCollisionDot)
|
|
, mWorld(world)
|
|
{
|
|
}
|
|
|
|
btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult, bool normalInWorldSpace) override;
|
|
|
|
protected:
|
|
const btCollisionObject* mMe;
|
|
const btVector3 mMotion;
|
|
const btScalar mMinCollisionDot;
|
|
const btCollisionWorld* mWorld;
|
|
};
|
|
}
|
|
|
|
#endif
|