CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::Path Class Reference

This class represents a (potentially) curved path between two points using N >= 1 straight-line segments. More...

#include <Path.hpp>

Inheritance diagram for corsika::Path:

Public Member Functions

 Path (Point const &point)
 Create a Path with a given starting Point.
 
 Path (std::deque< Point > const &points)
 Initialize a Path from an existing collection of Points.
 
void addToEnd (Point const &point)
 Add a new Point to the end of the path.
 
void removeFromEnd ()
 Remove a point from the end of the path.
 
LengthType getLength () const
 Get the total length of the path.
 
Point const & getStart () const
 Get the starting point of the path.
 
Point const & getEnd () const
 Get the end point of the path.
 
Point const & getPoint (std::size_t const index) const
 Get a specific point of the path.
 
const_iterator begin () const
 Return an iterator to the start of the Path.
 
const_iterator end () const
 Return an iterator to the end of the Path.
 
iterator begin ()
 Return an iterator to the start of the Path.
 
iterator end ()
 Return an iterator to the end of the Path.
 
int getNSegments () const
 Get the number of steps in the path. More...
 

Protected Types

using iterator = std::deque< Point >::iterator
 
using const_iterator = std::deque< Point >::const_iterator
 

Protected Attributes

std::deque< Pointpoints_
 The points that make up this path.
 
LengthType length_ = LengthType::zero()
 The length of the path.
 

Detailed Description

This class represents a (potentially) curved path between two points using N >= 1 straight-line segments.

Definition at line 22 of file Path.hpp.

Member Function Documentation

◆ getNSegments()

int corsika::Path::getNSegments ( ) const
inline

Get the number of steps in the path.

This is one less than the number of points that defines the path.


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