ROOT logo
ROOT » GRAF3D » EVE » TEveVector2T<float>

class TEveVector2T<float>


This class is also known as (typedefs to this class)

TEveVector2T<Float_t>, TEveVector2, TEveVector2F

Function Members (Methods)

TEveVector2T<float>(const Float_t* v)
TEveVector2T<float>(const Double_t* v)
TEveVector2T<float>(const TEveVector2T<double>& v)
TEveVector2T<float>(const TEveVector2T<float>&)
TEveVector2T<float>(float x, float y)
const float*Arr() const
static TClass*Class()
floatCross(const TEveVector2T<float>& a) const
floatDistance(const TEveVector2T<float>& b) const
floatDot(const TEveVector2T<float>& a) const
voidDump() const
TClass*IsA() const
floatMag() const
floatMag2() const
TEveVector2T<float>&Mult(const TEveVector2T<float>& a, float af)
voidNormalize(float length = 1)
const float*operator const float*() const
float*operator float*()
TEveVector2T<float>&operator*=(float s)
TEveVector2T<float>&operator+=(const TEveVector2T<float>& v)
TEveVector2T<float>&operator-=(const TEveVector2T<float>& v)
TEveVector2T<float>&operator=(const TEveVector2T<float>&)
float&operator[](Int_t idx)
floatoperator[](Int_t idx) const
floatPhi() const
voidSet(const Float_t* v)
voidSet(const Double_t* v)
voidSet(float x, float y)
floatSquareDistance(const TEveVector2T<float>& b) const
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TEveVector2T<float>&Sub(const TEveVector2T<float>& p, const TEveVector2T<float>& q)

Data Members

floatfYComponents of the point.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

template<typename TT> void TEveVector2T<TT> Normalize(float length = 1)
 Normalize the vector to length if current length is non-zero.
template<typename TT> void TEveVector2T<TT> Dump() const
 Dump to stdout as "(x, y)\n".
TT TEveVector2T<TT> Phi() const
TT TEveVector2T<TT> Distance(const TEveVector2T<float>& b) const
TT TEveVector2T<TT> SquareDistance(const TEveVector2T<float>& b) const
TT TEveVector2T<TT> Dot(const TEveVector2T<float>& a) const
TT TEveVector2T<TT> Cross(const TEveVector2T<float>& a) const
TEveVector2T<TT>& TEveVector2T<TT> Sub(const TEveVector2T<float>& p, const TEveVector2T<float>& q)
TEveVector2T<TT>& TEveVector2T<TT> Mult(const TEveVector2T<float>& a, float af)
const TT* Arr() const
{ return &fX; }
TT* Arr()
{ return &fX; }
TEveVectorT& operator*=(float s)
{ fX *= s; fY *= s; fZ *= s; return *this; }
TEveVectorT& operator+=(const TEveVector2T<float>& v)
{ fX += v.fX; fY += v.fY; fZ += v.fZ; return *this; }
TEveVectorT& operator-=(const TEveVector2T<float>& v)
{ fX -= v.fX; fY -= v.fY; fZ -= v.fZ; return *this; }
void Set(const Float_t* v)
{ fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(const Double_t* v)
{ fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(TT x, TT y, TT z)
{ fX = x; fY = y; fZ = z; }
TT Mag2() const
{ return fX*fX + fY*fY + fZ*fZ; }
TT Mag() const
{ return TMath::Sqrt(Mag2()); }
TT& operator[](Int_t idx)
{ return (&fX)[idx]; }
TT operator[](Int_t idx) const
{ return (&fX)[idx]; }
void NegateXY()
{ fX = - fX; fY = -fY; }