Isis 3 Developer Reference
BulletAllHitsRayCallback.h
Go to the documentation of this file.
1 #ifndef BulletAllHitsRayCallback_h
2 #define BulletAllHitsRayCallback_h
3 
26 #include <QScopedPointer>
27 #include <QString>
28 #include <QVector>
29 
30 
32 #include "Constants.h"
33 #include "IException.h"
34 #include "SurfacePoint.h"
35 
36 namespace Isis {
37 
38 
46  class BulletAllHitsRayCallback : public btCollisionWorld::AllHitsRayResultCallback {
47  public:
49  BulletAllHitsRayCallback(const btVector3 &observer, const btVector3 &lookdir,
50  const bool cullBackfacers = true);
51  virtual ~BulletAllHitsRayCallback();
52 
53  bool isValid() const;
54  int size() const;
55 
56  btVector3 observer() const;
57  btVector3 lookdir() const;
58 
59  const BulletClosestRayCallback &hit(const int &index = 0) const;
60 
61  protected:
63 
64  virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult,
65  bool normalInWorldSpace);
66  };
67 
68 } // namespace Isis
69 
70 #endif
71 
virtual ~BulletAllHitsRayCallback()
Destroy this callback.
Definition: BulletAllHitsRayCallback.cpp:76
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult, bool normalInWorldSpace)
Add a local intersection result to this callback during ray casting.
Definition: BulletAllHitsRayCallback.cpp:147
Bullet ray tracing callback to return all intersections along a ray&#39;s path.
Definition: BulletAllHitsRayCallback.h:46
btVector3 observer() const
Return the beginning of the ray.
Definition: BulletAllHitsRayCallback.cpp:106
btVector3 lookdir() const
Return the end of the ray.
Definition: BulletAllHitsRayCallback.cpp:116
Bullet ray tracing callback for closest hit on target surface.
Definition: BulletClosestRayCallback.h:49
Definition: Calculator.h:33
const BulletClosestRayCallback & hit(const int &index=0) const
Return a callback for the intersection at a given index.
Definition: BulletAllHitsRayCallback.cpp:128
QVector< BulletClosestRayCallback > m_rayHits
List of ray hits.
Definition: BulletAllHitsRayCallback.h:62
int size() const
Returns the number of intersections found.
Definition: BulletAllHitsRayCallback.cpp:96
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool isValid() const
Checks if the callback is valid/has a valid intersection.
Definition: BulletAllHitsRayCallback.cpp:86
BulletAllHitsRayCallback()
Default constructor.
Definition: BulletAllHitsRayCallback.cpp:45