Core Scene Graph Data Structures in C++
Appearance
If not NULL, the appearance field of a Shape node is only allowed to contain a pointer to an Appearance node. In the VRML’97 Standard the Appearance node has three fields: material, texture, and textureTransform. In the DGP2026 implementation the Appearance node only has two fields: material and texture. Both fields have NULL as their default values.
This is how the Appearance node is defined in the VRML'97 Standard.
Appearance {
SFNode material NULL
SFNode texture NULL
// SFNode textureTransform NULL
}
This is the public interface to the Appearance class as defined in the DGP2026 implementation.
class Appearance : public Node {
public:
Appearance();
virtual ~Appearance();
Node* getMaterial();
Node* getTexture();
void setMaterial(Node* material);
void setTexture(Node* texture);
virtual bool isAppearance() const;
virtual string getType() const;
};