Pandora
Pandora source code navigator
|
CartesianVector class. More...
#include "CartesianVector.h"
Public Member Functions | |
CartesianVector (float x, float y, float z) | |
Constructor, create a vector from the cartesian coordinates of the end point, origin at (0,0,0,) | |
CartesianVector (const CartesianVector &rhs) | |
Copy constructor. | |
void | SetValues (float x, float y, float z) |
Set the values of cartesian vector components. | |
float | GetX () const |
Get the cartesian x coordinate. | |
float | GetY () const |
Get the cartesian y coordinate. | |
float | GetZ () const |
Get the cartesian z coordinate. | |
float | GetMagnitude () const |
Get the magnitude. | |
float | GetMagnitudeSquared () const |
Get the magnitude squared. | |
float | GetDotProduct (const CartesianVector &rhs) const |
Get the dot product of the cartesian vector with a second cartesian vector. | |
CartesianVector | GetCrossProduct (const CartesianVector &rhs) const |
Get the cross product of the cartesian vector with a second cartesian vector. | |
float | GetCosOpeningAngle (const CartesianVector &rhs) const |
Get the cosine of the opening angle of the cartesian vector with respect to a second cartesian vector. | |
float | GetOpeningAngle (const CartesianVector &rhs) const |
Get the opening angle of the cartesian vector with respect to a second cartesian vector. | |
float | GetDistanceSquared (const CartesianVector &rhs) const |
Get the distance squared of a cartesian vector with respect to a second cartesian vector. | |
void | GetSphericalCoordinates (float &radius, float &phi, float &theta) const |
Get the spherical coordinates of the cartesian vector. | |
void | GetCylindricalCoordinates (float &radius, float &phi, float &z) const |
Get the cylindrical coordinates of the cartesian vector (x/y .. radius, z .. z) | |
CartesianVector | GetUnitVector () const |
Get a unit vector in the direction of the cartesian vector. | |
CartesianVector & | operator= (const CartesianVector &rhs) |
Cartesian vector assignment operator. | |
CartesianVector & | operator+= (const CartesianVector &rhs) |
Cartesian vector += operator. | |
CartesianVector & | operator-= (const CartesianVector &rhs) |
Cartesian vector -= operator. | |
CartesianVector & | operator*= (const double scalar) |
Cartesian vector *= operator. | |
bool | operator== (const CartesianVector &rhs) const |
Cartesian vector == operator. | |
Private Attributes | |
float | m_x |
The x coordinate. | |
float | m_y |
The y coordinate. | |
float | m_z |
The z coordinate. | |
CartesianVector class.
Definition at line 23 of file CartesianVector.h.
|
inline |
Constructor, create a vector from the cartesian coordinates of the end point, origin at (0,0,0,)
x | the end point x coordinate |
y | the end point y coordinate |
z | the end point z coordinate |
Definition at line 232 of file CartesianVector.h.
|
inline |
Copy constructor.
rhs | the cartesian vector to copy |
Definition at line 241 of file CartesianVector.h.
float pandora::CartesianVector::GetCosOpeningAngle | ( | const CartesianVector & | rhs | ) | const |
Get the cosine of the opening angle of the cartesian vector with respect to a second cartesian vector.
rhs | the second cartesian vector |
Definition at line 16 of file CartesianVector.cc.
|
inline |
Get the cross product of the cartesian vector with a second cartesian vector.
rhs | the second cartesian vector |
Definition at line 301 of file CartesianVector.h.
void pandora::CartesianVector::GetCylindricalCoordinates | ( | float & | radius, |
float & | phi, | ||
float & | z | ||
) | const |
Get the cylindrical coordinates of the cartesian vector (x/y .. radius, z .. z)
radius | the radius (x,y-plane) of the vector |
phi | the azimuth of the vector |
z | the z position of the vector |
Definition at line 53 of file CartesianVector.cc.
|
inline |
Get the distance squared of a cartesian vector with respect to a second cartesian vector.
rhs | the second cartesian vector |
Definition at line 317 of file CartesianVector.h.
|
inline |
Get the dot product of the cartesian vector with a second cartesian vector.
rhs | the second cartesian vector |
Definition at line 294 of file CartesianVector.h.
|
inline |
Get the magnitude.
Definition at line 280 of file CartesianVector.h.
|
inline |
Get the magnitude squared.
Definition at line 287 of file CartesianVector.h.
|
inline |
Get the opening angle of the cartesian vector with respect to a second cartesian vector.
rhs | the second cartesian vector |
Definition at line 310 of file CartesianVector.h.
void pandora::CartesianVector::GetSphericalCoordinates | ( | float & | radius, |
float & | phi, | ||
float & | theta | ||
) | const |
Get the spherical coordinates of the cartesian vector.
radius | the magnitude of the vector |
phi | the azimuth of the vector |
theta | the inclination of the vector |
Definition at line 39 of file CartesianVector.cc.
CartesianVector pandora::CartesianVector::GetUnitVector | ( | ) | const |
Get a unit vector in the direction of the cartesian vector.
Definition at line 67 of file CartesianVector.cc.
|
inline |
Get the cartesian x coordinate.
Definition at line 259 of file CartesianVector.h.
|
inline |
Get the cartesian y coordinate.
Definition at line 266 of file CartesianVector.h.
|
inline |
Get the cartesian z coordinate.
Definition at line 273 of file CartesianVector.h.
|
inline |
Cartesian vector *= operator.
scalar | the scalar to multiply |
Definition at line 350 of file CartesianVector.h.
|
inline |
Cartesian vector += operator.
rhs | the cartesian vector to add |
Definition at line 334 of file CartesianVector.h.
|
inline |
Cartesian vector -= operator.
rhs | the cartesian vector to subtract |
Definition at line 342 of file CartesianVector.h.
|
inline |
Cartesian vector assignment operator.
rhs | the cartesian vector to assign |
Definition at line 326 of file CartesianVector.h.
|
inline |
Cartesian vector == operator.
rhs | the cartesian vector to compare |
Definition at line 358 of file CartesianVector.h.
|
inline |
Set the values of cartesian vector components.
x | the x coordinate |
y | the y coordinate |
z | the z coordinate |
Definition at line 250 of file CartesianVector.h.
|
private |
The x coordinate.
Definition at line 193 of file CartesianVector.h.
|
private |
The y coordinate.
Definition at line 194 of file CartesianVector.h.
|
private |
The z coordinate.
Definition at line 195 of file CartesianVector.h.