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

#include <Point.hpp>

Inheritance diagram for corsika::Point:

Public Member Functions

 Point (CoordinateSystemPtr const &pCS, QuantityVector< length_d > const &pQVector)
 
 Point (CoordinateSystemPtr const &cs, LengthType x, LengthType y, LengthType z)
 
QuantityVector< length_d > const & getCoordinates () const
 
QuantityVector< length_d > & getCoordinates ()
 
QuantityVector< length_dgetCoordinates (CoordinateSystemPtr const &pCS) const
 this always returns a QuantityVector as triple More...
 
QuantityVector< length_d > & getCoordinates (CoordinateSystemPtr const &pCS)
 this always returns a QuantityVector as triple More...
 
void rebase (CoordinateSystemPtr const &pCS)
 
Point operator+ (Vector< length_d > const &pVec) const
 
Point operator- (Vector< length_d > const &pVec) const
 
Vector< length_doperator- (Point const &pB) const
 
access coordinate components

Note, if you access components in a different CoordinateSystem pCS than the stored data, internally a temporary object will be created and destroyed each call.

This can be avoided by using rebase first.

LengthType getX (CoordinateSystemPtr const &pCS) const
 
LengthType getY (CoordinateSystemPtr const &pCS) const
 
LengthType getZ (CoordinateSystemPtr const &pCS) const
 
- Public Member Functions inherited from corsika::BaseVector< length_d >
 BaseVector (CoordinateSystemPtr const &pCS, QuantityVector< length_d > const &pQVector)
 
 BaseVector (BaseVector const &)=default
 
 BaseVector (BaseVector &&a)=default
 
BaseVectoroperator= (BaseVector const &)=default
 
CoordinateSystemPtr getCoordinateSystem () const
 
void setCoordinateSystem (CoordinateSystemPtr const &cs)
 

Additional Inherited Members

- Protected Member Functions inherited from corsika::BaseVector< length_d >
QuantityVector< length_d > const & getQuantityVector () const
 
QuantityVector< length_d > & getQuantityVector ()
 
void setQuantityVector (QuantityVector< length_d > const &v)
 

Detailed Description

A Point represents a point in position space. It is defined by its coordinates with respect to some CoordinateSystem.

Definition at line 22 of file Point.hpp.

Member Function Documentation

◆ getCoordinates() [1/3]

QuantityVector<length_d> const& corsika::Point::getCoordinates ( ) const
inline
Todo:
TODO: this should be private or protected, we don NOT want to expose numbers without reference to outside:

◆ getCoordinates() [2/3]

QuantityVector<length_d> corsika::Point::getCoordinates ( CoordinateSystemPtr const &  pCS) const
inline

this always returns a QuantityVector as triple

Returns
A value type QuantityVector, since it may have to create a temporary object to transform to pCS.

◆ getCoordinates() [3/3]

QuantityVector<length_d>& corsika::Point::getCoordinates ( CoordinateSystemPtr const &  pCS)
inline

this always returns a QuantityVector as triple

Returns
A reference type QuantityVector&, but be aware, the underlying class data is actually transformed to pCS, if needed. Thus, there may be an implicit call to rebase.

◆ operator-()

Vector<length_d> corsika::Point::operator- ( Point const &  pB) const
inline

returns the distance Vector between two points

◆ rebase()

void corsika::Point::rebase ( CoordinateSystemPtr const &  pCS)
inline

transforms the Point into another CoordinateSystem by changing its coordinates interally


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