/*
-- ----------------------------------------------------------------------------
--
--          Copyright 1995 Division Limited.
--                All Rights Reserved
--
--
--  System       :
--  Module       :
--  Object Name  : $RCSfile: __ptool.h,v $
--  Revision     : $Revision: 1.11 $
--  Date         : $Date: 95/05/16 13:46:18 $
--  Author       : $Author: bill $
--
--  Description
--
--  Notes
--
--  History
--
--
-- ----------------------------------------------------------------------------
*/
/* __ptools2.h */
#ifndef ____PTOOL_H__
#define ____PTOOL_H__

#ifdef _PF_LOCAL
#include "ptool.h"
#else
#include <dsys/ptool.h>
#endif

/* ver   change */
/* 2.01  Initial version for tools library */
/* 2.02  New line definitions and coping with texture etc */
/* 2.03  New material stuff */
/* 2.04  New STRIP_LIST and POINTLIST */
#define dpt_LIBRARY_MAJOR_VER 2 
#define dpt_LIBRARY_MINOR_VER 04

#define dpt_TINY_float32 1.0e-24



/*************************************************************
*   ptmesh Routines used by other dptOols                    *
*************************************************************/

dpfVERTEXPTR
dptCreateVertex(void) ;
dpfVERTEXPTR
dptMeshAddVertex ( dptMESHPTR mesh, dpfVERTEXPTR Fvert ) ;
dpfVERTEXPTR
dptMeshAddNewVertex(dptMESHPTR mesh, dpfPATCHPTR patch, dmVector point,
                    dmVector norm, dpfRGBA col, dpfTEXT text) ;
dptTRIANGLEPTR
dptMeshAddTriangle(dptMESHPTR mesh, dpfPATCHPTR patch, dpfVERTEXPTR vert1, 
                   dpfVERTEXPTR vert2, dpfVERTEXPTR vert3) ;
void
dptMeshRemoveTriangle(dptMESHPTR mesh, dptTRIANGLEPTR trian) ;
void
dptMeshUnloadGeometry(dptTRIANGLEPTR start, dptMESHPTR mesh, dpfPATCHPTR patch,
                     int32 usePmesh) ;
void
dptMeshDisconnectTriangle(dptMESHPTR mesh, dptTRIANGLEPTR trian) ;
void
dptMeshConnectTriangle(dptMESHPTR mesh, dptTRIANGLEPTR trian) ;
void
dptAddGeometryPatch(dptMESHPTR mesh, dpfGEOMETRYPTR geom) ;


/* reduce a mesh, used in ptbound */
int32
dptrReduceMesh(dptMESHPTR mesh, float32 Norm_tol, float32 Edge_tol,
               int32 Verbose) ;

/* defined in ptreduce, used also in ptflip */
dptTRIANGLEPTR
dptGetTriangleDuplicate(dptTRIANGLEPTR tri) ;

#endif /* ____PTOOL_H__ */


