// -*- mode: c++ -*- // // $Id: BrCoordinateSystem.h,v 1.2 2002/02/26 08:58:48 cholm Exp $ // $Author: cholm $ // $Date: 2002/02/26 08:58:48 $ // $Copyright: (C) 2002 BRAHMS Collaboration // ////////////////////////////////////////////////////////////////////////////// // // BrCoordinateSysten // // 3D Coordinate systems and related transformations. // Part of the Geometry classes Points, Line, Lines, Planes. // // Author: F.Videbaek // Created: November 1998 // // ///////////////////////////////////////////////////////////////////////////// #ifndef BRAT_BrCoordinateSystem #define BRAT_BrCoordinateSystem #include #ifndef ROOT_TObject #include "TObject.h" #endif #ifndef BRAT_BrRotMatrix #include "BrRotMatrix.h" #endif #ifndef BRAT_BrVector3D #include "BrVector3D.h" #endif class BrCoordinateSystem : public TObject { public: // constructors and destructors // BrCoordinateSystem(); BrCoordinateSystem(const BrVector3D&, const BrRotMatrix&); ~BrCoordinateSystem(){}; BrCoordinateSystem& BrCoordinateSystem::operator=(const BrCoordinateSystem& system); BrCoordinateSystem(const BrCoordinateSystem& system) : fOrigin(system.fOrigin) , fRotMatrix(system.fRotMatrix), fInverseRotMatrix(system.fInverseRotMatrix) {}; public: // access methods // BrVector3D GetOrigin() const {return fOrigin;}; void SetOrigin(const BrVector3D& vector) { fOrigin = vector;}; void SetRotMatrix(const BrRotMatrix& rotm) { fRotMatrix = rotm; SetInverseMatrix();} // // Class operations // const BrRotMatrix* GetRotMatrix() const {return &fRotMatrix;}; const BrRotMatrix* GetInverseRotMatrix() const {return &fInverseRotMatrix;}; BrVector3D RotateToMaster(const BrVector3D&) const; BrVector3D RotateFromMaster(const BrVector3D&) const; BrVector3D TransformToMaster(const BrVector3D&) const; BrVector3D TransformFromMaster(const BrVector3D&) const; void List(); virtual void Print(Option_t* option="") const ; // BrVector3D TransLateToMaster(const BrVector3D&); // BrVector3D TransLateFromMaster(const BrVector3D&); static BrCoordinateSystem SetRelativeSystem(const BrCoordinateSystem& master, const BrCoordinateSystem& daughter); private: BrVector3D fOrigin; // Origin for system in Master system BrRotMatrix fRotMatrix; // Rotation matrix for the system. BrRotMatrix fInverseRotMatrix; // Inverse Rotation matrix for the system void SetInverseMatrix(); ClassDef(BrCoordinateSystem,1) }; // // Related Global functions // ostream& operator<<(ostream& str, const BrCoordinateSystem&); #endif // $Log: BrCoordinateSystem.h,v $ // Revision 1.2 2002/02/26 08:58:48 cholm // Added const'ness to many methods - needed by ISO C++ // // Revision 1.1.1.1 2001/06/21 14:55:20 hagel // Initial revision of brat2 // // Revision 1.4 1999/12/23 15:55:38 videbaek // Added the SetRelativeSystem // Fully debugged. // // Revision 1.3 1999/01/21 23:23:24 hagel // 1. Changed convention for checking includes. Current convention is: // BRAT_Br...... eg BRAT_BrModule ala ROOT. // 2. Added CVS logs to .h files that didn't have them. // 3. Moved checking of include definition to first line for easier reading // 4. Put checks before all includes in the include files as per BRAT specifications // 5. Added BrGeantHeader to Geant Makefile // 6. All changes have been checked to compile on NT ala Cygnus // // Revision 1.2 1998/12/21 20:32:03 videbaek // coordinate system changes mainly // // Revision 1.1 1998/12/01 20:49:57 videbaek // Added several classes to Geometry. Updated source and makefile(s) // - BrLine3D // - BrCoordinateSystem // - BrRotMatrix // //