00001 00002 // X3D_Appearance.h // 00004 00005 #ifndef APPEARANCE_H 00006 #define APPEARANCE_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3D_X3DAppearanceNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00014 class X3DMaterialNode; 00015 class X3DTextureNode; 00016 class X3DTextureTransformNode; 00017 class LineProperties; 00018 class FillProperties; 00019 00024 00025 class Appearance : public X3DAppearanceNode 00026 { 00027 public: 00029 Appearance(); 00031 Appearance(X3DMaterialNode *material, 00032 X3DTextureNode *texture, 00033 X3DTextureTransformNode *textureTransform, 00034 LineProperties *lineProperties, 00035 FillProperties *fillProperties); 00037 virtual SFAbstractNode clone() const; 00039 virtual ~Appearance(); 00040 00042 void setMaterial(X3DMaterialNode *material); 00044 void setTexture(X3DTextureNode *texture); 00046 void setTextureTransform(X3DTextureTransformNode *textureTransform); 00048 void setLineProperties(LineProperties *lineProperties); 00050 void setFillProperties(FillProperties *fillProperties); 00051 00053 inline SFNode getMaterial() const {return _material;}; 00055 inline SFNode getTexture() const {return _texture;}; 00057 inline SFNode getTextureTransform() const {return _textureTransform;}; 00059 inline SFNode getLineProperties() const {return _lineProperties;}; 00061 inline SFNode getFillProperties() const {return _fillProperties;}; 00062 00064 virtual MFAbstractNode getChildrenList() const; 00065 00068 virtual bool addChild(const SFAbstractNode &N); 00071 virtual bool setChild(const SFAbstractNode &N); 00073 virtual bool removeChild(const SFAbstractNode &N); 00074 00075 protected: 00077 Appearance(const Appearance &A); 00078 00079 private: 00081 SFNode _material; 00083 SFNode _texture; 00085 SFNode _textureTransform; 00087 SFNode _lineProperties; 00089 SFNode _fillProperties; 00090 }; 00091 00092 } 00093 } 00094 00095 #endif