HerdSoftware  0.1.1
Public Member Functions | Private Attributes | List of all members
Herd::PhysPoint Class Reference

A class describing a physical point in the 3D space. More...

#include <dataobjects/PhysPoint.h>

Inheritance diagram for Herd::PhysPoint:
Herd::Vec3D Herd::CooArray< float > Herd::ArrayForwarder< float, 3 >

Public Member Functions

 PhysPoint ()
 Default constructor. More...
 
 PhysPoint (float xCoo, float yCoo, float zCoo, float resX=0., float resY=0., float resZ=0.)
 Constructor. More...
 
 PhysPoint (const Vec3D &coo, std::array< float, 3 > res={0., 0., 0.})
 Array constructor. More...
 
virtual ~PhysPoint ()=default
 Virtual destructor. More...
 
float ResX () const
 Returns the resolution of the X coordinate of the point. More...
 
void SetResX (float resX)
 
float ResY () const
 Returns the resolution of the Y coordinate of the point. More...
 
void SetResY (float resY)
 
float ResZ () const
 Returns the resolution of the Z coordinate of the point. More...
 
void SetResZ (float resZ)
 
CooArray< float > ResAsArray () const
 Returns the point resolution as array. More...
 
void SetResFromArray (const std::array< float, 3 > arr)
 Sets the resolution from array. More...
 
- Public Member Functions inherited from Herd::Vec3D
 Vec3D ()
 Default constructor. More...
 
 Vec3D (float x, float y, float z)
 Constructor. More...
 
 Vec3D (std::array< float, 3 > arr)
 Constructor. More...
 
 Vec3D (RefFrame::Direction direction)
 Constructs a 3D vector from a given direction. More...
 
void Dump () const
 Dumps the vector components. More...
 
float Mag () const
 Compute the vector magnitude. More...
 
Vec3D CrossProduct (const Vec3D &rhs)
 Compute the cross product of two vectors. More...
 
float PolarAngle () const
 Compute the polar angle. More...
 
float AzimuthAngle () const
 Compute the azimuth angle. More...
 
Vec3Doperator+= (Vec3D const &right)
 Add a vector to this one. More...
 
Vec3Doperator+= (Vec3D &&right)
 
Vec3D operator- (Vec3D const &right) const
 Subtract two vectors. More...
 
Vec3Doperator-= (Vec3D const &right)
 Subtract a vector from this one. More...
 
Vec3Doperator-= (Vec3D &&right)
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
Vec3Doperator*= (T const &right)
 Multiply a vector by a number. More...
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
Vec3Doperator*= (T &&right)
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
Vec3Doperator/= (T const &right)
 Divide a vector by a number. More...
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
Vec3Doperator/= (T &&right)
 
bool operator== (const Vec3D &right) const
 Comparison operator. More...
 
- Public Member Functions inherited from Herd::CooArray< float >
 CooArray ()
 Default constructor. More...
 
 CooArray (const CooArray< float > &c)
 Copy constructor. More...
 
 CooArray (V &&v1, V &&v2, V &&v3)
 Initializer list constructor. More...
 
 CooArray (const std::array< float, 3 > &values)
 Array constructors. More...
 
 CooArray (std::array< float, 3 > &&values)
 
CooArray< float > & operator= (const CooArray< float > &lhs)
 Assignment operator. More...
 
float & operator[] (const RefFrame::Coo &coo)
 Accesses an element without validity check on the element index. More...
 
const float & operator[] (const RefFrame::Coo &coo) const
 Accesses an element without validity check on the element index. More...
 
float & at (const RefFrame::Coo &coo)
 Accesses an element with validity check on the element index. More...
 
const float & at (const RefFrame::Coo &coo) const
 Accesses an element with validity check on the element index. More...
 
- Public Member Functions inherited from Herd::ArrayForwarder< float, 3 >
 ArrayForwarder ()
 
 ArrayForwarder (std::array< float, _Nm > arr)
 
void fill (const value_type &__u)
 
void swap (ArrayForwarder &__other) noexcept(noexcept(std::swap(std::declval< float & >(), std::declval< float & >())))
 
_GLIBCXX17_CONSTEXPR iterator begin () noexcept
 
_GLIBCXX17_CONSTEXPR const_iterator begin () const noexcept
 
_GLIBCXX17_CONSTEXPR iterator end () noexcept
 
_GLIBCXX17_CONSTEXPR const_iterator end () const noexcept
 
