10 #include <QScopedPointer>
15 #include "BulletAllHitsRayCallback.h"
16 #include "Constants.h"
17 #include "IException.h"
18 #include "SurfacePoint.h"
20 #include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
30 btCollisionWorld::AllHitsRayResultCallback(btVector3(0,0,0), btVector3(0,0,0)),
32 m_flags = (btTriangleRaycastCallback::kF_KeepUnflippedNormal |
33 btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest);
45 const btVector3 &lookdir,
46 const bool cullBackfacers) :
47 btCollisionWorld::AllHitsRayResultCallback(observer, lookdir),
49 m_flags = (btTriangleRaycastCallback::kF_KeepUnflippedNormal |
50 btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest);
51 if ( cullBackfacers ) {
52 m_flags |= btTriangleRaycastCallback::kF_FilterBackfaces;
91 return ( AllHitsRayResultCallback::m_rayFromWorld );
101 return ( AllHitsRayResultCallback::m_rayToWorld );
113 btAssert( index >= 0 );
114 btAssert( index <
size() );
132 btCollisionWorld::AllHitsRayResultCallback::addSingleResult(rayResult, normalInWorldSpace);
134 return (rayResult.m_hitFraction);