OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityResult3DData.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 "EntityResultBase.h"
8#include "OldTreeIcon.h"
10#include "EntityMeshCartesian.h"
12#include "OldTreeIcon.h"
13
14class __declspec(dllexport) EntityResult3DData : public EntityBase , public EntityResultBase
15{
16public:
17 EntityResult3DData(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
18 virtual ~EntityResult3DData();
19
20 virtual bool getEntityBox(double & xmin, double & xmax, double & ymin, double & ymax, double & zmin, double & zmax) override;
21
22 virtual std::string getClassName(void) { return "EntityResult3DData"; };
23
24 virtual entityType getEntityType(void) override { return DATA;};
25
31 virtual void StoreToDataBase(void) override;
32 void LoadAllData(void);
33
34 void SetVectorData(EntityCompressedVector * xComponent, EntityCompressedVector *yComponent, EntityCompressedVector *zComponent);
35 void SetVectorDataUIDs(ot::UID xComponentID, ot::UID xComponentVersion, ot::UID yComponentID, ot::UID yComponentVersion, ot::UID zComponentID, ot::UID zComponentVersion);
36
37 void setMeshData(ot::UID meshID, ot::UID meshDataVersion);
38
46 const double* GetXComponentData(size_t & size);
47
55 const double* GetYComponentData(size_t & size);
56
64 const double* GetZComponentData(size_t & size);
65
73 const double* GetXComponentDataAndReleaseEntity(size_t & size);
74
82 const double* GetYComponentDataAndReleaseEntity(size_t & size);
83
91 const double* GetZComponentDataAndReleaseEntity(size_t & size);
92
100 EntityMeshCartesianData * GetMeshData(void);
101
102 void clearData(void);
103 void clearXComponentData(void);
104 void clearYComponentData(void);
105 void clearZComponentData(void);
106
107private:
108
109 EntityCompressedVector * _xComponentData = nullptr;
110 EntityCompressedVector * _yComponentData = nullptr;
111 EntityCompressedVector * _zComponentData = nullptr;
112
113 EntityMeshCartesianData * _meshData = nullptr;
114
115 long long _xComponentDataID = -1;
116 long long _xComponentDataVersion = -1;
117 long long _yComponentDataID = -1;
118 long long _yComponentDataVersion = -1;
119 long long _zComponentDataID = -1;
120 long long _zComponentDataVersion = -1;
121
122 long long _meshDataID = -1;
123 long long _meshDataVersion = -1;
124
125 void DeleteAllCompressedVectors();
126
127 virtual void AddStorageData(bsoncxx::builder::basic::document &storage) override;
128 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
129};
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27