///////////////////////////////////////////////////////////////////////////////
/// @file deActorMesh.cpp
///
/// @brief This header file contains ONLY mesh routines for the Actor class
///
/// @author mittens
///
/// 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 May 2004
/// @author Trent 'mittens' Polack (trent@polycat.net)
/// @remarks Early on in development. Don't fuck with the mistakes OR YOU DIE!
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include "deActor_priv.hpp"

typedef unsigned char byte;
typedef unsigned short word;

bool LoadMeshData( const char *filename ) {

	return true;
}

void Render( ) {
}

/*
long deSceneStaticMesh::TraverseForRender(IdeSceneGraph::deSceneTraversal* Params)
{
	IdeVertexBuffer * MainVB;
	int PolysRendered = 0;
	IdeRender::deRenderObject obj;
	memset(&obj, 0, sizeof(IdeRender::deRenderObject));

	obj.VB = NULL;
	Params->CurrentSceneGraph->LightExtents(m_WorldTransform.Translation, m_AABB, obj.Lights, 4);
	//obj.Lights[0] = s_TestLight2;
	//obj.Lights[1] = s_TestLight;

	int i, len;
	len = mMesh->GetNumSubMeshes();
	MainVB = mMesh->GetMainVertexBuffer();
	for (i = 0; i < len; ++i)
	{
		obj.VB = mMesh->GetSubMeshVertexBuffer(i);
		obj.IndexOverride = mMesh->GetSubMeshIndexBuffer(i);
		if (obj.IndexOverride)
			PolysRendered += obj.IndexOverride->GetTriCount();
		else if (obj.VB)
			PolysRendered += obj.VB->GetTriCount();
		if (!obj.VB)
			obj.VB = MainVB;
		obj.Transform = GetWorldTransform();
		obj.SurfaceDetail.Transparency = IsTransparent();
		obj.pSurface = mMesh->GetSubMeshSurface(i);
		Params->render->RenderPrepBuffer(obj);
	}
	
	return PolysRendered;
}*/


//default deActorMesh constructor
deActorMesh::deActorMesh( )
:	m_pMeshes( NULL ),
	m_pVertices( NULL ),
	m_pTriangles( NULL ),
	m_pMaterials( NULL ),
	m_numMeshes( 0 ),
	m_numMaterials( 0 ),
	m_numTriangles( 0 ),
	m_numVertices( 0 ) 
{
	
}	//deActorMesh( )

deActorMesh::~deActorMesh( ) {
	m_numMeshes= 0;
	m_numMaterials= 0;
	m_numTriangles= 0;
	m_numVertices= 0;
	
	delete[] m_pMeshes;
	delete[] m_pVertices;
	delete[] m_pTriangles;
	delete[] m_pMaterials;
}	//~deActorMesh( )
