CMS 3D CMS Logo

TEveEllipsoid.h
Go to the documentation of this file.
1 #ifndef ROOT_TEveEllipsoid
2 #define ROOT_TEveEllipsoid
3 
4 #include "TEveShape.h"
5 #include "TEveVector.h"
6 #include "TEveTrans.h"
7 #include "TMatrixDSym.h"
8 
9 
10 //------------------------------------------------------------------------------
11 // TEveEllipsoid
12 //------------------------------------------------------------------------------
13 
14 class TEveEllipsoid : public TEveShape
15 {
16  friend class TEveEllipsoidProjected;
17  friend class TEveEllipsoidGL;
19 
20 private:
21  TEveEllipsoid(const TEveEllipsoid&); // Not implemented
22  TEveEllipsoid& operator=(const TEveEllipsoid&); // Not implemented
23 
24 protected:
25  TEveVector fPos;
26  TEveVector fExtent3D;
27  TEveTrans fEMtx;
28 
29  float fEScale;
30 
31 public:
32  TEveEllipsoid(const Text_t* n="TEveEllipsoid", const Text_t* t="");
33  ~TEveEllipsoid() override {}
34 
35  void ComputeBBox() override;
36  TClass* ProjectedClass(const TEveProjection* p) const override;
37 
38  TEveVector& RefPos() { return fPos ;}
39  TEveVector& RefExtent3D() { return fExtent3D ;} // cached member for bbox and 3D rendering
40  TEveTrans& RefEMtx() { return fEMtx ;}
41 
42  void SetScale(float x) {fEScale = x; }
43 
44  ClassDefOverride(TEveEllipsoid, 0); // Short description.
45 };
46 
47 
48 //------------------------------------------------------------------------------
49 // TEveEllipsoidProjected
50 //------------------------------------------------------------------------------
51 
52 class TEveEllipsoidProjected : public TEveShape,
53  public TEveProjected
54 {
56 private:
57  TEveEllipsoidProjected(const TEveEllipsoidProjected&); // Not implemented
58  TEveEllipsoidProjected& operator=(const TEveEllipsoidProjected&); // Not implemented
59 
60 protected:
61  void SetDepthLocal(Float_t d) override;
62 
63 public:
64  TEveEllipsoidProjected(const char* n="TEveEllipsoidProjected", const char* t="");
65  ~TEveEllipsoidProjected() override;
66 
67  // For TAttBBox:
68  void ComputeBBox() override;
69 
70  // Projected:
71  void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
72  void UpdateProjection() override;
73 
74  TEveElement* GetProjectedAsElement() override { return this; }
75 
76  ClassDefOverride(TEveEllipsoidProjected, 0); // Projection of TEveEllipsoid.
77 };
78 
79 #endif
TEveVector & RefPos()
Definition: TEveEllipsoid.h:38
~TEveEllipsoid() override
Definition: TEveEllipsoid.h:33
TEveEllipsoid & operator=(const TEveEllipsoid &)
friend class TEveEllipsoidProjected
Definition: TEveEllipsoid.h:16
TEveVector fExtent3D
Definition: TEveEllipsoid.h:26
void ComputeBBox() override
void SetScale(float x)
Definition: TEveEllipsoid.h:42
TEveVector fPos
Definition: TEveEllipsoid.h:25
TEveTrans & RefEMtx()
Definition: TEveEllipsoid.h:40
ClassDefOverride(TEveEllipsoid, 0)
TEveVector & RefExtent3D()
Definition: TEveEllipsoid.h:39
TEveElement * GetProjectedAsElement() override
Definition: TEveEllipsoid.h:74
TClass * ProjectedClass(const TEveProjection *p) const override
TEveTrans fEMtx
Definition: TEveEllipsoid.h:27
TEveEllipsoid(const TEveEllipsoid &)