/*
/ NODE.H
/ ******
/ Core scene node interface class.
/
/ Will Beddow 2010 - http://343gs.com/brainstem
/
/ This software is currently under development
/ and is subject to change and improvement. Some
/ aspects of the system are incomplete and/or 
/ unstable due to ongoing implementation.
/
*/

#ifndef __NODE_H__
#define __NODE_H__

#include "Compile.h"
#include "Types.h"
#include "Camera.h"
#include "Display.h"
#include "Bounds.h"
#include "Matrix.h"

namespace Brainstem 
{
	class ISceneNode : public IObject
	{
	public:
		virtual bool Init() = 0;
		virtual void Update() = 0;
		virtual void Render(ICamera* camera) = 0;
		virtual void Release() = 0;

		Vector3<float> Position;
		Vector3<float> Rotation;
		Vector3<float> Scale;

		Matrix4<float> World;

		Vector2<float> TextureScaling;

		virtual BoundingVolume GetBounds() = 0;

		virtual void ApplyTexture(ITexture* texture) = 0;
		virtual ITexture* GetTexture() = 0;

		virtual void SetTechnique(const char* technique) = 0;
		virtual const char* GetTechnique() = 0;

		bool AllowRender;
		bool AllowUpdate;
		bool AllowFrustumCulling;

		ENUM_CULLMODE CullMode;
		ENUM_RENDERMODE RenderMode;

		void SetDefaultProperties()
		{
			AllowRender = true;
			AllowUpdate = true;
			CullMode = CULL_CCW;
			AllowFrustumCulling = true;
			RenderMode = RENDER_SOLID;
			TextureScaling = Vector2<float>(1.0f, 1.0f);
		}

		AUTO_OBJECT_SIZE;
		virtual const char* GetName() { return "Scene Node"; }
	};
}

#endif