_GLIBCXX17_CONSTEXPR reverse_iterator rbegin () noexcept
 
_GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin () const noexcept
 
_GLIBCXX17_CONSTEXPR reverse_iterator rend () noexcept
 
_GLIBCXX17_CONSTEXPR const_reverse_iterator rend () const noexcept
 
_GLIBCXX17_CONSTEXPR const_iterator cbegin () const noexcept
 
_GLIBCXX17_CONSTEXPR const_iterator cend () const noexcept
 
_GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin () const noexcept
 
_GLIBCXX17_CONSTEXPR const_reverse_iterator crend () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr size_type max_size () const noexcept
 
constexpr bool empty () const noexcept
 
_GLIBCXX17_CONSTEXPR reference operator[] (size_type __n) noexcept
 
constexpr const_reference operator[] (size_type __n) const noexcept
 
_GLIBCXX17_CONSTEXPR reference at (size_type __n)
 
constexpr const_reference at (size_type __n) const
 
_GLIBCXX17_CONSTEXPR reference front () noexcept
 
constexpr const_reference front () const noexcept
 
_GLIBCXX17_CONSTEXPR reference back () noexcept
 
constexpr const_reference back () const noexcept
 
_GLIBCXX17_CONSTEXPR pointer data () noexcept
 
_GLIBCXX17_CONSTEXPR const_pointer data () const noexcept
 

Private Attributes

CooArray< float > _res
 

Additional Inherited Members

- Public Types inherited from Herd::CooArray< float >
using BaseType = ArrayForwarder< float, 3 >
 
- Public Types inherited from Herd::ArrayForwarder< float, 3 >
typedef float value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typeiterator
 
typedef const value_typeconst_iterator
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Detailed Description

A class describing a physical point in the 3D space.

The PhysPoint class provides the coordinates and the resolution of a point in 3D space.

Constructor & Destructor Documentation

◆ PhysPoint() [1/3]

Herd::PhysPoint::PhysPoint ( )
inline

Default constructor.

Creates a physical point with undefined coordinates and resolution.

◆ PhysPoint() [2/3]

Herd::PhysPoint::PhysPoint ( float  xCoo,
float  yCoo,
float  zCoo,
float  resX = 0.,
float  resY = 0.,
float  resZ = 0. 
)
inline

Constructor.

Constructs a 3D point from its coordinates.

Parameters
xCooX coordinate.
yCooY coordinate.
zCooZ coordinate.
resXResolution on X coordinate.
resYResolution on Y coordinate.
resZResolution on Z coordinate.

◆ PhysPoint() [3/3]

Herd::PhysPoint::PhysPoint ( const Vec3D coo,
std::array< float, 3 >  res = {0., 0., 0.} 
)
inline

Array constructor.

Constructs a 3D point from its coordinates.

Parameters
coocoordinates.
resResolution on coordinates.

◆ ~PhysPoint()

virtual Herd::PhysPoint::~PhysPoint ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ ResAsArray()

CooArray<float> Herd::PhysPoint::ResAsArray ( ) const
inline

Returns the point resolution as array.

Returns
The resulting array.

◆ ResX()

float Herd::PhysPoint::ResX ( ) const
inline

Returns the resolution of the X coordinate of the point.

Returns
The X resolution [cm].

◆ ResY()

float Herd::PhysPoint::ResY ( ) const
inline

Returns the resolution of the Y coordinate of the point.

Returns
The Y resolution [cm].

◆ ResZ()

float Herd::PhysPoint::ResZ ( ) const
inline

Returns the resolution of the Z coordinate of the point.

Returns
The Z resolution [cm].

◆ SetResFromArray()

void Herd::PhysPoint::SetResFromArray ( const std::array< float, 3 >  arr)
inline

Sets the resolution from array.

Parameters
Thenew resolution

◆ SetResX()

void Herd::PhysPoint::SetResX ( float  resX)
inline

Sets the value of the X resolution.

Parameters
xThe new X resolution [cm]

◆ SetResY()

void Herd::PhysPoint::SetResY ( float  resY)
inline

Sets the value of the Y resolution.

Parameters
xThe new Y resolution [cm]

◆ SetResZ()

void Herd::PhysPoint::SetResZ ( float  resZ)
inline

Sets the value of the Z resolution.

Parameters
xThe new Z resolution [cm]

Member Data Documentation

◆ _res

CooArray<float> Herd::PhysPoint::_res
private

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