List of all members | Public Member Functions | Private Attributes
utl::Segment Class Reference

A segment joins two points. More...

#include <Segment.h>

Public Member Functions

const PointGetBegin () const
 Return the initial point. More...
 
const VectorGetDirection () const
 Return the (normalized) direction vector. More...
 
const PointGetEnd () const
 Return the final point. More...
 
double GetLength () const
 Return the length of the segment (ie the distance between begin and end). More...
 
 Segment (const Point &b, const Point &e)
 Construct the segment between the given two points. More...
 

Private Attributes

Point fBegin
 
Vector fDirection
 Compute the vector once. More...
 
Point fEnd
 
double fLength
 and so the length. More...
 

Detailed Description

A segment joins two points.

Date
30 Sep 2009
Author
Rodolfo Federico Gamarra

Definition at line 18 of file Segment.h.

Constructor & Destructor Documentation

utl::Segment::Segment ( const Point b,
const Point e 
)
inline

Construct the segment between the given two points.

Parameters
bInitial point.
eFinal point.

Definition at line 25 of file Segment.h.

References fDirection, fLength, and utl::Vector::GetMag().

Member Function Documentation

const Point& utl::Segment::GetBegin ( ) const
inline

Return the initial point.

Definition at line 36 of file Segment.h.

References fBegin.

Referenced by mdet::Scintillator::ComputeUndergroundIntersectionOf(), and MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

const Vector& utl::Segment::GetDirection ( ) const
inline

Return the (normalized) direction vector.

Definition at line 42 of file Segment.h.

References fDirection.

Referenced by MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

const Point& utl::Segment::GetEnd ( ) const
inline

Return the final point.

Definition at line 39 of file Segment.h.

References fEnd.

Referenced by MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

double utl::Segment::GetLength ( ) const
inline

Return the length of the segment (ie the distance between begin and end).

Definition at line 45 of file Segment.h.

References fLength.

Referenced by mdet::Scintillator::ComputeUndergroundGrammageFor(), and MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().

Member Data Documentation

Point utl::Segment::fBegin
private

Definition at line 48 of file Segment.h.

Referenced by GetBegin().

Vector utl::Segment::fDirection
private

Compute the vector once.

Definition at line 51 of file Segment.h.

Referenced by GetDirection(), and Segment().

Point utl::Segment::fEnd
private

Definition at line 49 of file Segment.h.

Referenced by GetEnd().

double utl::Segment::fLength
private

and so the length.

Definition at line 53 of file Segment.h.

Referenced by GetLength(), and Segment().


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

, generated on Tue Sep 26 2023.