1 #ifndef BulletClosestRayCallback_h 2 #define BulletClosestRayCallback_h 26 #include <QScopedPointer> 32 #include "IsisBullet.h" 37 class BulletTargetShape;
56 const btCollisionWorld::RayResultCallback &source,
57 btCollisionWorld::LocalRayResult &rayResult,
58 bool nornmalInWorldSpace);
67 btVector3
point()
const;
74 btScalar
distance(
const btVector3 &other)
const;
78 const btScalar tolerance = DBL_MAX)
const;
90 virtual btScalar
addSingleResult(btCollisionWorld::LocalRayResult &rayResult,
91 bool normalInWorldSpace);
96 const btCollisionWorld::RayResultCallback &source);
btScalar distance() const
Returns the distance from the intersection point to the beginning of the ray.
virtual ~BulletClosestRayCallback()
Destory a callback.
unsigned int defaultFlags() const
Return the default ray cast flags.
const BulletTargetShape * body() const
Return pointer to target shape
int m_partId
! The 0-based index of the intersected triangle.
int m_triangleIndex
! The local surface normal at the intersection point in body fixed (x, y, z).
bool operator==(const BulletClosestRayCallback &other) const
Equality operator to check if this callback is equivalent to another callback.
int partId() const
Return the Bullet ID of the intersected collision object.
btVector3 m_normal
! The intersection point in body fixed (x, y, z) kilometers.
btVector3 point() const
Return the intersection point, if one exists.
int triangleIndex() const
Return the 0-based index of the intersected triangle.
btVector3 normal() const
Return the local surface normal at the intersection, if an intersection exists.
Bullet ray tracing callback for closest hit on target surface.
void copyRayResult(btCollisionWorld::RayResultCallback &dest, const btCollisionWorld::RayResultCallback &source)
Easy way to copy one callback into another.
btVector3 observer() const
Return the beginning of the ray.
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult, bool normalInWorldSpace)
! The Bullet ID of the intersected collision object.
btVector3 lookdir() const
Return the end of the ray.
bool isVisible(const BulletClosestRayCallback &other, const btScalar tolerance=DBL_MAX) const
Check if the intersection in this is visible based on another callback.
Namespace for ISIS/Bullet specific routines.
btScalar fraction() const
Return the intersection hit fraction or fractional distance along the ray of the intersection.
bool isValid() const
Checks if the callback is valid/has a valid intersection.
Bullet Target Shape for planetary bodies.
BulletClosestRayCallback()
Default constructor.