0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / BRepMesh / BRepMesh_EdgeTessellationExtractor.hxx
1 // Created on: 2014-08-13
2 // Created by: Oleg AGASHIN
3 // Copyright (c) 2011-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _BRepMesh_EdgeTessellationExtractor_HeaderFile
17 #define _BRepMesh_EdgeTessellationExtractor_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <BRepMesh_IEdgeTool.hxx>
22 #include <BRepMesh_EdgeParameterProvider.hxx>
23 #include <TopLoc_Location.hxx>
24 #include <TColgp_Array1OfPnt.hxx>
25 #include <TColStd_Array1OfInteger.hxx>
26
27 class Poly_Triangulation;
28 class Poly_PolygonOnTriangulation;
29 class TopoDS_Edge;
30 class TopoDS_Face;
31 class Geom2dAdaptor_HCurve;
32
33 //! Auxiliary class implements functionality retrieving tessellated
34 //! representation of an edge stored in polygon.
35 class BRepMesh_EdgeTessellationExtractor : public BRepMesh_IEdgeTool
36 {
37 public:
38
39   //! Constructor.
40   //! Initializes extractor.
41   BRepMesh_EdgeTessellationExtractor(
42     const TopoDS_Edge&                          theEdge,
43     const Handle(Geom2dAdaptor_HCurve)&         thePCurve,
44     const TopoDS_Face&                          theFace,
45     const Handle(Poly_Triangulation)&           theTriangulation,
46     const Handle(Poly_PolygonOnTriangulation)&  thePolygon,
47     const TopLoc_Location&                      theLocation);
48
49   //! Returns number of dicretization points.
50   virtual Standard_Integer NbPoints() const Standard_OVERRIDE
51   {
52     return myIndices.Length();
53   }
54
55   //! Returns parameters of solution with the given index.
56   //! @param theIndex index of tessellation point.
57   //! @param theParameter parameters on PCurve corresponded to the solution.
58   //! @param thePoint tessellation point.
59   //! @param theUV coordinates of tessellation point in parametric space of face.
60   //! @return True in case of valid result, false elewhere.
61   virtual Standard_Boolean Value(
62     const Standard_Integer theIndex,
63     Standard_Real&         theParameter,
64     gp_Pnt&                thePoint,
65     gp_Pnt2d&              theUV) Standard_OVERRIDE;
66
67   DEFINE_STANDARD_RTTIEXT(BRepMesh_EdgeTessellationExtractor,BRepMesh_IEdgeTool)
68
69 private:
70
71   //! Assignment operator.
72   void operator =(const BRepMesh_EdgeTessellationExtractor& /*theOther*/)
73   {
74   }
75
76 private:
77
78   BRepMesh_EdgeParameterProvider myProvider;
79   Handle(Geom2dAdaptor_HCurve)   myPCurve;
80   const TColgp_Array1OfPnt&      myNodes;
81   const TColStd_Array1OfInteger& myIndices;
82   const TopLoc_Location          myLoc;
83 };
84
85 DEFINE_STANDARD_HANDLE(BRepMesh_EdgeTessellationExtractor, BRepMesh_IEdgeTool)
86
87 #endif