Mantid
Loading...
Searching...
No Matches
LineIntersectVisit.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
11#include "MantidKernel/V3D.h"
12#include <boost/container/small_vector.hpp>
13#include <list>
14
15namespace Mantid {
16
17namespace Geometry {
18
19//---------------------------------------------------------
20// Forward declarations
21//---------------------------------------------------------
22class Surface;
23class Quadratic;
24class Plane;
25class Sphere;
26class Cone;
27class Cylinder;
28class General;
29
39class MANTID_GEOMETRY_DLL LineIntersectVisit : public BaseVisit {
40public:
41 using DistancesType = boost::container::small_vector<double, 5>;
42
43private:
47
48public:
50 void Accept(const Surface &) override;
51 void Accept(const Quadratic &);
52 void Accept(const Plane &) override;
53 void Accept(const Sphere &) override;
54 void Accept(const Cone &) override;
55 void Accept(const Cylinder &) override;
56 void Accept(const General &) override;
57
58 // Accessor
60 const DistancesType &getDistance() const { return m_distancesOut; }
62 const Line::PType &getPoints() const { return m_intersectionPointsOut; }
64 unsigned long getNPoints() const { return (unsigned long)m_intersectionPointsOut.size(); }
65
67 void setLine(const Kernel::V3D &, const Kernel::V3D &);
68
70 void sortAndRemoveDuplicates();
71};
72
73} // namespace Geometry
74
75} // NAMESPACE Mantid
Holds a cone in vector form.
Definition: Cone.h:29
Holds a cylinder as a vector form.
Definition: Cylinder.h:32
Holds a general quadratic surface.
Definition: General.h:28
Interset of Line with a surface.
const Line::PType & getPoints() const
Get the intersection points.
DistancesType m_distancesOut
The distance.
Line::PType m_intersectionPointsOut
The intersection point.
const DistancesType & getDistance() const
Get the distance.
unsigned long getNPoints() const
Get the number of intersection points.
boost::container::small_vector< double, 5 > DistancesType
void setLine(const Kernel::V3D &, const Kernel::V3D &)
Re-set the line.
Impliments a line.
Definition: Line.h:43
boost::container::small_vector< Kernel::V3D, 5 > PType
Definition: Line.h:45
Holds a simple Plane.
Definition: Plane.h:35
Holds a basic quadratic surface.
Definition: Quadratic.h:29
Holds a Sphere as vector form.
Definition: Sphere.h:29
Holds a basic quadratic surface.
Definition: Surface.h:33
Class for 3D vectors.
Definition: V3D.h:34
Helper class which provides the Collimation Length for SANS instruments.