MCL
A C++ library mirroring some of the most common Matlab functions.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
mcl::Triplet Class Reference

#include <point.h>

Public Member Functions

 Triplet () noexcept
 
 Triplet (Real x, Real y, Real z) noexcept
 
bool Equals (const Triplet &other_point) const noexcept
 
Real x () const noexcept
 
Real y () const noexcept
 
Real z () const noexcept
 
void SetX (const Real value) noexcept
 
void SetY (const Real value) noexcept
 
void SetZ (const Real value) noexcept
 
Real norm () const noexcept
 
Real theta () const noexcept
 
Real phi () const noexcept
 
void Normalize () noexcept
 

Constructor & Destructor Documentation

mcl::Triplet::Triplet ( )
noexcept

Constructs a Point with all coordinates set to zero.

mcl::Triplet::Triplet ( Real  x,
Real  y,
Real  z 
)
noexcept

Constructor with explicit definition of all coordinates.

Member Function Documentation

bool mcl::Triplet::Equals ( const Triplet other_point) const
noexcept
Real mcl::Triplet::norm ( ) const
noexcept

Returns the norm of the vector, or, in other words, the distance of the point from the origin (0,0,0)

void mcl::Triplet::Normalize ( )
noexcept

Modifies the point (i.e. vector) such that its norm is equal to 1.

Real mcl::Triplet::phi ( ) const
noexcept

Returns the angle formed between the projection on the x-y axis and the x-axis

void mcl::Triplet::SetX ( const Real  value)
inlinenoexcept
void mcl::Triplet::SetY ( const Real  value)
inlinenoexcept
void mcl::Triplet::SetZ ( const Real  value)
inlinenoexcept
Real mcl::Triplet::theta ( ) const
noexcept

Returns the angle formed with the z-axis

Real mcl::Triplet::x ( ) const
inlinenoexcept
Real mcl::Triplet::y ( ) const
inlinenoexcept
Real mcl::Triplet::z ( ) const
inlinenoexcept

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