00001 /********************************************************************** 00002 * creases_texture.H: 00003 **********************************************************************/ 00004 #ifndef CREASES_TEXTURE_H_IS_INCLUDED 00005 #define CREASES_TEXTURE_H_IS_INCLUDED 00006 00007 #include "basic_texture.H" 00008 00009 /********************************************************************** 00010 * CreasesTexture: 00011 **********************************************************************/ 00012 class CreasesTexture : public BasicTexture { 00013 public: 00014 //******** MANAGERS ******** 00015 CreasesTexture(Patch* patch = 0) : 00016 BasicTexture(patch), 00017 _width(1), 00018 _color(0,0,0) // XXX g++ 2.97 workaround 00019 {} 00020 00021 //******** RUN-TIME TYPE ID ******** 00022 DEFINE_RTTI_METHODS2("Creases", BasicTexture, CDATA_ITEM *); 00023 00024 //******** ACCESSORS ******** 00025 GLfloat width() const { return _width; } 00026 CCOLOR& color() const { return _color; } 00027 void set_width(GLfloat w) { _width = w; } 00028 int set_color(CCOLOR& c) { _color = c; return 1; } 00029 00030 //******** GTexture METHODS ******** 00031 virtual int draw(CVIEWptr& v); 00032 00033 //******** DATA_ITEM METHODS ******** 00034 virtual DATA_ITEM *dup() const { return new CreasesTexture; } 00035 00036 protected: 00037 GLfloat _width; 00038 COLOR _color; 00039 }; 00040 00041 #endif // CREASES_TEXTURE_H_IS_INCLUDED 00042 00043 /* end of file creases_texture.H */ 00044