OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityResultUnstructuredMesh.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include <list>
5
6#include "EntityBase.h"
7#include "OldTreeIcon.h"
8#include "EntityBinaryData.h"
9
10class __declspec(dllexport) EntityResultUnstructuredMesh : public EntityBase
11{
12public:
13 EntityResultUnstructuredMesh(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
14 virtual ~EntityResultUnstructuredMesh();
15
16 virtual bool getEntityBox(double & xmin, double & xmax, double & ymin, double & ymax, double & zmin, double & zmax) override;
17
18 virtual std::string getClassName(void) { return "EntityResultUnstructuredMesh"; };
19
20 virtual entityType getEntityType(void) override { return DATA;};
21
22 void GetPointCoordData(size_t& numberPoints, double *&x, double*& y, double*& z, ClassFactoryHandler* factory);
23 void GetCellData(size_t& numberCells, size_t& sizeCellData, int*& cells, ClassFactoryHandler* factory);
24
25 // Please note that setting the data also transfers the ownership of the EntityBinaryData objects. The objects must not be deleted outside the EntityResultUnstructuredMesh.
26 void setMeshData(size_t numberPoints, size_t numberCells, size_t sizeCellData, EntityBinaryData*& xcoord, EntityBinaryData*& ycoord, EntityBinaryData*& zcoord, EntityBinaryData*& cellData);
27
28private:
29
30 long long _numberPoints = 0;
31 long long _numberCells = 0;
32 long long _sizeCellData = 0;
33
34 EntityBinaryData* _xcoord = nullptr;
35 EntityBinaryData* _ycoord = nullptr;
36 EntityBinaryData* _zcoord = nullptr;
37
38 EntityBinaryData* _cellData = nullptr;
39
40 long long _xCoordDataID = -1;
41 long long _xCoordDataVersion = -1;
42 long long _yCoordDataID = -1;
43 long long _yCoordDataVersion = -1;
44 long long _zCoordDataID = -1;
45 long long _zCoordDataVersion = -1;
46
47 long long _cellDataID = -1;
48 long long _cellDataVersion = -1;
49
50 void clearAllBinaryData(void);
51 void updateIDFromObjects(void);
52
53 virtual void AddStorageData(bsoncxx::builder::basic::document &storage) override;
54 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
55};
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27