00001 00002 // GL_Appearance.h // 00004 00005 #ifndef GLAPPEARANCE_H 00006 #define GLAPPEARANCE_H 00007 00008 #include "GL_X3DAppearanceNode.h" 00009 00010 namespace X3DTK { 00011 namespace GL { 00012 00013 class X3DMaterialNode; 00014 class X3DTextureNode; 00015 class X3DTextureTransformNode; 00016 class LineProperties; 00017 class FillProperties; 00018 00021 00022 class Appearance : public X3DAppearanceNode 00023 { 00024 public: 00026 Appearance(); 00028 virtual SFNode clone() const; 00030 virtual ~Appearance(); 00031 00033 void setMaterial(const X3DMaterialNode *material); 00035 void setTexture(const X3DTextureNode *texture); 00037 void setTextureTransform(const X3DTextureTransformNode *textureTransform); 00039 void setLineProperties(const LineProperties *lineProperties); 00041 void setFillProperties(const FillProperties *fillProperties); 00042 00044 inline SFNode getMaterial() {return _material;}; 00046 inline SFNode getTexture() {return _texture;}; 00048 inline SFNode getTextureTransform() {return _textureTransform;}; 00050 inline SFNode getLineProperties() {return _lineProperties;}; 00052 inline SFNode getFillProperties() {return _fillProperties;}; 00053 00056 virtual bool addChild(const SFAbstractNode &N); 00059 virtual bool setChild(const SFAbstractNode &N); 00061 virtual bool removeChild(const SFAbstractNode &N); 00062 00063 protected: 00065 Appearance(const Appearance &A); 00066 00067 private: 00069 SFNode _material; 00071 SFNode _texture; 00073 SFNode _textureTransform; 00075 SFNode _lineProperties; 00077 SFNode _fillProperties; 00078 }; 00079 00080 } 00081 } 00082 00083 #endif