00001 #ifndef Fireworks_Core_FWTextProjected_h 00002 #define Fireworks_Core_FWTextProjected_h 00003 // -*- C++ -*- 00004 // 00005 // Package: Core 00006 // Class : FWTextProjected 00007 // 00016 // 00017 // Original Author: Alja Mrak-Tadel 00018 // Created: Fri Aug 12 01:12:28 CEST 2011 00019 // $Id: FWTextProjected.h,v 1.2 2011/08/16 21:43:27 amraktad Exp $ 00020 // 00021 00022 #include "TNamed.h" 00023 #include "TAtt3D.h" 00024 #include "TAttBBox.h" 00025 00026 #include "TEveProjectionBases.h" 00027 #include "TEveText.h" 00028 #include "TEveTextGL.h" 00029 00030 00031 class FWEveText : public TEveText, 00032 public TEveProjectable 00033 { 00034 private: 00035 FWEveText(const FWEveText&); // stop default 00036 const FWEveText& operator=(const FWEveText&); // stop default 00037 00038 public: 00039 float m_offsetZ; 00040 float m_textPad; 00041 FWEveText(const char* txt=""):TEveText(txt), m_offsetZ(0), m_textPad(5) {} 00042 virtual ~FWEveText() {} 00043 00044 virtual TClass* ProjectedClass(const TEveProjection* p) const ; 00045 ClassDef(FWEveText, 0); // Class for visualisation of text with FTGL font. 00046 }; 00047 00048 //============================================================================== 00049 //============================================================================== 00050 00051 00052 class FWEveTextProjected : public FWEveText, 00053 public TEveProjected 00054 { 00055 private: 00056 FWEveTextProjected(const FWEveTextProjected&); // Not implemented 00057 FWEveTextProjected& operator=(const FWEveTextProjected&); // Not implemented 00058 00059 public: 00060 FWEveTextProjected() {} 00061 virtual ~FWEveTextProjected() {} 00062 00063 virtual void UpdateProjection(); 00064 virtual TEveElement* GetProjectedAsElement() { return this; } 00065 00066 ClassDef(FWEveTextProjected, 0); // Projected replica of a FWEveText. 00067 }; 00068 00069 //______________________________________________________________________________ 00070 00071 class FWEveTextGL : public TEveTextGL 00072 { 00073 public: 00074 FWEveTextGL(){} 00075 virtual ~FWEveTextGL() {} 00076 00077 virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; 00078 00079 ClassDef(FWEveTextGL, 0); // GL renderer class for TEveText. 00080 }; 00081 00082 00083 #endif