00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 #ifndef ROOT_TEveBox
00013 #define ROOT_TEveBox
00014 
00015 #include "TEveShape.h"
00016 
00017 
00018 
00019 
00020 
00021 class TEveBox : public TEveShape
00022 {
00023    friend class TEveBoxGL;
00024 
00025 private:
00026    TEveBox(const TEveBox&);            
00027    TEveBox& operator=(const TEveBox&); 
00028 
00029 protected:
00030    Float_t fVertices[8][3];
00031 
00032 public:
00033    TEveBox(const char* n="TEveBox", const char* t="");
00034    virtual ~TEveBox();
00035 
00036    void SetVertex(Int_t i, Float_t x, Float_t y, Float_t z);
00037    void SetVertex(Int_t i, const Float_t* v);
00038    void SetVertices(const Float_t* vs);
00039 
00040    const Float_t* GetVertex(Int_t i) const { return fVertices[i]; }
00041 
00042    
00043    virtual void ComputeBBox();
00044 
00045    
00046    virtual TClass* ProjectedClass(const TEveProjection* p) const;
00047 
00048    ClassDef(TEveBox, 0); 
00049 };
00050 
00051 
00052 
00053 
00054 
00055 
00056 class TEveBoxProjected : public TEveShape,
00057                          public TEveProjected
00058 {
00059    friend class TEveBoxProjectedGL;
00060 
00061 private:
00062    TEveBoxProjected(const TEveBoxProjected&);            
00063    TEveBoxProjected& operator=(const TEveBoxProjected&); 
00064 
00065 protected:
00066    vVector2_t   fPoints;
00067    Int_t        fBreakIdx;
00068    vVector2_t   fDebugPoints;
00069 
00070    virtual void SetDepthLocal(Float_t d);
00071 
00072    static Bool_t fgDebugCornerPoints;
00073 
00074 public:
00075    TEveBoxProjected(const char* n="TEveBoxProjected", const char* t="");
00076    virtual ~TEveBoxProjected();
00077 
00078    
00079    virtual void ComputeBBox();
00080 
00081    
00082    virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
00083    virtual void UpdateProjection();
00084 
00085    virtual TEveElement* GetProjectedAsElement() { return this; }
00086 
00087    static Bool_t GetDebugCornerPoints();
00088    static void   SetDebugCornerPoints(Bool_t d);
00089 
00090    ClassDef(TEveBoxProjected, 0); 
00091 };
00092 
00093 #endif