ROOT logo
#ifndef HGEOMTRANSFORM_H
#define HGEOMTRANSFORM_H

#include "hgeomvector.h"
#include "hgeomrotation.h"

class HGeomTransform : public TObject {
protected:
  HGeomRotation rot;   // rotation matrix, describing the orientation
  HGeomVector trans;   // translation vector, describing the position
public:
  HGeomTransform() {}
  inline HGeomTransform(const HGeomTransform& t);
  ~HGeomTransform() {}
  HGeomTransform& operator=(const HGeomTransform& t);
  const HGeomRotation& getRotMatrix() const { return rot; }
  const HGeomVector& getTransVector() const { return trans; } 
  void setRotMatrix(const HGeomRotation& r) { rot=r; }
  void setRotMatrix(const Double_t* a) { rot.setMatrix(a); }
  void setRotMatrix(const Float_t* a) { rot.setMatrix(a); }
  void setTransVector(const HGeomVector& t) { trans=t; }
  void setTransVector(const Double_t* a) { trans.setVector(a); }
  void setTransVector(const Float_t* a) { trans.setVector(a); }
  HGeomVector transFrom(const HGeomVector& p) const;
  HGeomVector transTo(const HGeomVector& p) const;
  void transFrom(const HGeomTransform&);
  void transTo(const HGeomTransform&);
  void invert(void);
  void clear();
  void print() const;
  inline void setTransform(const HGeomTransform& t);
  ClassDef(HGeomTransform,1) // basic geometry transformation class
};

inline HGeomTransform::HGeomTransform(const HGeomTransform& t): TObject(t) {
  rot=t.getRotMatrix();
  trans=t.getTransVector();
}


inline void HGeomTransform::setTransform(const HGeomTransform& t) {
  rot=t.getRotMatrix();
  trans=t.getTransVector();
}

#endif /* !HGEOMTRANSFORM_H */
 hgeomtransform.h:1
 hgeomtransform.h:2
 hgeomtransform.h:3
 hgeomtransform.h:4
 hgeomtransform.h:5
 hgeomtransform.h:6
 hgeomtransform.h:7
 hgeomtransform.h:8
 hgeomtransform.h:9
 hgeomtransform.h:10
 hgeomtransform.h:11
 hgeomtransform.h:12
 hgeomtransform.h:13
 hgeomtransform.h:14
 hgeomtransform.h:15
 hgeomtransform.h:16
 hgeomtransform.h:17
 hgeomtransform.h:18
 hgeomtransform.h:19
 hgeomtransform.h:20
 hgeomtransform.h:21
 hgeomtransform.h:22
 hgeomtransform.h:23
 hgeomtransform.h:24
 hgeomtransform.h:25
 hgeomtransform.h:26
 hgeomtransform.h:27
 hgeomtransform.h:28
 hgeomtransform.h:29
 hgeomtransform.h:30
 hgeomtransform.h:31
 hgeomtransform.h:32
 hgeomtransform.h:33
 hgeomtransform.h:34
 hgeomtransform.h:35
 hgeomtransform.h:36
 hgeomtransform.h:37
 hgeomtransform.h:38
 hgeomtransform.h:39
 hgeomtransform.h:40
 hgeomtransform.h:41
 hgeomtransform.h:42
 hgeomtransform.h:43
 hgeomtransform.h:44
 hgeomtransform.h:45
 hgeomtransform.h:46