Namespaced Rect and Frame to osgfxbrowser::Rect/Frame, as this was causing

a namespace collision with CGL
This commit is contained in:
Don BURNS 2004-10-24 21:05:27 +00:00
parent b70ff91eaf
commit 071891c64c
3 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,8 @@
#include <osgText/Text>
namespace osgfxbrowser {
Frame::Frame()
: osg::Geode(),
bgcolor_(0.5f, 0.5f, 0.5f, 1.0f),
@ -95,3 +97,5 @@ osg::Geometry *Frame::build_quad(const Rect &rect, const osg::Vec4 &color, bool
return geo.take();
}
}

View File

@ -4,6 +4,8 @@
#include <osg/Geode>
#include <osg/Geometry>
namespace osgfxbrowser {
struct Rect {
float x0, y0, x1, y1;
Rect() {}
@ -44,4 +46,6 @@ private:
std::string caption_;
};
}
#endif

View File

@ -48,7 +48,7 @@ public:
RotateCallback *rotate_cb;
class EffectPanel: public Frame {
class EffectPanel: public osgfxbrowser::Frame {
public:
class KeyboardHandler: public osgGA::GUIEventHandler {
@ -151,7 +151,7 @@ public:
}
protected:
void rebuild_client_area(const Rect &client_rect)
void rebuild_client_area(const osgfxbrowser::Rect &client_rect)
{
float zPos = -0.1; // note from Robert, was 0.1f, but now must be -0.1f to keep text visible??#!? due
// to some other change in the OSG not tracked down yet...
@ -252,7 +252,7 @@ EffectPanel *build_gui(osg::Group *root)
osg::ref_ptr<EffectPanel> effect_panel = new EffectPanel;
effect_panel->setCaption("osgFX Effect Browser");
effect_panel->setRect(Rect(20, 20, 1000, 280));
effect_panel->setRect(osgfxbrowser::Rect(20, 20, 1000, 280));
hud->addChild(effect_panel.get());