Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::Geometry::IntersectionPoint Struct Reference

Stores a point of intersection along a track. More...

#include <Track.h>

Public Member Functions

 IntersectionPoint (const TrackDirection direction, const Kernel::V3D &end, const double distFromStartOfTrack, const IObject &obj, const ComponentID compID=nullptr)
 Constuctor. More...
 
bool operator< (const IntersectionPoint &other) const
 A IntersectionPoint is less-than another if either (a) the difference in distances is greater than the tolerance and this distance is less than the other or (b) the distance is less than the other and this point is defined as an exit point. More...
 
bool operator== (const IntersectionPoint &other) const
 

Public Attributes

Attributes.
TrackDirection direction
 Directional flag. More...
 
Kernel::V3D endPoint
 Point. More...
 
double distFromStart
 Total distance from track begin. More...
 
const IObjectobject
 The object that was intersected. More...
 
ComponentID componentID
 Unique component ID. More...
 

Detailed Description

Stores a point of intersection along a track.

The component intersected is linked using its ComponentID.

Ordering for IntersectionPoint is special since we need that when dist is close that the +/- flag is taken into account.

Definition at line 106 of file Track.h.

Constructor & Destructor Documentation

◆ IntersectionPoint()

Mantid::Geometry::IntersectionPoint::IntersectionPoint ( const TrackDirection  direction,
const Kernel::V3D end,
const double  distFromStartOfTrack,
const IObject obj,
const ComponentID  compID = nullptr 
)
inline

Constuctor.

Parameters
direction:: Indicates the direction of travel of the track with respect to the object: +1 is entering, -1 is leaving.
end:: The end point for this partial segment
distFromStartOfTrack:: Total distance from start of track
compID:: An optional unique ID marking the component intersected. (Default=NULL)
obj:: A reference to the object that was intersected

Definition at line 117 of file Track.h.

Member Function Documentation

◆ operator<()

bool Mantid::Geometry::IntersectionPoint::operator< ( const IntersectionPoint other) const
inline

A IntersectionPoint is less-than another if either (a) the difference in distances is greater than the tolerance and this distance is less than the other or (b) the distance is less than the other and this point is defined as an exit point.

Parameters
other:: IntersectionPoint object to compare
Returns
True if the object is considered less than, otherwise false.

Definition at line 131 of file Track.h.

References direction, distFromStart, fabs, and Mantid::Kernel::Tolerance.

◆ operator==()

bool Mantid::Geometry::IntersectionPoint::operator== ( const IntersectionPoint other) const
inline

Definition at line 136 of file Track.h.

References direction, distFromStart, endPoint, fabs, and Mantid::Kernel::Tolerance.

Member Data Documentation

◆ componentID

ComponentID Mantid::Geometry::IntersectionPoint::componentID

Unique component ID.

Definition at line 155 of file Track.h.

◆ direction

TrackDirection Mantid::Geometry::IntersectionPoint::direction

Directional flag.

Definition at line 151 of file Track.h.

Referenced by operator<(), and operator==().

◆ distFromStart

double Mantid::Geometry::IntersectionPoint::distFromStart

Total distance from track begin.

Definition at line 153 of file Track.h.

Referenced by operator<(), and operator==().

◆ endPoint

Kernel::V3D Mantid::Geometry::IntersectionPoint::endPoint

Point.

Definition at line 152 of file Track.h.

Referenced by operator==().

◆ object

const IObject* Mantid::Geometry::IntersectionPoint::object

The object that was intersected.

Definition at line 154 of file Track.h.


The documentation for this struct was generated from the following file: