0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / BRepMesh / BRepMesh_SelectorOfDataStructureOfDelaun.hxx
CommitLineData
fc9b36d6 1// Copyright (c) 2013 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
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.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#ifndef _BRepMesh_SelectorOfDataStructureOfDelaun_HeaderFile
15#define _BRepMesh_SelectorOfDataStructureOfDelaun_HeaderFile
16
17#include <Standard.hxx>
18#include <Standard_DefineAlloc.hxx>
19#include <Standard_Macro.hxx>
20#include <BRepMesh_DataStructureOfDelaun.hxx>
848fa7e3 21#include <BRepMesh.hxx>
fc9b36d6 22#include <Standard_Integer.hxx>
23#include <BRepMesh_Triangle.hxx>
24
25class BRepMesh_Vertex;
26class BRepMesh_Edge;
27
28//! Describes a selector and an iterator on a
29//! selector of components of a mesh.
30class BRepMesh_SelectorOfDataStructureOfDelaun
31{
32public:
33
34 DEFINE_STANDARD_ALLOC
35
36 //! Default constructor.
37 Standard_EXPORT BRepMesh_SelectorOfDataStructureOfDelaun();
38
39 //! Constructor.
40 //! Initializes selector by the mesh.
41 Standard_EXPORT BRepMesh_SelectorOfDataStructureOfDelaun(const Handle(BRepMesh_DataStructureOfDelaun)& theMesh);
42
43 //! Initializes selector by the mesh.
44 Standard_EXPORT void Initialize(const Handle(BRepMesh_DataStructureOfDelaun)& theMesh);
45
46 //! Selects all neighboring elements of the given node.
47 Standard_EXPORT void NeighboursOf(const BRepMesh_Vertex& theNode);
48
49 //! Selects all neighboring elements of node with the given index.
50 Standard_EXPORT void NeighboursOfNode(const Standard_Integer theNodeIndex);
51
52 //! Selects all neighboring elements of the given link.
53 Standard_EXPORT void NeighboursOf(const BRepMesh_Edge& theLink);
54
55 //! Selects all neighboring elements of link with the given index.
56 Standard_EXPORT void NeighboursOfLink(const Standard_Integer theLinkIndex);
57
58 //! Selects all neighboring elements of the given element.
59 Standard_EXPORT void NeighboursOf(const BRepMesh_Triangle& theElement);
60
61 //! Selects all neighboring elements by nodes of the given element.
62 Standard_EXPORT void NeighboursOfElement(const Standard_Integer theElementIndex);
63
64 //! Selects all neighboring elements by links of the given element.
65 Standard_EXPORT void NeighboursByEdgeOf(const BRepMesh_Triangle& theElement);
66
67 //! Adds a level of neighbours by edge to the selector.
68 inline void NeighboursOf(const BRepMesh_SelectorOfDataStructureOfDelaun& /*theSelector*/)
69 {
70 }
71
72 //! Adds a level of neighbours by edge the selector.
73 inline void AddNeighbours()
74 {
75 }
76
77 //! Returns selected nodes.
848fa7e3 78 inline const BRepMesh::MapOfInteger& Nodes() const
fc9b36d6 79 {
80 return myNodes;
81 }
82
83 //! Returns selected links.
848fa7e3 84 inline const BRepMesh::MapOfInteger& Links() const
fc9b36d6 85 {
86 return myLinks;
87 }
88
89 //! Returns selected elements.
848fa7e3 90 inline const BRepMesh::MapOfInteger& Elements() const
fc9b36d6 91 {
92 return myElements;
93 }
94
95 //! Gives the list of incices of frontier links.
848fa7e3 96 inline const BRepMesh::MapOfInteger& FrontierLinks() const
fc9b36d6 97 {
98 return myFrontier;
99 }
100
101private:
102
103 //! Collects elements connected to link with the given index.
104 void elementsOfLink(const Standard_Integer theIndex);
105
106private:
2caff0b3 107 Handle(NCollection_IncAllocator) myAllocator;
fc9b36d6 108 Handle(BRepMesh_DataStructureOfDelaun) myMesh;
848fa7e3 109 BRepMesh::MapOfInteger myNodes;
110 BRepMesh::MapOfInteger myLinks;
111 BRepMesh::MapOfInteger myElements;
112 BRepMesh::MapOfInteger myFrontier;
fc9b36d6 113};
114
115#endif