00001 #ifndef VRS_SG_OVERLAYIMAGEGL_H
00002 #define VRS_SG_OVERLAYIMAGEGL_H
00003
00004 #include <vrs/config.h>
00005 #include <vrs/text/deprecated/text.h>
00006 #include <vrs/sg/scenething.h>
00007
00008 namespace VRS
00009 {
00010
00011 class ColorLinearEffect;
00012 class ColorAttribute;
00013 class Image;
00014 class PolygonSet;
00015 class SceneThing;
00016 class Text;
00017
00019
00025 class VRS_CORE_API OverlayImageGL : public SceneThing {
00026 public:
00027 OverlayImageGL();
00028 OverlayImageGL(SO<SceneThing> parentThing);
00029 virtual ~OverlayImageGL();
00037 int addImage(SO<Image> overlayImage, const Vector& minPosition, const Vector& maxPosition, bool showHide= true);
00038
00039 #if 0
00040
00041
00051 int addText(
00052 SO<Font> font,
00053 const std::string& text,
00054 const Vector& minPosition = Vector(0,0,0),
00055 const Vector& maxPosition= Vector(0,0,0),
00056 Text::AlignmentH alignmentH=Text::LEFT,
00057 Text::AlignmentV alignmentV=Text::BOTTOM,
00058 const Color& textColor = Color(0,0,0,1));
00059 #endif
00060 bool removeOverlayItem(int i);
00061 int getSize() const;
00062 SO<Image> getImageAt(int i) const;
00063
00064 #if 0
00065
00066 SO<Text> getTextAt(int i) const;
00067 #endif
00068
00069 Vector getMinPosition(int i) const;
00070 Vector getMaxPosition(int i) const;
00071
00075 SO<ColorAttribute> getColorAttribute(int i) const;
00077 bool hideOverlayItem(int i);
00079 bool showOverlayItem(int i);
00080
00081 VRS_TYPEINFO(OverlayImageGL, SceneThing);
00082 VRS_SERIALIZABLE(OverlayImageGL);
00083 private:
00084
00085 SO<Dictionary<int,SO<SceneThing> > > overlayItems_;
00086 SO<Dictionary<int,Vector> > minPositions_;
00087 SO<Dictionary<int,Vector> > maxPositions_;
00088 SO<Dictionary<int,SO<ColorAttribute> > > colorAttrs_;
00089 int addItem(SO<SceneThing> overlayItem, const Vector& minPosition, const Vector& maxPosition, SO<ColorAttribute> color);
00090 SO<SharedObj> getItem(int i,const ID& itemType) const;
00091 void init();
00092 int nextId;
00093
00094 };
00095 }
00096
00097 #endif