///////////////////////////////////////////////////////////////////////////////
/// @file deMeshOpt.hpp
///
/// @brief Mesh Optimization
///
/// @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 Feb 2003
/// @author Assassin
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DEMESHOPT_HPP
#define DEMESHOPT_HPP

#include "deGlobalTypes.hpp"
#include "deBrush.hpp"

#define DEMESHOPT_API DEBRUSH_API

class IdeMeshOptimizer;
class IdeVertexBuffer;
class IdeDriver;

/// Gets the IdeMeshOptimizer singleton pointer
DEMESHOPT_API IdeMeshOptimizer* IdeMeshOptimizer_GetMeshOptPtr();

/// class used for optimizing the vertices in a mesh.
/// Related functions: IdeMeshOptimizer_GetMeshOptPtr
//class IdeMeshOptimizer
DE3D_INTERFACE_(IdeMeshOptimizer)
{
protected:
	virtual ~IdeMeshOptimizer() {}
public:
	/// reorders the faces in an index buffer to use a post-transform cache of a given size
	/// @param VBuffer Vertex buffer containing index stream to be optimized
	/// @param VCacheSize Size of the post-transform cache to optimize for
	/// @param CCW Boolean flag for face winding. deTRUE ==> counter-clockwise
	virtual deBoolean OptimizeIndices(IdeVertexBuffer * VBuffer, long VCacheSize, deBoolean CCW) = 0;
	virtual deBoolean ReorderAllData(IdeVertexBuffer * VBuffer, long VCacheSize, deBoolean CCW) = 0;
};


#endif //DEMESHOPT_HPP
