1 // Copyright (c) 2015 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #ifndef _ShapePersistent_Poly_HeaderFile
16 #define _ShapePersistent_Poly_HeaderFile
18 #include <StdObjMgt_SharedObject.hxx>
19 #include <StdObjMgt_ReadData.hxx>
20 #include <StdLPersistent_HArray1.hxx>
21 #include <ShapePersistent_HArray1.hxx>
25 class Poly_PolygonOnTriangulation;
26 class Poly_Triangulation;
29 class ShapePersistent_Poly : private StdObjMgt_SharedObject
31 class pPolygon2D : public Standard_Transient
34 inline void Read (StdObjMgt_ReadData& theReadData)
35 { theReadData >> myDeflection >> myNodes; }
37 Handle(Poly_Polygon2D) Import() const;
40 Standard_Real myDeflection;
41 Handle(ShapePersistent_HArray1::Pnt2d) myNodes;
44 class pPolygon3D : public Standard_Transient
47 inline void Read (StdObjMgt_ReadData& theReadData)
48 { theReadData >> myDeflection >> myNodes >> myParameters; }
50 Handle(Poly_Polygon3D) Import() const;
53 Standard_Real myDeflection;
54 Handle(ShapePersistent_HArray1::Pnt) myNodes;
55 Handle(StdLPersistent_HArray1::Real) myParameters;
58 class pPolygonOnTriangulation : public Standard_Transient
61 inline void Read (StdObjMgt_ReadData& theReadData)
62 { theReadData >> myDeflection >> myNodes >> myParameters; }
64 Handle(Poly_PolygonOnTriangulation) Import() const;
67 Standard_Real myDeflection;
68 Handle(StdLPersistent_HArray1::Integer) myNodes;
69 Handle(StdLPersistent_HArray1::Real) myParameters;
72 class pTriangulation : public Standard_Transient
75 inline void Read (StdObjMgt_ReadData& theReadData)
76 { theReadData >> myDeflection >> myNodes >> myUVNodes >> myTriangles; }
78 Handle(Poly_Triangulation) Import() const;
81 Standard_Real myDeflection;
82 Handle(ShapePersistent_HArray1::Pnt) myNodes;
83 Handle(ShapePersistent_HArray1::Pnt2d) myUVNodes;
84 Handle(ShapePersistent_HArray1::Triangle) myTriangles;
87 template <class Persistent, class Transient>
89 : Delayed <DelayedBase<StdObjMgt_Persistent, Transient, Persistent> > {};
92 typedef instance <pPolygon2D, Poly_Polygon2D> Polygon2D;
93 typedef instance <pPolygon3D, Poly_Polygon3D> Polygon3D;
94 typedef instance <pPolygonOnTriangulation,
95 Poly_PolygonOnTriangulation> PolygonOnTriangulation;
96 typedef instance <pTriangulation, Poly_Triangulation> Triangulation;