Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
Mantid::Geometry::LineIntersectVisit Class Reference

Interset of Line with a surface. More...

#include <LineIntersectVisit.h>

Inheritance diagram for Mantid::Geometry::LineIntersectVisit:
Mantid::Geometry::BaseVisit

Public Types

using DistancesType = boost::container::small_vector< double, 5 >
 

Public Member Functions

void Accept (const Cone &) override
 Process an intersect track. More...
 
void Accept (const Cylinder &) override
 Process an intersect track. More...
 
void Accept (const General &) override
 Process an intersect track. More...
 
void Accept (const Plane &) override
 Process an intersect track. More...
 
void Accept (const Quadratic &)
 Process an intersect track. More...
 
void Accept (const Sphere &) override
 Process an intersect track. More...
 
void Accept (const Surface &) override
 Process an intersect track. More...
 
const DistancesTypegetDistance () const
 Get the distance. More...
 
unsigned long getNPoints () const
 Get the number of intersection points. More...
 
const Line::PTypegetPoints () const
 Get the intersection points. More...
 
 LineIntersectVisit (const Kernel::V3D &, const Kernel::V3D &)
 Constructor. More...
 
void setLine (const Kernel::V3D &, const Kernel::V3D &)
 Re-set the line. More...
 
void sortAndRemoveDuplicates ()
 Prune out duplicated points and sort by distance to starting point. More...
 
- Public Member Functions inherited from Mantid::Geometry::BaseVisit
virtual void Accept (const Cone &)=0
 Accept a cone. More...
 
virtual void Accept (const Cylinder &)=0
 Accept a cylinder. More...
 
virtual void Accept (const General &)=0
 Accept a general surface. More...
 
virtual void Accept (const Plane &)=0
 Accept a plane. More...
 
virtual void Accept (const Sphere &)=0
 Accept a sphere. More...
 
virtual void Accept (const Surface &)=0
 Accept a surface. More...
 
virtual ~BaseVisit ()=default
 Destructor. More...
 

Private Attributes

DistancesType m_distancesOut
 The distance. More...
 
Line::PType m_intersectionPointsOut
 The intersection point. More...
 
Line m_line
 The line. More...
 

Detailed Description

Interset of Line with a surface.

Author
S. Ansell
Version
1.0
Date
September 2007

Creates interaction with a line

Definition at line 39 of file LineIntersectVisit.h.

Member Typedef Documentation

◆ DistancesType

using Mantid::Geometry::LineIntersectVisit::DistancesType = boost::container::small_vector<double, 5>

Definition at line 41 of file LineIntersectVisit.h.

Constructor & Destructor Documentation

◆ LineIntersectVisit()

Mantid::Geometry::LineIntersectVisit::LineIntersectVisit ( const Kernel::V3D point,
const Kernel::V3D unitVector 
)

Constructor.

Definition at line 21 of file LineIntersectVisit.cpp.

References m_distancesOut, and m_intersectionPointsOut.

Member Function Documentation

◆ Accept() [1/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Cone Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 59 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [2/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Cylinder Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 68 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [3/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const General Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 86 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [4/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Plane Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 50 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [5/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Quadratic Surf)

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Definition at line 41 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [6/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Sphere Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 77 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::intersect(), m_intersectionPointsOut, and m_line.

◆ Accept() [7/7]

void Mantid::Geometry::LineIntersectVisit::Accept ( const Surface Surf)
overridevirtual

Process an intersect track.

Parameters
Surf:: Surface to use int line Interesect

Implements Mantid::Geometry::BaseVisit.

Definition at line 31 of file LineIntersectVisit.cpp.

◆ getDistance()

const DistancesType & Mantid::Geometry::LineIntersectVisit::getDistance ( ) const
inline

◆ getNPoints()

unsigned long Mantid::Geometry::LineIntersectVisit::getNPoints ( ) const
inline

Get the number of intersection points.

Definition at line 64 of file LineIntersectVisit.h.

◆ getPoints()

const Line::PType & Mantid::Geometry::LineIntersectVisit::getPoints ( ) const
inline

Get the intersection points.

Definition at line 62 of file LineIntersectVisit.h.

Referenced by Mantid::Geometry::CSGObject::interceptSurface().

◆ setLine()

void Mantid::Geometry::LineIntersectVisit::setLine ( const Kernel::V3D ,
const Kernel::V3D  
)

Re-set the line.

◆ sortAndRemoveDuplicates()

void Mantid::Geometry::LineIntersectVisit::sortAndRemoveDuplicates ( )

Prune out duplicated points and sort by distance to starting point.

Prune duplicated interception points in the point list.

Definition at line 99 of file LineIntersectVisit.cpp.

References Mantid::Geometry::Line::getDirect(), Mantid::Geometry::Line::getOrigin(), m_distancesOut, m_intersectionPointsOut, and m_line.

Referenced by Mantid::Geometry::CSGObject::distance(), and Mantid::Geometry::CSGObject::interceptSurface().

Member Data Documentation

◆ m_distancesOut

DistancesType Mantid::Geometry::LineIntersectVisit::m_distancesOut
private

The distance.

Definition at line 46 of file LineIntersectVisit.h.

Referenced by LineIntersectVisit(), and sortAndRemoveDuplicates().

◆ m_intersectionPointsOut

Line::PType Mantid::Geometry::LineIntersectVisit::m_intersectionPointsOut
private

The intersection point.

Definition at line 45 of file LineIntersectVisit.h.

Referenced by Accept(), LineIntersectVisit(), and sortAndRemoveDuplicates().

◆ m_line

Line Mantid::Geometry::LineIntersectVisit::m_line
private

The line.

Definition at line 44 of file LineIntersectVisit.h.

Referenced by Accept(), and sortAndRemoveDuplicates().


The documentation for this class was generated from the following files: