OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityMeshTet.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 EntityMeshTetData;
10class EntityMeshTetFace;
11
12class __declspec(dllexport) EntityMeshTet : public EntityMesh
13{
14public:
15 EntityMeshTet(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
16 virtual ~EntityMeshTet();
17
18 void createProperties(const std::string materialsFolder, ot::UID materialsFolderID);
19
20 virtual bool updateFromProperties(void) override;
21
22 virtual bool considerForPropertyFilter(void) override { return true; };
23 virtual bool considerChildrenForPropertyFilter(void) override { return false; };
24
25 void getNodeCoords(size_t node, double coord[3]);
26 double getNodeCoordX(size_t node);
27 double getNodeCoordY(size_t node);
28 double getNodeCoordZ(size_t node);
29 void setNodeCoordX(size_t node, double x);
30 void setNodeCoordY(size_t node, double y);
31 void setNodeCoordZ(size_t node, double z);
32
33 void setNumberOfNodes(size_t n);
34
35 EntityMeshTetFace *getFace(int faceId);
36 void setFace(int faceId, EntityMeshTetFace *face);
37
38 EntityMeshTetData *getMeshData(void);
39
40 virtual void StoreToDataBase(void) override;
41
42 virtual std::string getClassName(void) override { return "EntityMeshTet"; };
43 virtual void addVisualizationNodes(void) override;
44
45 virtual entityType getEntityType(void) override { return TOPOLOGY; };
46 virtual void removeChild(EntityBase *child) override;
47
48 bool getMeshValid(void) { return meshValid; }
49 void setMeshValid(bool valid) { meshValid = valid; }
50
51 void deleteMeshData(void);
52
53 void storeMeshData(void);
54 void releaseMeshData(void);
55
56 long long getMeshDataStorageId(void) { return meshDataStorageId; }
57
58 bool updatePropertyVisibilities(void);
59
60private:
61 void EnsureMeshDataLoaded(void);
62 virtual int getSchemaVersion(void) override { return 1; };
63 virtual void AddStorageData(bsoncxx::builder::basic::document &storage) override;
64 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
65 void recursivelySetMesh(const std::list<EntityBase *> &childList);
66
67 EntityMeshTetData *meshData;
68 long long meshDataStorageId;
69
70 bool meshValid;
71};
72
73
74
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27