#ifndef VISUAL_H
#define VISUAL_H

#include "Geometry.h"

namespace Salamander
{

/*
** A Visual is a subclass of Geometry, containing the additional non-vertex properties required for an object.
** Visuals are independent of the Salamander scenegraph, and must be attached to a node to be drawn. This is done automatically
** by sprites.
*/
class Visual : public Geometry
{
public:
	/*
	** Constructor
	*/
	Visual();

	/*
	** Destructor.
	*/
	virtual ~Visual();

	/*
	** Get/Set the world transform of this visual.
	*/
	void setTransform(const Mat2& transform);
	const Mat2& getTransform() const;
	
	/*
	** Get/Set the colour of this visual.
	*/
	void setColour(const Colour& colour);
	const Colour& getColour() const;

	/*
	** Get/Set the blend mode of this visual.
	*/
	void setBlendMode(const BlendMode& blendMode);
	const BlendMode& getBlendMode() const;

	/*
	** Get/Set the texture for this visual.
	*/
	void setTexture(Texture* texture);
	const Texture* getTexture() const;

private:
	/*
	** The translation and rotation of the geometry mesh in world space.
	*/
	Mat2 transform_;

	/*
	** This colour is applied to the entire geometry. If the geometry has a vertex colour stream,
	** then it will take preference and override this property.
	*/
	Colour colour_;

	/*
	** Blend mode describes how the visual will be mixed with the target surface. All modes may
	** not be available on all platforms.
	*/
	BlendMode blendMode_;

	/*
	** Unless set to NULL, we use this texture when rending. It is used as channel 0, with the set of
	** specified UV coordinates.
	*/
	Texture* texture_;

};

}

#endif // VISUAL_H