Loading [MathJax]/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
1 #ifndef BulletClosestRayCallback_h
2 #define BulletClosestRayCallback_h
10 #include <QScopedPointer>
14 #include "Constants.h"
15 #include "IException.h"
16 #include "IsisBullet.h"
17 #include "SurfacePoint.h"
21 class BulletTargetShape;
40 const btCollisionWorld::RayResultCallback &source,
41 btCollisionWorld::LocalRayResult &rayResult,
42 bool nornmalInWorldSpace);
51 btVector3
point()
const;
58 btScalar
distance(
const btVector3 &other)
const;
62 const btScalar tolerance = DBL_MAX)
const;
74 virtual btScalar
addSingleResult(btCollisionWorld::LocalRayResult &rayResult,
75 bool normalInWorldSpace);
80 const btCollisionWorld::RayResultCallback &source);
int partId() const
Return the Bullet ID of the intersected collision object.
btVector3 normal() const
Return the local surface normal at the intersection, if an intersection exists.
btVector3 m_normal
! The intersection point in body fixed (x, y, z) kilometers.
int m_triangleIndex
! The local surface normal at the intersection point in body fixed (x, y, z).
btVector3 point() const
Return the intersection point, if one exists.
void copyRayResult(btCollisionWorld::RayResultCallback &dest, const btCollisionWorld::RayResultCallback &source)
Easy way to copy one callback into another.
btScalar fraction() const
Return the intersection hit fraction or fractional distance along the ray of the intersection.
BulletClosestRayCallback()
Default constructor.
unsigned int defaultFlags() const
Return the default ray cast flags.
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult, bool normalInWorldSpace)
! The Bullet ID of the intersected collision object.
const BulletTargetShape * body() const
@breif Return pointer to target shape
virtual ~BulletClosestRayCallback()
Destory a callback.
bool isValid() const
Checks if the callback is valid/has a valid intersection.
int triangleIndex() const
Return the 0-based index of the intersected triangle.
Bullet Target Shape for planetary bodies.
btScalar distance() const
Returns the distance from the intersection point to the beginning 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.
bool operator==(const BulletClosestRayCallback &other) const
Equality operator to check if this callback is equivalent to another callback.
Bullet ray tracing callback for closest hit on target surface.
btVector3 observer() const
Return the beginning of the ray.
btVector3 lookdir() const
Return the end of the ray.
This is free and unencumbered software released into the public domain.
int m_partId
! The 0-based index of the intersected triangle.