
///////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_Platform_Botanical_Game_Render_Instance.h
// Author : Andy Tate
// Date   : 9-Feb-2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifdef ASURA_USE_BOTANICALS
#ifndef __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__
#define __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////
#include "Light/Asura_Lighting_Solution.h"
#include "Botanicals/Asura_PSP_Botanicals_Shared.h"

////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Class        : Asura_Platform_BGR_Instance
// Author       : Catalin Arsenescu
// Date         : 12-March-2007
//
// Description  : Class to hold rendering data for a botanical instance.
////////////////////////////////////////////////////////////////////////////////

class Asura_Platform_BGR_Instance
{
public:
//Constructor & Destructor
	Asura_Platform_BGR_Instance  (void)
		: pxLightingSolution(NULL)
		, pxTemplate(NULL)
	{
	}

	~Asura_Platform_BGR_Instance ()
	{
		delete pxLightingSolution;
	}

// Public members...
	u_int								uStart;				// Begin world matrix upload command
	u_int								auOri[9];			// Local to World rotation 
	u_int								auPos[3];			// Local to World translation
	u_int								uReturn;			// Return to main displlay list command
	float								afSHRed[4];			// Spherical harmonic components
	float								afSHGreen[4];
	float								afSHBlue[4];
	float								fScale;				// Billboard scale
	float								afCull[3];			// Same as the instance position, but not codified / full precission values
	int									iModule;			// Module this instance belongs too. 
	float								fOrientation[9];	// Local World rotation

	ASURA_PSP_BOTANICALS_TEMPLATE_TYPE	eType;				// Descriptor to interpret the next pointer
	const void*							pxTemplate;			// Pointer to the botanical instance
	Asura_Lighting_Solution*			pxLightingSolution;	// Object used for static / dynamic lighting of this instance

private:
	// Private functions...
	Asura_Platform_BGR_Instance (const Asura_Platform_BGR_Instance& xOther);
	Asura_Platform_BGR_Instance&	operator=	(const Asura_Platform_BGR_Instance& xOther);
};   // End of class 'Asura_Platform_BGR_Instance'.

#endif	// #ifndef __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__
#endif	// #ifdef ASURA_USE_BOTANICALS

/// End of file. ///
