///////////////////////////////////////////////////////////////////////////////
/// @file LargeStaticBrush.cpp
///
/// @brief Interaction with large static brushes
///
/// @author Assassin 
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Mar 2003
/// @author Assassin
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////
#include "deBrush_priv.hpp"
#include "deDriver.hpp"

WorldObjectClassImp(deLargeStaticBrush);

static const deBrush::DataQuantity_t s_LargeStaticQuantities = 
{
	deBrush::DataQuantity_t::Quantity_Unmanaged, 
		0,	//CVNum
		0,	//NumFaces
		0	//CoordsPerFace
};

deLargeStaticBrush::deLargeStaticBrush()
: deBrush(Brush_LargeStatic, s_LargeStaticQuantities)
{
	m_SaveVBuffers = deTRUE;
}

deLargeStaticBrush::~deLargeStaticBrush()
{
}

deBoolean deLargeStaticBrush::SetNumTextures(long NumTextures)
{
	m_TextureList.ResizeQuick(NumTextures, deTRUE);
	m_SubVBs.ResizeQuick(NumTextures, deTRUE);
	return deTRUE;
}

void deLargeStaticBrush::SetWorldTransform(deTransformInfo & Matrix)
{
	m_WorldTransform = Matrix;
}

deBoolean deLargeStaticBrush::SetVertexBuffer(long TextureNum, IdeVertexBuffer* VBuffer)
{
	if (!VBuffer)
		DEBUGRETURN(deFALSE, "SetVertexBuffer: Parameter 'VBuffer' was NULL");
	m_SubVBs[TextureNum] = VBuffer;
	VBuffer->Claim();
	return deTRUE;
}

void deLargeStaticBrush::UpdateBrush()
{
}

deBrush * deLargeStaticBrush::CopyBrush()
{
	// too detailed to copy
	return NULL;
}

deBoolean deLargeStaticBrush::Serialize(IdeFile* FS)
{
	if (!deBrush::Serialize(FS))
		return deFALSE;
	return deTRUE;
}

deBoolean deLargeStaticBrush::DeSerialize(IdeFile* FS, long DataLength)
{
	if (!deBrush::DeSerialize(FS, DataLength))
		return deFALSE;
	return deTRUE;
}

