9 #include "imstkPickingAlgorithm.h" 13 class CollisionDetectionAlgorithm;
37 const double maxDist = -1.0)
39 m_rayStart = rayStart;
40 m_rayDir = rayDir.normalized();
44 const Vec3d& getPickRayStart()
const {
return m_rayStart; }
45 const Vec3d& getPickRayDir()
const {
return m_rayDir; }
52 bool getUseFirstHit()
const {
return m_useFirstHit; }
56 Vec3d m_rayStart = Vec3d::Zero();
57 Vec3d m_rayDir = Vec3d::Zero();
58 double m_maxDist = -1.0;
59 bool m_useFirstHit =
true;
Abstract functor for picking/selecting of geometry. Differs from collision in that the picking criter...
void requestUpdate() override
Users can implement this for the logic to be run.
void setUseFirstHit(const bool useFirstHit)
Get/Set whether only the first hit is used otherwise all intersections are returned.
void setPickingRay(const Vec3d &rayStart, const Vec3d &rayDir, const double maxDist=-1.0)
Set the picking ray.
Picks points on elements of geomToPick via those that that are intersecting the provided ray...