72 #ifndef __gVirtualXRayConfig_h 88 template<
typename T>
class Vec3;
94 template<
typename T> std::ostream&
operator<<(std::ostream& anOutputStream,
104 template<
typename T>
class Vec3 117 Vec3(
const T& aX = 0,
const T& aY = 0,
const T& aZ = 0);
126 void setX(
const T& aValue);
135 void setY(
const T& aValue);
144 void setZ(
const T& aValue);
T m_z
the position along the z-axi
void setY(const T &aValue)
Set the position along the y-axis.
bool operator!=(const Vec3 &aVector) const
Operator !=.
T & operator[](unsigned int i)
double distance(const Vec3 &aVector) const
Vec3 operator-() const
Operator - to get the opposite vector.
Vec3 & operator+=(const Vec3 &aVector)
Operator +=.
T m_x
the position along the x-axis
double length() const
Get the length of the vector.
void normalise()
Normalise the current vector so that its length is 1.
Vec3 is a template class to handle a 3D vector.
T getX() const
Accessor on the position along the x-axis.
T getZ() const
Accessor on the position along the z-axis.
Vec3 normal() const
Get the unit vector corresponding to the normed current vector.
Vec3< T > elementWiseProduct(const Vec3 &aVector) const
Element-wise product.
Vec3 operator/(const double &aValue) const
Operator / to divide each component of the vector by a given value.
Vec3 & operator*=(const double &aValue)
T m_y
the position along the y-axi
void setX(const T &aValue)
Set the position along the x-axis.
Vec3 crossProduct(const Vec3 &aVector) const
Template class to handle 3D vectors.
T getY() const
Accessor on the position along the y-axis.
Vec3 operator^(const Vec3 &aVector) const
Vec3 & operator-=(const Vec3 &aVector)
Operator -=.
Vec3 operator+(const Vec3 &aVector) const
Operator +.
void normalize()
Normalize the current vector so that its length is 1.
std::ostream & operator<<(std::ostream &anOutputSream, const gVirtualXRay::AtomicElement &anElement)
operator <<
bool operator==(const Vec3 &aVector) const
Operator ==.
T & operator()(unsigned int i)
Vec3 operator*(const double &aValue) const
Operator * to multiply each component of the vector by a given value.
double dotProduct(const Vec3 &aVector) const
Get the dot product between the current vector and a given vector.
Image< T > operator*(const T &aValue, const Image< T > &anImage)
Vec3 & operator/=(const double &aValue)
Operator -=.
void setZ(const T &aValue)
Set the position along the z-axis.
Vec3(const T &aX=0, const T &aY=0, const T &aZ=0)
Default Constructor.