0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / BRepMeshData / BRepMeshData_Edge.hxx
CommitLineData
7bd071ed 1// Created on: 2016-04-07
2// Copyright (c) 2016 OPEN CASCADE SAS
3// Created by: Oleg AGASHIN
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 _BRepMeshData_Edge_HeaderFile
17#define _BRepMeshData_Edge_HeaderFile
18
19#include <IMeshData_Edge.hxx>
20#include <IMeshData_Curve.hxx>
21#include <NCollection_IncAllocator.hxx>
22#include <IMeshData_Types.hxx>
23
24//! Default implementation of edge data model entity.
25class BRepMeshData_Edge : public IMeshData_Edge
26{
27public:
28
29 DEFINE_INC_ALLOC
30
31 //! Constructor.
32 Standard_EXPORT BRepMeshData_Edge (
33 const TopoDS_Edge& theEdge,
34 const Handle (NCollection_IncAllocator)& theAllocator);
35
36 //! Destructor.
37 Standard_EXPORT virtual ~BRepMeshData_Edge ();
38
39 //! Returns number of pcurves assigned to current edge.
40 Standard_EXPORT virtual Standard_Integer PCurvesNb () const Standard_OVERRIDE;
41
42 //! Adds disrete pcurve for the specifed discrete face.
43 Standard_EXPORT virtual const IMeshData::IPCurveHandle& AddPCurve (
44 const IMeshData::IFacePtr& theDFace,
45 const TopAbs_Orientation theOrientation) Standard_OVERRIDE;
46
47 //! Returns pcurve for the specified discrete face.
48 Standard_EXPORT virtual const IMeshData::IPCurveHandle& GetPCurve (
49 const IMeshData::IFacePtr& theDFace,
50 const TopAbs_Orientation theOrientation) const Standard_OVERRIDE;
51
52 //! Returns pcurve with the given index.
53 Standard_EXPORT virtual const IMeshData::IPCurveHandle& GetPCurve (
54 const Standard_Integer theIndex) const Standard_OVERRIDE;
55
56 DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Edge, IMeshData_Edge)
57
58private:
59
60 Handle (NCollection_IncAllocator) myAllocator;
61 IMeshData::VectorOfIPCurveHandles myPCurves;
62 IMeshData::DMapOfIFacePtrsListOfInteger myPCurvesMap;
63};
64
65#endif