103 fRealPart(
q.fRealPart), fVectorPart(
q.fVectorPart) {}
106 : fRealPart(real), fVectorPart(vect) {}
109 : fRealPart(x0[3]), fVectorPart(x0) {}
112 : fRealPart(x0[3]), fVectorPart(x0) {}
115 : fRealPart(real), fVectorPart(
X,Y,Z) {}
131 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
148 Error(
"operator()(i)",
"bad index (%d) returning &fRealPart",i);
182 double norm =
v.
Mag();
221 Error(
"operator/(Double_t)",
"bad value (%f) ignored",real);
294 (*this) *= -(1./norm2);
296 Error(
"DivideLeft(const TVector3)",
"bad norm2 (%f) ignored",norm2);
309 (*this) *= - (1./norm2);
311 Error(
"operator/=(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
323 double invNorm2 = 1./norm2;
327 Error(
"LeftQuotient(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
339 double invNorm2 = 1./norm2;
343 Error(
"operator/(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
418 (*this) *= (1./norm2);
420 Error(
"DivideLeft(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
434 (*this) *= (1./norm2);
436 Error(
"operator/=(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
448 double invNorm2 = 1./norm2;
454 Error(
"LeftQuotient(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
466 double invNorm2 = 1./norm2;
472 Error(
"operator/(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
481 double norm2 =
Norm2();
483 double invNorm2 = 1./norm2;
486 Error(
"Invert()",
"bad norm2 (%f) ignored",norm2);
503 double norm2 =
Norm2();
520 Error(
"Rotation()",
"bad norm2 (%f) ignored",norm2);
530 Printf(
"%s %s (r,x,y,z)=(%f,%f,%f,%f) \n (alpha,rho,theta,phi)=(%f,%f,%f,%f)",
GetName(),
GetTitle(),
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint angle
TQuaternion operator*(Double_t r, const TQuaternion &q)
TQuaternion operator+(Double_t r, const TQuaternion &q)
TQuaternion operator-(Double_t r, const TQuaternion &q)
TQuaternion operator/(Double_t r, const TQuaternion &q)
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
<div class="legacybox"><h2>Legacy Code</h2> TQuaternion is a legacy interface: there will be no bug f...
TQuaternion & MultiplyLeft(const TVector3 &vector)
left multiplication
TQuaternion LeftQuotient(const TVector3 &vector) const
left quotient
TQuaternion operator*(Double_t real) const
product of quaternion with a real
TQuaternion(Double_t real=0, Double_t X=0, Double_t Y=0, Double_t Z=0)
void Rotate(TVector3 &vect) const
rotate vect by current quaternion
Double_t operator()(int) const
dereferencing operator const
TQuaternion & DivideLeft(const TVector3 &vector)
left division
TQuaternion operator+(Double_t real) const
sum of quaternion with a real
TQuaternion LeftProduct(const TVector3 &vector) const
left product
TQuaternion & operator/=(Double_t real)
TQuaternion & operator*=(Double_t real)
TQuaternion & SetQAngle(Double_t angle)
Set angle of quaternion (rad) - keep quaternion norm N.B : this angle is half of the corresponding ro...
TQuaternion operator/(Double_t real) const
division by a real
TQuaternion Invert() const
invert
TVector3 Rotation(const TVector3 &vect) const
rotation of vect by current quaternion
TQuaternion operator-() const
TQuaternion & SetAxisQAngle(TVector3 &v, Double_t QAngle)
set quaternion from vector and angle (rad) quaternion is set as unitary N.B : this angle is half of t...
TQuaternion Conjugate() const
void Print(Option_t *option="") const override
Print Quaternion parameters.
Double_t GetQAngle() const
Get angle of quaternion (rad) N.B : this angle is half of the corresponding rotation angle.
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t Theta() const
Return the polar angle.
TVector3 Cross(const TVector3 &) const
constexpr Double_t PiOver2()
constexpr Double_t RadToDeg()
Conversion from radian to degree: .