#ifndef ROOT_TRotMatrix #define ROOT_TRotMatrix //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TRotMatrix // // // // Rotation Matrix for 3-D geometry objects. // // // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TNamed //*KEEP,TNamed. #include "TNamed.h" //*KEND. #endif enum { kReflection = BIT(23) // "Reflection" bit }; class TRotMatrix : public TNamed { private: virtual void SetReflection(); // Set the "reflection" flag if det < 0 protected: Int_t fNumber; //Rotation matrix number Int_t fType; //Type of matrix (0=identity, 1=reflexion, 2=otherwise) Double_t fTheta; //theta angle Double_t fPhi; //phi angle Double_t fPsi; //psi angle Double_t fMatrix[9]; //Rotation matrix public: TRotMatrix(); TRotMatrix(const Text_t *name, const Text_t *title, Double_t *matrix); TRotMatrix(const Text_t *name, const Text_t *title, Double_t theta, Double_t phi, Double_t psi); TRotMatrix(const Text_t *name, const Text_t *title, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3); virtual ~TRotMatrix(); virtual Double_t Determinant() const ; // returns the determinant of this matrix virtual Double_t* GetMatrix() {return &fMatrix[0];} virtual Int_t GetNumber() const {return fNumber;} virtual Int_t GetType() const {return fType;} virtual Double_t GetTheta() const {return fTheta;} virtual Double_t GetPhi() const {return fPhi;} virtual Double_t GetPsi() const {return fPsi;} virtual Double_t* GetGLMatrix(Double_t *rGLMatrix) const ; // Convert this matrix to the OpenGL [4x4] virtual Bool_t IsReflection() const {return TestBit(kReflection);} // Return kTRUE if this matrix defines the reflection virtual void SetMatrix(const Double_t *matrix); virtual void SetName(const Text_t *name); ClassDef(TRotMatrix,1) //Rotation Matrix for 3-D geometry objects }; inline void TRotMatrix::SetName(const Text_t *) { } #endif