OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
DataSourceUnstructuredMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
6
7#include <vtkUnstructuredGrid.h>
8#include <vtkNew.h>
9
10class EntityResultUnstructuredMesh;
11class EntityResultUnstructuredMeshData;
12
14{
15public:
18
19 virtual bool loadData(EntityBase *resultEntity, EntityBase *meshEntity, ClassFactory* classFactory) override;
20
21 vtkUnstructuredGrid* GetVtkGrid() { return vtkGrid.GetPointer(); };
22
23 double GetXMinCoordinate();
24 double GetYMinCoordinate();
25 double GetZMinCoordinate();
26 double GetXMaxCoordinate();
27 double GetYMaxCoordinate();
28 double GetZMaxCoordinate();
29
30 bool GetHasPointScalar() { return hasPointScalar; }
31 bool GetHasPointVector() { return hasPointVector; }
32 bool GetHasCellScalar() { return hasCellScalar; }
33 bool GetHasCellVector() { return hasCellVector; }
34
35private:
36 bool loadMeshData(EntityBase* meshEntity, ClassFactory* classFactory);
37 bool loadResultData(EntityBase* resultEntity, ClassFactory* classFactory);
38 void FreeMemory();
39 void buildScalarArray(size_t length, float* data, vtkNew<vtkDoubleArray>& dataArray);
40 void buildVectorArray(size_t length, float* data, vtkNew<vtkDoubleArray>& dataArray);
41
42 vtkNew<vtkUnstructuredGrid> vtkGrid;
43 bool hasPointScalar;
44 bool hasCellScalar;
45 bool hasPointVector;
46 bool hasCellVector;
47};
Definition DataSourceManagerItem.h:17
Definition DataSourceUnstructuredMesh.h:14
bool GetHasPointVector()
Definition DataSourceUnstructuredMesh.h:31
double GetZMaxCoordinate()
Definition DataSourceUnstructuredMesh.cpp:284
bool GetHasCellScalar()
Definition DataSourceUnstructuredMesh.h:32
virtual bool loadData(EntityBase *resultEntity, EntityBase *meshEntity, ClassFactory *classFactory) override
Definition DataSourceUnstructuredMesh.cpp:214
vtkUnstructuredGrid * GetVtkGrid()
Definition DataSourceUnstructuredMesh.h:21
DataSourceUnstructuredMesh()
Definition DataSourceUnstructuredMesh.cpp:23
bool GetHasPointScalar()
Definition DataSourceUnstructuredMesh.h:30
double GetXMinCoordinate()
Definition DataSourceUnstructuredMesh.cpp:259
double GetYMinCoordinate()
Definition DataSourceUnstructuredMesh.cpp:264
virtual ~DataSourceUnstructuredMesh()
Definition DataSourceUnstructuredMesh.cpp:28
double GetYMaxCoordinate()
Definition DataSourceUnstructuredMesh.cpp:279
double GetXMaxCoordinate()
Definition DataSourceUnstructuredMesh.cpp:274
bool GetHasCellVector()
Definition DataSourceUnstructuredMesh.h:33
double GetZMinCoordinate()
Definition DataSourceUnstructuredMesh.cpp:269