CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Fireworks/Vertices/interface/TEveEllipsoid.h

Go to the documentation of this file.
00001 #ifndef ROOT_TEveEllipsoid
00002 #define ROOT_TEveEllipsoid
00003 
00004 #include "TEveShape.h"
00005 #include "TEveVector.h"
00006 #include "TEveTrans.h"
00007 #include "TMatrixDSym.h"
00008 
00009 
00010 //------------------------------------------------------------------------------
00011 // TEveEllipsoid
00012 //------------------------------------------------------------------------------
00013 
00014 class TEveEllipsoid : public TEveShape
00015 {
00016    friend class TEveEllipsoidProjected;
00017    friend class TEveEllipsoidGL;
00018    friend class TEveEllipsoidProjectedGL;
00019 
00020 private:
00021    TEveEllipsoid(const TEveEllipsoid&);            // Not implemented
00022    TEveEllipsoid& operator=(const TEveEllipsoid&); // Not implemented
00023 
00024 protected:
00025    TEveVector fPos;
00026    TEveVector fExtent3D;
00027    TEveTrans  fEMtx;
00028 
00029    float fEScale;
00030 
00031 public:
00032    TEveEllipsoid(const Text_t* n="TEveEllipsoid", const Text_t* t="");
00033    virtual ~TEveEllipsoid() {}
00034 
00035    virtual void    ComputeBBox();
00036    virtual TClass* ProjectedClass(const TEveProjection* p) const;
00037 
00038    TEveVector& RefPos() { return fPos ;}
00039    TEveVector& RefExtent3D() { return fExtent3D ;} // cached member for bbox and 3D rendering
00040    TEveTrans&  RefEMtx()  { return fEMtx ;}
00041 
00042    void SetScale(float x) {fEScale = x; }
00043 
00044    ClassDef(TEveEllipsoid, 0); // Short description.
00045 };
00046 
00047 
00048 //------------------------------------------------------------------------------
00049 // TEveEllipsoidProjected
00050 //------------------------------------------------------------------------------
00051 
00052 class TEveEllipsoidProjected : public TEveShape,
00053                                public TEveProjected
00054 {
00055    friend class TEveEllipsoidProjectedGL;
00056 private:
00057    TEveEllipsoidProjected(const TEveEllipsoidProjected&);            // Not implemented
00058    TEveEllipsoidProjected& operator=(const TEveEllipsoidProjected&); // Not implemented
00059    
00060 protected:
00061    virtual void SetDepthLocal(Float_t d);
00062 
00063 public:
00064    TEveEllipsoidProjected(const char* n="TEveEllipsoidProjected", const char* t="");
00065    virtual ~TEveEllipsoidProjected();
00066 
00067    // For TAttBBox:
00068    virtual void ComputeBBox();
00069    
00070    // Projected:
00071    virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
00072    virtual void UpdateProjection();
00073 
00074    virtual TEveElement* GetProjectedAsElement() { return this; }
00075 
00076    ClassDef(TEveEllipsoidProjected, 0); // Projection of TEveEllipsoid.
00077 };
00078 
00079 #endif