OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityMeshTetData.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityContainer.h"
5#include "OldTreeIcon.h"
6
7#include <list>
8#include <string>
9
10class EntityMeshTetFace;
11class EntityMeshTetNodes;
12class EntityMeshTetFaceData;
13class EntityBinaryData;
14
15class __declspec(dllexport) EntityMeshTetData : public EntityContainer
16{
17public:
18 EntityMeshTetData(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
19 virtual ~EntityMeshTetData();
20
21 virtual bool considerForPropertyFilter(void) override { return true; };
22 virtual bool considerChildrenForPropertyFilter(void) override { return false; };
23
24 virtual bool updateFromProperties(void) override;
25
26 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
27
28 void getNodeCoords(size_t node, double coord[3]);
29 double getNodeCoordX(size_t node);
30 double getNodeCoordY(size_t node);
31 double getNodeCoordZ(size_t node);
32 void setNodeCoordX(size_t node, double x);
33 void setNodeCoordY(size_t node, double y);
34 void setNodeCoordZ(size_t node, double z);
35
36 void setNumberOfNodes(size_t n);
37
38 EntityMeshTetFace *getFace(int faceId);
39 void setFace(int faceId, EntityMeshTetFace *face);
40
41 virtual void StoreToDataBase(void) override;
42 void releaseMeshData(void);
43
44 virtual void addVisualizationNodes(void) override;
45 void addVisualizationItem(void);
46
47 virtual std::string getClassName(void) { return "EntityMeshTetData"; };
48
49 long long getMeshNodesStorageId(void) { return meshNodesStorageId; };
50 long long getMeshFacesStorageId(void) { return meshFacesStorageId; };
51
52 void setGmshDataStorageId(long long id) { gmshDataStorageId = id; };
53 long long getGmshDataStorageId(void) { return gmshDataStorageId; };
54
55 EntityMeshTetNodes *getMeshNodes(void) { return meshNodes; };
56 EntityMeshTetFaceData *getMeshFaces(void) { return meshFaces; };
57
58 virtual entityType getEntityType(void) override { return TOPOLOGY; };
59
60 virtual void removeChild(EntityBase *child) override;
61
62 void storeMeshNodes(void);
63 void storeMeshFaces(void);
64
65private:
66 virtual int getSchemaVersion(void) { return 1; };
67 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
68 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
69 void EnsureFacesLoaded(void);
70 void releaseMeshFaces(void);
71 void EnsureNodesLoaded(void);
72 void releaseMeshNodes(void);
73
74 EntityMeshTetNodes *meshNodes;
75 long long meshNodesStorageId;
76
77 EntityMeshTetFaceData *meshFaces;
78 long long meshFacesStorageId;
79
80 long long gmshDataStorageId;
81};
82
83
84
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27