#ifndef OSG_TEXGEN #define OSG_TEXGEN 1 #include #include #include #include namespace osg { class Input; class Output; class SG_EXPORT TexGen : public Object { public : enum TexGenMode { OBJECT_LINEAR = GL_OBJECT_LINEAR, EYE_LINEAR = GL_EYE_LINEAR, SPHERE_MAP = GL_SPHERE_MAP }; TexGen( void ); static TexGen* instance(); virtual Object* clone() const { return new TexGen(); } virtual bool isSameKindAs(Object* obj) { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "TexGen"; } static void enable( void ); static void disable( void ); void apply( void ); void setMode( TexGenMode mode ) { _mode = mode; } protected : virtual ~TexGen( void ); virtual bool readLocalData(Input& fr); virtual bool writeLocalData(Output& fw); bool matchModeStr(const char* str,TexGenMode& mode); const char* getModeStr(TexGenMode mode); TexGenMode _mode; }; }; #endif