Isis Developer Reference
BulletAllHitsRayCallback.h
Go to the documentation of this file.
1#ifndef BulletAllHitsRayCallback_h
2#define BulletAllHitsRayCallback_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include <QScopedPointer>
11#include <QString>
12#include <QVector>
13
14
16#include "Constants.h"
17#include "IException.h"
18#include "SurfacePoint.h"
19
20namespace Isis {
21
22
30 class BulletAllHitsRayCallback : public btCollisionWorld::AllHitsRayResultCallback {
31 public:
33 BulletAllHitsRayCallback(const btVector3 &observer, const btVector3 &lookdir,
34 const bool cullBackfacers = true);
36
37 bool isValid() const;
38 int size() const;
39
40 btVector3 observer() const;
41 btVector3 lookdir() const;
42
43 const BulletClosestRayCallback &hit(const int &index = 0) const;
44
45 protected:
46 QVector<BulletClosestRayCallback> m_rayHits;
47
48 virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult,
49 bool normalInWorldSpace);
50 };
51
52} // namespace Isis
53
54#endif
55
Bullet ray tracing callback to return all intersections along a ray's path.
Definition BulletAllHitsRayCallback.h:30
const BulletClosestRayCallback & hit(const int &index=0) const
Return a callback for the intersection at a given index.
Definition BulletAllHitsRayCallback.cpp:112
QVector< BulletClosestRayCallback > m_rayHits
List of ray hits.
Definition BulletAllHitsRayCallback.h:46
btVector3 observer() const
Return the beginning of the ray.
Definition BulletAllHitsRayCallback.cpp:90
virtual ~BulletAllHitsRayCallback()
Destroy this callback.
Definition BulletAllHitsRayCallback.cpp:60
virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult &rayResult, bool normalInWorldSpace)
Add a local intersection result to this callback during ray casting.
Definition BulletAllHitsRayCallback.cpp:131
bool isValid() const
Checks if the callback is valid/has a valid intersection.
Definition BulletAllHitsRayCallback.cpp:70
BulletAllHitsRayCallback()
Default constructor.
Definition BulletAllHitsRayCallback.cpp:29
int size() const
Returns the number of intersections found.
Definition BulletAllHitsRayCallback.cpp:80
btVector3 lookdir() const
Return the end of the ray.
Definition BulletAllHitsRayCallback.cpp:100
Bullet ray tracing callback for closest hit on target surface.
Definition BulletClosestRayCallback.h:33
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16