OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityAnnotationData.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#include <vector>
7#include <array>
8
9class __declspec(dllexport) EntityAnnotationData : public EntityBase
10{
11public:
12 EntityAnnotationData(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
13 virtual ~EntityAnnotationData();
14
15 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
16
17 void addPoint(double x, double y, double z, double r, double g, double b);
18 void addTriangle(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double r, double g, double b);
19
20 const std::vector<std::array<double, 3>> &getPoints(void) { return points; };
21 const std::vector<std::array<double, 3>> &getPointsRGB(void) { return points_rgb; };
22
23 const std::vector<std::array<double, 3>> &getTriangleP1(void) { return triangle_p1; };
24 const std::vector<std::array<double, 3>> &getTriangleP2(void) { return triangle_p2; };
25 const std::vector<std::array<double, 3>> &getTriangleP3(void) { return triangle_p3; };
26 const std::vector<std::array<double, 3>> &getTriangleRGB(void) { return triangle_rgb; };
27
28 const double* getEdgeColorRGB() { return edgeColorRGB; };
29
30 virtual std::string getClassName(void) { return "EntityAnnotationData"; };
31
32 virtual entityType getEntityType(void) override { return DATA; };
33
34private:
35 virtual int getSchemaVersion(void) { return 1; };
36 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
37 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
38
39 double edgeColorRGB[3];
40
41 std::vector<std::array<double, 3>> points;
42 std::vector<std::array<double, 3>> points_rgb;
43
44 std::vector<std::array<double, 3>> triangle_p1;
45 std::vector<std::array<double, 3>> triangle_p2;
46 std::vector<std::array<double, 3>> triangle_p3;
47 std::vector<std::array<double, 3>> triangle_rgb;
48};
49
50
51
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27