pointData.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::pointData
26 
27 Description
28 
29 SourceFiles
30  pointData.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef pointData_H
35 #define pointData_H
36 
37 #include "geometryBase.H"
38 #include "NamedEnum.H"
39 #include "runTimeSelectionTables.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 class vtkActor;
44 class vtkPolyData;
45 class vtkPolyDataMapper;
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class pointData Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class pointData
55 :
56  public geometryBase
57 {
58 public:
59 
60  // Public enumerations
61 
63  {
65  rtVector
66  };
67 
69 
70 
71 private:
72 
73  // Private Member Functions
74 
75  //- Disallow default bitwise copy construct
76  pointData(const pointData&);
77 
78  //- Disallow default bitwise assignment
79  void operator=(const pointData&);
80 
81 
82 protected:
83 
84  // Protected data
85 
86  //- Representation type
88 
89  //- Max glyph length
90  scalar maxGlyphLength_;
91 
92  //- Point colour
94 
95 
96  // Protected Member Functions
97 
98  //- Add the point data to the renderer
99  void addPoints
100  (
101  const label frameI,
102  vtkActor* actor,
103  vtkPolyDataMapper* mapper,
104  vtkPolyData* data
105  ) const;
106 
107 
108 public:
109 
110  //- Run-time type information
111  TypeName("pointData");
112 
113 
114  // Declare run-time constructor selection table
115 
117  (
118  autoPtr,
119  pointData,
120  dictionary,
121  (
122  const runTimePostProcessing& parent,
123  const dictionary& dict,
124  const HashPtrTable<DataEntry<vector>, word>& colours
125  ),
126  (parent, dict, colours)
127  );
128 
129 
130  // Constructors
131 
132  //- Construct from dictionary
133  pointData
134  (
135  const runTimePostProcessing& parent,
136  const dictionary& dict,
137  const HashPtrTable<DataEntry<vector>, word>& colours
138  );
139 
140 
141  // Selectors
142 
143  //- Return a reference to the selected RAS model
144  static autoPtr<pointData> New
145  (
146  const runTimePostProcessing& parent,
147  const dictionary& dict,
148  const HashPtrTable<DataEntry<vector>, word>& colours,
149  const word& pointDataName
150  );
151 
152 
153  //- Destructor
154  virtual ~pointData();
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::pointData::operator=
void operator=(const pointData &)
Disallow default bitwise assignment.
NamedEnum.H
Foam::pointData::representationType
representationType
Definition: pointData.H:61
geometryBase.H
Foam::pointData
Variant of pointEdgePoint with some transported additional data. WIP - should be templated on data li...
Definition: pointData.H:53
Foam::runTimePostProcessing
Function object to generate images during run-time.
Definition: runTimePostProcessing.H:83
Foam::pointData::representation_
representationType representation_
Representation type.
Definition: pointData.H:86
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::pointData::TypeName
TypeName("pointData")
Run-time type information.
Foam::pointData::rtSphere
@ rtSphere
Definition: pointData.H:63
Foam::pointData::pointData
pointData()
Construct null.
Definition: pointDataI.H:32
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::pointData::pointColour_
autoPtr< DataEntry< vector > > pointColour_
Point colour.
Definition: pointData.H:92
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::pointData::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, pointData, dictionary,(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< DataEntry< vector >, word > &colours),(parent, dict, colours))
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::pointData::addPoints
void addPoints(const label frameI, vtkActor *actor, vtkPolyDataMapper *mapper, vtkPolyData *data) const
Add the point data to the renderer.
Definition: pointData.C:61
Foam::pointData::rtVector
@ rtVector
Definition: pointData.H:64
Foam::HashPtrTable
A HashTable specialization for hashing pointers.
Definition: HashPtrTable.H:50
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::pointData::~pointData
virtual ~pointData()
Destructor.
Definition: pointData.C:159
Foam::pointData::maxGlyphLength_
scalar maxGlyphLength_
Max glyph length.
Definition: pointData.H:89
Foam::DataEntry
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Definition: DataEntry.H:52
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:52
Foam::pointData::representationTypeNames
static const NamedEnum< representationType, 2 > representationTypeNames
Definition: pointData.H:67
Foam::NamedEnum< representationType, 2 >
Foam::pointData::New
static autoPtr< pointData > New(const runTimePostProcessing &parent, const dictionary &dict, const HashPtrTable< DataEntry< vector >, word > &colours, const word &pointDataName)
Return a reference to the selected RAS model.
Definition: pointData.C:128