0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / MeshVS / MeshVS_ElementalColorPrsBuilder.hxx
1 // Created on: 2003-11-12
2 // Created by: Alexander SOLOVYOV
3 // Copyright (c) 2003-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 _MeshVS_ElementalColorPrsBuilder_HeaderFile
17 #define _MeshVS_ElementalColorPrsBuilder_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <MeshVS_DataMapOfIntegerColor.hxx>
23 #include <MeshVS_DataMapOfIntegerTwoColors.hxx>
24 #include <MeshVS_PrsBuilder.hxx>
25 #include <MeshVS_DisplayModeFlags.hxx>
26 #include <Standard_Integer.hxx>
27 #include <MeshVS_BuilderPriority.hxx>
28 #include <TColStd_PackedMapOfInteger.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <MeshVS_TwoColors.hxx>
31 class MeshVS_Mesh;
32 class MeshVS_DataSource;
33 class Prs3d_Presentation;
34 class Quantity_Color;
35
36
37 class MeshVS_ElementalColorPrsBuilder;
38 DEFINE_STANDARD_HANDLE(MeshVS_ElementalColorPrsBuilder, MeshVS_PrsBuilder)
39
40 //! This class provides methods to create presentation of elements with
41 //! assigned colors. The class contains two color maps: map of same colors for front
42 //! and back side of face and map of different ones,
43 class MeshVS_ElementalColorPrsBuilder : public MeshVS_PrsBuilder
44 {
45
46 public:
47
48   
49   //! Constructor
50   Standard_EXPORT MeshVS_ElementalColorPrsBuilder(const Handle(MeshVS_Mesh)& Parent, const MeshVS_DisplayModeFlags& Flags = MeshVS_DMF_ElementalColorDataPrs, const Handle(MeshVS_DataSource)& DS = 0, const Standard_Integer Id = -1, const MeshVS_BuilderPriority& Priority = MeshVS_BP_ElemColor);
51   
52   //! Builds presentation of elements with assigned colors.
53   Standard_EXPORT virtual void Build (const Handle(Prs3d_Presentation)& Prs, const TColStd_PackedMapOfInteger& IDs, TColStd_PackedMapOfInteger& IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer DisplayMode) const Standard_OVERRIDE;
54   
55   //! Returns map of colors same for front and back side of face.
56   Standard_EXPORT const MeshVS_DataMapOfIntegerColor& GetColors1() const;
57   
58   //! Sets map of colors same for front and back side of face.
59   Standard_EXPORT void SetColors1 (const MeshVS_DataMapOfIntegerColor& Map);
60   
61   //! Returns true, if map of colors isn't empty
62   Standard_EXPORT Standard_Boolean HasColors1() const;
63   
64   //! Returns color assigned with element number ID
65   Standard_EXPORT Standard_Boolean GetColor1 (const Standard_Integer ID, Quantity_Color& theColor) const;
66   
67   //! Sets color assigned with element number ID
68   Standard_EXPORT void SetColor1 (const Standard_Integer ID, const Quantity_Color& theColor);
69   
70   //! Returns map of different colors for front and back side of face
71   Standard_EXPORT const MeshVS_DataMapOfIntegerTwoColors& GetColors2() const;
72   
73   //! Sets map of different colors for front and back side of face
74   Standard_EXPORT void SetColors2 (const MeshVS_DataMapOfIntegerTwoColors& Map);
75   
76   //! Returns true, if map isn't empty
77   Standard_EXPORT Standard_Boolean HasColors2() const;
78   
79   //! Returns colors assigned with element number ID
80   Standard_EXPORT Standard_Boolean GetColor2 (const Standard_Integer ID, MeshVS_TwoColors& theColor) const;
81   
82   //! Returns colors assigned with element number ID
83   //! theColor1 is the front element color
84   //! theColor2 is the back element color
85   Standard_EXPORT Standard_Boolean GetColor2 (const Standard_Integer ID, Quantity_Color& theColor1, Quantity_Color& theColor2) const;
86   
87   //! Sets colors assigned with element number ID
88   Standard_EXPORT void SetColor2 (const Standard_Integer ID, const MeshVS_TwoColors& theTwoColors);
89   
90   //! Sets color assigned with element number ID
91   //! theColor1 is the front element color
92   //! theColor2 is the back element color
93   Standard_EXPORT void SetColor2 (const Standard_Integer ID, const Quantity_Color& theColor1, const Quantity_Color& theColor2);
94
95
96
97
98   DEFINE_STANDARD_RTTI(MeshVS_ElementalColorPrsBuilder,MeshVS_PrsBuilder)
99
100 protected:
101
102
103
104
105 private:
106
107
108   MeshVS_DataMapOfIntegerColor myElemColorMap1;
109   MeshVS_DataMapOfIntegerTwoColors myElemColorMap2;
110
111
112 };
113
114
115
116
117
118
119
120 #endif // _MeshVS_ElementalColorPrsBuilder_HeaderFile