#ifndef MATERIAL_H
#define MATERIAL_H

#include "SceneGraph.h"
#include "GraphNode.h"


namespace nsSceneGraph {

// forward declaration
class SceneGraphVisitor;


class Material : public GraphNode
{
	friend class SceneGraphVisitor;
	friend class GlCompileVisitor;
	friend class GlCompileSmoothVisitor;

	private:
		double diffuseColor[4];
		double emissiveColor[4];
		double specularColor[4];
		double ambientColor[4];
		double transparency;
		double shininess;

	public:
		Material(void);
		Material(double diffuseColor[4], double emissiveColor[4],
			double specularColor[4], double ambientColor[4],
			double transparency, double shininess, const char *nodeName);
		~Material(void);

		int action(SceneGraphVisitor *visitor);

		GraphNode *duplicate(void);

		void setDiffuseColor(double r, double g, double b, double opacity = 1.0);
		void setEmissiveColor(double r, double g, double b, double opacity = 1.0);
		void setSpecularColor(double r, double g, double b, double opacity = 1.0);
		void setAmbientColor(double r, double g, double b, double opacity = 1.0);
		void setTransparency(double transparency);
		void setShininess(double shininess);
};


}

#endif

