OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityMeshCartesian.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityMesh.h"
5
6#include <list>
7#include <map>
8
9class EntityMeshCartesianData;
10
11class __declspec(dllexport) EntityMeshCartesian : public EntityMesh
12{
13public:
14 EntityMeshCartesian(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
15 virtual ~EntityMeshCartesian();
16
17 void createProperties(const std::string materialsFolder, ot::UID materialsFolderID);
18
19 virtual bool updateFromProperties(void) override;
20
21 virtual bool considerForPropertyFilter(void) override { return true; };
22 virtual bool considerChildrenForPropertyFilter(void) override { return false; };
23
24 EntityMeshCartesianData *getMeshData(void);
25
26 virtual void StoreToDataBase(void) override;
27
28 virtual std::string getClassName(void) override { return "EntityMeshCartesian"; };
29 virtual void addVisualizationNodes(void) override;
30
31 virtual entityType getEntityType(void) override { return TOPOLOGY; };
32 virtual void removeChild(EntityBase *child) override;
33
34 bool getMeshValid(void) { return meshValid; }
35 void setMeshValid(bool valid) { meshValid = valid; }
36
37 void deleteMeshData(void);
38
39 void storeMeshData(void);
40 void releaseMeshData(void);
41
42 long long getMeshDataStorageId(void) { return meshDataStorageId; }
43 void setMeshDataID(long long id);
44
45 bool updatePropertyVisibilities(void);
46
47private:
48 void EnsureMeshDataLoaded(void);
49 virtual int getSchemaVersion(void) override { return 1; };
50 virtual void AddStorageData(bsoncxx::builder::basic::document &storage) override;
51 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
52
53 EntityMeshCartesianData *meshData;
54 long long meshDataStorageId;
55
56 bool meshValid;
57};
58
59
60
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27