Project
Loading...
Searching...
No Matches
FairGeoTransform.h
Go to the documentation of this file.
1/********************************************************************************
2 * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3 * *
4 * This software is distributed under the terms of the *
5 * GNU Lesser General Public Licence (LGPL) version 3, *
6 * copied verbatim in the file "LICENSE" *
7 ********************************************************************************/
8#ifndef FAIRGEOTRANSFORM_H
9#define FAIRGEOTRANSFORM_H
10
11#include "FairGeoRotation.h" // for FairGeoRotation
12#include "FairGeoVector.h" // for FairGeoVector
13
14#include <Rtypes.h> // for Double_t, etc
15#include <TObject.h> // for TObject
16
21{
22 protected:
27 public:
29 inline FairGeoTransform(const FairGeoTransform& t);
32 const FairGeoRotation& getRotMatrix() const { return rot; }
33 const FairGeoVector& getTransVector() const { return trans; }
34 void setRotMatrix(const FairGeoRotation& r) { rot = r; }
35 void setRotMatrix(const Double_t* a) { rot.setMatrix(a); }
36 void setRotMatrix(const Float_t* a) { rot.setMatrix(a); }
37 void setTransVector(const FairGeoVector& t) { trans = t; }
38 void setTransVector(const Double_t* a) { trans.setVector(a); }
41 FairGeoVector transTo(const FairGeoVector& p) const;
42 void transFrom(const FairGeoTransform&);
43 void transTo(const FairGeoTransform&);
44 void invert(void);
45 void clear();
46 void print();
48 {
49 const double fac = 10.;
51 return (trans_cm /= fac);
52 }
53
54 const FairGeoRotation& getRotation() const { return rot; }
55
56 inline void setTransform(const FairGeoTransform& t);
58};
59
61 : TObject(t)
62 , rot(t.getRotMatrix())
63 , trans(t.getTransVector())
64 , trans_cm(FairGeoVector(0, 0, 0))
65{}
66
68{
69 rot = t.getRotMatrix();
71}
72
73#endif /* !FAIRGEOTRANSFORM_H */
void setMatrix(const Double_t *)
void setTransVector(const Float_t *a)
FairGeoVector trans
void setTransform(const FairGeoTransform &t)
const FairGeoVector & getTransVector() const
void setTransVector(const Double_t *a)
void setRotMatrix(const Float_t *a)
const FairGeoRotation & getRotMatrix() const
FairGeoRotation rot
FairGeoVector transTo(const FairGeoVector &p) const
const FairGeoRotation & getRotation() const
void setTransVector(const FairGeoVector &t)
FairGeoVector transFrom(const FairGeoVector &p) const
ClassDef(FairGeoTransform, 1)
void setRotMatrix(const Double_t *a)
const FairGeoVector & getTranslation()
FairGeoTransform & operator=(const FairGeoTransform &t)
FairGeoVector trans_cm
void setRotMatrix(const FairGeoRotation &r)
void setVector(const Double_t *a)
GLboolean r
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233