//
// Asura_PSP_BotanicalRenderer_Internal.h
//
// Created by JG - Thursday, October 07, 2006
//
// Copyright (C) 2004 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_BOTANICALS

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_PSP_BOTANICALRENDERER_INTERNAL_H__
#define __ASURA_PSP_BOTANICALRENDERER_INTERNAL_H__

// Asura headers
#include "Core/Memory/Asura_ResourceAllocator.h"

// Platformm specific headers
#include "Rendering/Asura_PSP_GU.h"
#include "Botanicals/Asura_PSP_Botanicals_Shared.h"
#include "Core/Asura_Maths.h"

// Vertex buffer descriptors

// Mesh vertex buffer format / primitive type
const unsigned int uBOTANICAL_STRIP_VERTEX_FORMAT		=	SCEGU_COLOR_NONE	|
															SCEGU_TEXTURE_FLOAT	|
															SCEGU_NORMAL_FLOAT	|
															SCEGU_VERTEX_FLOAT	|
															SCEGU_INDEX_USHORT;

const unsigned int uBOTANICAL_STRIP_PRIM_TYPE			=	SCEGU_PRIM_TRIANGLE_STRIP; 

// Billboard vertex buffer format / primitive type
const unsigned int uBOTANICAL_BILLBOARD_VERTEX_FORMAT	=	SCEGU_COLOR_NONE	|
															SCEGU_TEXTURE_FLOAT	|
															SCEGU_NORMAL_FLOAT	|
															SCEGU_VERTEX_FLOAT;

const unsigned int uBOTANICAL_BILLBOARD_PRIM_TYPE		=	SCEGU_PRIM_TRIANGLE_STRIP; 


// A single mesh vertex 
class Asura_PSP_BotanicalStrip_Vertex
{
	public:
		
		// order of member determined by PSP GPU

		float			m_fU;
		float			m_fV;

		float			m_afNormal[3];
		float			m_afPosition[3];
};

// A single billboard vertex
class Asura_PSP_BotanicalBillboard_Vertex
{
	public:
		
		// order of member determined by PSP GPU

		float			m_fU;
		float			m_fV;

		Asura_Vector_3	m_xNormal;
		Asura_Vector_3	m_xPosition;
};

// Data used to create a single corner for a billboard
class Asura_PSP_BotanicalBillboard_Data
{
	public:	
		float			m_fU;
		float			m_fV;

		float			m_fWidthOffset;
		float			m_fHeightOffset; 

};

class Asura_PSP_BotanicalsImposter_Data
{
public:
	Asura_Vector_3		m_xPosition;
	Asura_Vector_3		m_xNormal;
	float				m_fWidth;
	float				m_fHeight;
	float				m_fU[2];
	float				m_fV[2];
	float				m_fAngleRange;
	float				m_fFadeRange;
};
#endif//__ASURA_PSP_BOTANICALRENDERER_INTERNAL_H__

#endif//#ifdef ASURA_USE_BOTANICALS