![]() |
Isis 3 Programmer Reference
|
Bullet ray tracing callback to return all intersections along a ray's path. More...
#include <BulletAllHitsRayCallback.h>
Public Member Functions | |
BulletAllHitsRayCallback () | |
Default constructor. More... | |
BulletAllHitsRayCallback (const btVector3 &observer, const btVector3 &lookdir, const bool cullBackfacers=true) | |
Construct a callback with a ray start and ray end. More... | |
virtual | ~BulletAllHitsRayCallback () |
Destroy this callback. More... | |
bool | isValid () const |
Checks if the callback is valid/has a valid intersection. More... | |
int | size () const |
Returns the number of intersections found. More... | |
btVector3 | observer () const |
Return the beginning of the ray. More... | |
btVector3 | lookdir () const |
Return the end of the ray. More... | |
const BulletClosestRayCallback & | hit (const int &index=0) const |
Return a callback for the intersection at a given index. More... | |
Protected Member Functions | |
virtual btScalar | addSingleResult (btCollisionWorld::LocalRayResult &rayResult, bool normalInWorldSpace) |
Add a local intersection result to this callback during ray casting. More... | |
Protected Attributes | |
QVector< BulletClosestRayCallback > | m_rayHits |
List of ray hits. More... | |
Bullet ray tracing callback to return all intersections along a ray's path.
Definition at line 30 of file BulletAllHitsRayCallback.h.
Isis::BulletAllHitsRayCallback::BulletAllHitsRayCallback | ( | ) |
Default constructor.
The ray beginning and end default to the origin. The intersections vector defaults to empty.
Definition at line 29 of file BulletAllHitsRayCallback.cpp.
Isis::BulletAllHitsRayCallback::BulletAllHitsRayCallback | ( | const btVector3 & | observer, |
const btVector3 & | lookdir, | ||
const bool | cullBackfacers = true |
||
) |
Construct a callback with a ray start and ray end.
observer | The beginning of the ray. |
lookdir | The end of the ray. |
cullBackfacers | If back facing intersections should be culled. |
Definition at line 44 of file BulletAllHitsRayCallback.cpp.
|
virtual |
Destroy this callback.
Definition at line 60 of file BulletAllHitsRayCallback.cpp.
|
protectedvirtual |
Add a local intersection result to this callback during ray casting.
rayResult | The local intersection result for the ray cast. |
normalInWorldSpace | If the normal stored in the local result is in local coordinates or world coordinates. |
Definition at line 131 of file BulletAllHitsRayCallback.cpp.
References lookdir(), m_rayHits, and observer().
const BulletClosestRayCallback & Isis::BulletAllHitsRayCallback::hit | ( | const int & | index = 0 | ) | const |
Return a callback for the intersection at a given index.
index | The index of the intersection. |
Definition at line 112 of file BulletAllHitsRayCallback.cpp.
References m_rayHits, and size().
Referenced by Isis::BulletShapeModel::localRadius(), and Isis::BulletShapeModel::sortHits().
bool Isis::BulletAllHitsRayCallback::isValid | ( | ) | const |
Checks if the callback is valid/has a valid intersection.
Definition at line 70 of file BulletAllHitsRayCallback.cpp.
btVector3 Isis::BulletAllHitsRayCallback::lookdir | ( | ) | const |
Return the end of the ray.
Definition at line 100 of file BulletAllHitsRayCallback.cpp.
Referenced by addSingleResult().
btVector3 Isis::BulletAllHitsRayCallback::observer | ( | ) | const |
Return the beginning of the ray.
Definition at line 90 of file BulletAllHitsRayCallback.cpp.
Referenced by addSingleResult().
int Isis::BulletAllHitsRayCallback::size | ( | ) | const |
Returns the number of intersections found.
Definition at line 80 of file BulletAllHitsRayCallback.cpp.
References m_rayHits.
Referenced by hit(), and Isis::BulletShapeModel::sortHits().
|
protected |
List of ray hits.
Definition at line 46 of file BulletAllHitsRayCallback.h.
Referenced by addSingleResult(), hit(), and size().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 15:17:59 |