// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepMesh_IncrementalMesh_HeaderFile
#define _BRepMesh_IncrementalMesh_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
#endif
#ifndef _Handle_BRepMesh_FastDiscret_HeaderFile
#include <Handle_BRepMesh_FastDiscret.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeReal_HeaderFile
#include <TopTools_DataMapOfShapeReal.hxx>
#endif
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Bnd_Box_HeaderFile
#include <Bnd_Box.hxx>
#endif
#ifndef _BRepMesh_DiscretRoot_HeaderFile
#include <BRepMesh_DiscretRoot.hxx>
#endif
class BRepMesh_FastDiscret;
class TopoDS_Shape;
class TopoDS_Edge;
class TopoDS_Face;


//! Builds the mesh of a shape with respect of their <br>
//!          correctly triangulated parts <br>
//! <br>
class BRepMesh_IncrementalMesh  : public BRepMesh_DiscretRoot {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
  Standard_EXPORT   BRepMesh_IncrementalMesh();
Standard_EXPORT virtual ~BRepMesh_IncrementalMesh();
  //! if the  boolean    <Relatif>   is  True,    the <br>
//!          deflection used   for the polygonalisation   of <br>
//!          each edge will be <D> * Size of Edge. <br>
//!          the deflection used for the faces will be the maximum <br>
//!          deflection of their edges. <br>
  Standard_EXPORT   BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,const Standard_Boolean Relatif = Standard_False,const Standard_Real Ang = 0.5);
  
  Standard_EXPORT     void SetRelative(const Standard_Boolean theFlag) ;
  
  Standard_EXPORT     Standard_Boolean Relative() const;
  
  Standard_EXPORT   virtual  void Perform() ;
  //! Builds the incremental mesh of the shape <br>
  Standard_EXPORT     void Update(const TopoDS_Shape& S) ;
  
  Standard_EXPORT     Standard_Boolean IsModified() const;





protected:

  
  Standard_EXPORT   virtual  void Init() ;


Standard_Boolean myRelative;
TopTools_MapOfShape myMap;
Handle_BRepMesh_FastDiscret myMesh;
Standard_Boolean myModified;
TopTools_DataMapOfShapeReal mymapedge;
TopTools_IndexedDataMapOfShapeListOfShape myancestors;
Standard_Real mydtotale;
Bnd_Box myBox;


private:

  //! Locate a correct discretisation if it exists <br>
//!          Set no one otherwise <br>
  Standard_EXPORT     void Update(const TopoDS_Edge& E) ;
  //! if the face is  not correctly triangulated, or <br>
//!          if  one  of its edges  is  to be discretisated <br>
//!          correctly, the triangulation  of this face  is <br>
//!          built. <br>
  Standard_EXPORT     void Update(const TopoDS_Face& F) ;




};





// other Inline functions and methods (like "C++: function call" methods)


#endif
