OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityMeshCartesianNodes.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityBase.h"
5#include "OldTreeIcon.h"
6
7#include <list>
8
9class __declspec(dllexport) EntityMeshCartesianNodes : public EntityBase
10{
11public:
12 EntityMeshCartesianNodes(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
13 virtual ~EntityMeshCartesianNodes();
14
15 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
16
17 double getNodeCoordX(size_t node) { assert(node < nodeCoordsX.size()); return nodeCoordsX[node]; };
18 double getNodeCoordY(size_t node) { assert(node < nodeCoordsY.size()); return nodeCoordsY[node]; };
19 double getNodeCoordZ(size_t node) { assert(node < nodeCoordsZ.size()); return nodeCoordsZ[node]; };
20 void setNodeCoordX(size_t node, double x) { assert(node < nodeCoordsX.size()); nodeCoordsX[node] = x; setModified(); };
21 void setNodeCoordY(size_t node, double y) { assert(node < nodeCoordsY.size()); nodeCoordsY[node] = y; setModified(); };
22 void setNodeCoordZ(size_t node, double z) { assert(node < nodeCoordsZ.size()); nodeCoordsZ[node] = z; setModified(); };
23
24 void setNumberOfNodes(size_t n);
25 size_t getNumberOfNodes(void) { return nodeCoordsX.size(); }
26
27 virtual std::string getClassName(void) { return "EntityMeshCartesianNodes"; };
28
29 virtual entityType getEntityType(void) override { return DATA; };
30
31private:
32 virtual int getSchemaVersion(void) { return 1; };
33 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
34 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
35
36 std::vector<double> nodeCoordsX;
37 std::vector<double> nodeCoordsY;
38 std::vector<double> nodeCoordsZ;
39};
40
41
42
double y
Definition GeometryOperations.h:23
double double z
Definition GeometryOperations.h:23
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27