Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:54

0001 #ifndef ROOT_TEveEllipsoid
0002 #define ROOT_TEveEllipsoid
0003 
0004 #include "TEveShape.h"
0005 #include "TEveVector.h"
0006 #include "TEveTrans.h"
0007 #include "TMatrixDSym.h"
0008 
0009 //------------------------------------------------------------------------------
0010 // TEveEllipsoid
0011 //------------------------------------------------------------------------------
0012 
0013 class TEveEllipsoid : public TEveShape {
0014   friend class TEveEllipsoidProjected;
0015   friend class TEveEllipsoidGL;
0016   friend class TEveEllipsoidProjectedGL;
0017 
0018 private:
0019   TEveEllipsoid(const TEveEllipsoid&);             // Not implemented
0020   TEveEllipsoid& operator=(const TEveEllipsoid&);  // Not implemented
0021 
0022 protected:
0023   TEveVector fPos;
0024   TEveVector fExtent3D;
0025   TEveTrans fEMtx;
0026 
0027   float fEScale;
0028 
0029 public:
0030   TEveEllipsoid(const Text_t* n = "TEveEllipsoid", const Text_t* t = "");
0031   ~TEveEllipsoid() override {}
0032 
0033   void ComputeBBox() override;
0034   TClass* ProjectedClass(const TEveProjection* p) const override;
0035 
0036   TEveVector& RefPos() { return fPos; }
0037   TEveVector& RefExtent3D() { return fExtent3D; }  // cached member for bbox and 3D rendering
0038   TEveTrans& RefEMtx() { return fEMtx; }
0039 
0040   void SetScale(float x) { fEScale = x; }
0041 
0042   ClassDefOverride(TEveEllipsoid, 0);  // Short description.
0043 };
0044 
0045 //------------------------------------------------------------------------------
0046 // TEveEllipsoidProjected
0047 //------------------------------------------------------------------------------
0048 
0049 class TEveEllipsoidProjected : public TEveShape, public TEveProjected {
0050   friend class TEveEllipsoidProjectedGL;
0051 
0052 private:
0053   TEveEllipsoidProjected(const TEveEllipsoidProjected&);             // Not implemented
0054   TEveEllipsoidProjected& operator=(const TEveEllipsoidProjected&);  // Not implemented
0055 
0056 protected:
0057   void SetDepthLocal(Float_t d) override;
0058 
0059 public:
0060   TEveEllipsoidProjected(const char* n = "TEveEllipsoidProjected", const char* t = "");
0061   ~TEveEllipsoidProjected() override;
0062 
0063   // For TAttBBox:
0064   void ComputeBBox() override;
0065 
0066   // Projected:
0067   void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
0068   void UpdateProjection() override;
0069 
0070   TEveElement* GetProjectedAsElement() override { return this; }
0071 
0072   ClassDefOverride(TEveEllipsoidProjected, 0);  // Projection of TEveEllipsoid.
0073 };
0074 
0075 #endif