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