/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2003 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg M.
 *--------------------------------------------------------------------------
 * @purpose:  ZModeler 2.x mesh tools helpers
 *--------------------------------------------------------------------------
 * @histroy: 14.07.2004. Created
 */
#ifndef meshtoolshelper_h_included
#define meshtoolshelper_h_included

#include <zmodeler.h>
#include <scene/IMeshNode.h>

namespace core
{
  namespace tools
  {
    DLL_LINKAGE ZRESULT ZAPICALL calculateNormals(scene::IMeshNode* pMNode, bool bAllVerts=true);
    DLL_LINKAGE ZRESULT ZAPICALL cleanupNode(scene::IMeshNode* pMNode);
    //-------------------------------------------------------
    // @name : ZAPICALL removeUVMappingNode
    // Removes UVMapping node for supplied target node (or to all nodes if
    // NULL supplied) which controls supplied material and chanel (-1 matches
    // all).
    // @param cene::IMeshNode* pTarget = NULL : 
    // @param long nMaterial=-1              : 
    // @param long nChanel=-1                : 
    //
    // @return DLL_LINKAGE ZRESULT : 
    //-------------------------------------------------------
    DLL_LINKAGE ZRESULT ZAPICALL removeUVMappingNode(
                                      scene::IMeshNode* pTarget = NULL,
                                      long nMaterial=-1,
                                      long nChanel=-1);
    DLL_LINKAGE ZRESULT ZAPICALL getNodeMeshData(
                                      scene::INode* pNode, 
                                      ZVertexBuf** ppV, 
                                      ZPolyBuf** ppP);
  };//tools
};//core


#endif //meshtoolshelper_h_included
