Mantid
Loading...
Searching...
No Matches
InstrumentRayTracer.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
13#include <boost/unordered_map.hpp>
14#include <deque>
15#include <list>
16#include <mutex>
17
18namespace Mantid {
19namespace Kernel {
20class V3D;
21}
22namespace Geometry {
23class IComponent;
24struct Link;
25class Track;
28
37class MANTID_GEOMETRY_DLL InstrumentRayTracer {
38public:
43 void trace(const Kernel::V3D &dir) const;
44 void traceFromSample(const Kernel::V3D &dir) const;
47 Links getResults() const;
48
49 IDetector_const_sptr getDetectorResult() const;
50
51private:
55 void fireRay(Track &testRay) const;
56
63 mutable boost::unordered_map<IComponent *, BoundingBox> m_boxCache;
65 mutable std::mutex m_mutex;
66};
67} // namespace Geometry
68} // namespace Mantid
This class is responsible for tracking rays and accumulating a list of objects that are intersected a...
Track m_resultsTrack
Accumulate results in this Track object, aids performance.
Instrument_const_sptr m_instrument
Pointer to the instrument.
boost::unordered_map< IComponent *, BoundingBox > m_boxCache
Map of component id -> bounding box.
InstrumentRayTracer()
Default constructor.
std::mutex m_mutex
Mutex to lock box cache.
Defines a track as a start point and a direction.
Definition: Track.h:165
boost::container::small_vector< Link, 5 > LType
Definition: Track.h:167
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< const Mantid::Geometry::IDetector > IDetector_const_sptr
Shared pointer to IDetector (const version)
Definition: IDetector.h:102
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
Track::LType Links
Typedef for object intersections.
Helper class which provides the Collimation Length for SANS instruments.