OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityMeshCartesianItem.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityBase.h"
5#include "Geometry.h"
6#include "BoundingBox.h"
7#include "OldTreeIcon.h"
8
9class EntityMeshCartesianData;
10
11#include <list>
12
14class __declspec(dllexport) EntityMeshCartesianItem : public EntityBase
15{
16public:
17 EntityMeshCartesianItem(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
18 virtual ~EntityMeshCartesianItem();
19
20 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
21
22 void setMesh(EntityMeshCartesianData *m) { mesh = m; };
23
24 void setNumberFaces(size_t nT) { faces.resize(nT); setModified(); };
25
26 int getFaceId(size_t nF) { return faces[nF]; };
27 void setFace(size_t nF, int faceId) { faces[nF] = faceId; setModified(); };
28
29 bool getFaceOrientation(size_t nF) { return getFaceId(nF) > 0; };
30
31 //EntityMeshTetFace *getFace(size_t nF);
32
33 virtual void StoreToDataBase(void) override;
34
35 virtual void addVisualizationNodes(void) override;
36
37 void addVisualizationItem(bool isHidden);
38
39 void setColor(double r, double g, double b) { colorRGB[0] = r; colorRGB[1] = g; colorRGB[2] = b; };
40
41 virtual std::string getClassName(void) override { return "EntityMeshCartesianItem"; };
42
43 virtual entityType getEntityType(void) override { return TOPOLOGY; };
44
45 BoundingBox &getBoundingBox(void) { return boundingBox; }
46
47private:
48
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 *mesh;
54
55 double colorRGB[3];
56
57 std::vector<int> faces;
58
59 BoundingBox boundingBox;
60};
61
62
63
Mesh m
Definition SelfIntersectionCheck.cpp:26
double double double b[]
Definition GeometryOperations.h:24
BoundingBox getBoundingBox(std::list< EntityGeometry * > &geometryEntities)
Definition GeometryOperations.cpp:230
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27