OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
RubberbandEngine.h
Go to the documentation of this file.
1/*
2 * File: RubberbandEngine.h
3 * Package: rbeCore
4 *
5 * Created on: September 07, 2021
6 * Author: Alexander Kuester
7 * Copyright (c) 2021 Alexander Kuester
8 * This file is part of the RubberbandEngine package.
9 * This file is subject to the terms and conditions defined in
10 * file 'LICENSE', which is part of this source code package.
11 */
12
13#pragma once
14
15// Project header
16#include <rbeCore/dataTypes.h>
17
18// C++ header
19#include <string>
20#include <list>
21#include <map>
22
23namespace rbeCore {
24
25 class Point;
26 class Step;
27 class AbstractConnection;
28 class NumericPoint;
29
31 public:
32 RubberbandEngine(coordinate_t _originU, coordinate_t _originV, coordinate_t _originW);
33 virtual ~RubberbandEngine();
34
35 // #################################################################################################################
36
37 // Getter
38
39 NumericPoint * origin(void) { return m_origin; }
40
41 NumericPoint * current(void) { return m_current; }
42
43 Point * point(int _id);
44
45 bool hasPoint(int _id);
46
47 int currentStep(void) const { return m_currentStep; }
48
49 bool hasStep(int _id);
50
51 Step * step(int _id);
52
53 std::string debugInformation(void);
54
55 std::string connectionsJsonArray(void);
56
57 std::list<AbstractConnection *> connectionsToDisplay(void);
58
59 std::map<int, Point *>& points(void);
60
61 std::string pointsJsonArray(void);
62
63 // #################################################################################################################
64
65 // Setter
66
67 bool hasNextStep(void);
68
69 virtual void addPoint(Point * _point);
70
71 virtual void replaceOrigin(coordinate_t _originU, coordinate_t _originV, coordinate_t _originW);
72
73 virtual void updateCurrent(coordinate_t _currentU, coordinate_t _currentV, coordinate_t _currentW);
74
75 virtual void setupFromJson(const char * _json);
76
77 virtual void clear(void);
78
79 virtual void activateStepOne(void);
80
81 virtual void activateNextStep(void);
82
83 virtual void applyCurrentStep(void);
84
85 private:
86
87 struct d_data;
88 d_data * m_data;
89
90 int m_currentStep;
91 rbeCore::NumericPoint * m_origin;
92 rbeCore::NumericPoint * m_current;
93
94 RubberbandEngine() = delete;
96 RubberbandEngine& operator = (RubberbandEngine&) = delete;
97 };
98
99}
@ point
Definition MonitorSettings.h:19
Definition NumericPoint.h:20
Definition Point.h:24
Definition RubberbandEngine.h:30
NumericPoint * current(void)
Definition RubberbandEngine.h:41
NumericPoint * origin(void)
Definition RubberbandEngine.h:39
int currentStep(void) const
Definition RubberbandEngine.h:47
Definition Step.h:33
float coordinate_t
Definition dataTypes.h:26
#define RBE_API_EXPORT
Definition dataTypes.h:18
Definition ParserAPI.h:21