Improvements to the Text .osg support.

This commit is contained in:
Robert Osfield
2003-03-10 16:40:26 +00:00
parent bc35d8d33b
commit 06fb808ad3
10 changed files with 279 additions and 40 deletions

View File

@@ -135,7 +135,7 @@ class SG_EXPORT ShapeDrawable : public Drawable
*/
virtual void drawImplementation(State& state) const;
/** return false, osg::ProceduralGeoemtry does not support accept(AttributeFunctor&).*/
/** return false, osg::ShapeDrawable does not support accept(AttributeFunctor&).*/
virtual bool supports(AttributeFunctor&) const { return false; }
/** return true, osg::ShapeDrawable does support accept(ConstAttributeFunctor&).*/

View File

@@ -51,7 +51,7 @@ class OSGDB_EXPORT Input : public FieldReaderIterator
private:
typedef std::map<std::string,osg::Object*> UniqueIDToObjectMapping;
typedef std::map< std::string, osg::ref_ptr<osg::Object> > UniqueIDToObjectMapping;
UniqueIDToObjectMapping _uniqueIDToObjectMap;
};

View File

@@ -183,6 +183,22 @@ public:
/** Draw the text.*/
virtual void drawImplementation(osg::State& state) const;
/** return false, osgText::Text does not support accept(AttributeFunctor&).*/
virtual bool supports(osg::Drawable::AttributeFunctor&) const { return false; }
/** return true, osgText::Text does support accept(ConstAttributeFunctor&).*/
virtual bool supports(osg::Drawable::ConstAttributeFunctor&) const { return true; }
/** accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.*/
virtual void accept(osg::Drawable::ConstAttributeFunctor& af) const;
/** return true, osgText::Text does support accept(PrimitiveFunctor&) .*/
virtual bool supports(osg::Drawable::PrimitiveFunctor&) const { return true; }
/** accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.*/
virtual void accept(osg::Drawable::PrimitiveFunctor& pf) const;
// make Font a friend to allow it set the _font to 0 if the font is
// forcefully unloaded.
friend class Font;