OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PrimitiveManager.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6class EntityGeometry;
7class TopoDS_Shape;
8class EntityCache;
9class ClassFactory;
10
11class PrimitiveCone;
12class PrimitiveCuboid;
15class PrimitiveSphere;
16class PrimitiveTorus;
17
20
22{
23public:
24 PrimitiveManager(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, const std::string &_serviceName, ot::serviceID_t _serviceID, EntityCache *_entityCache, ClassFactory* _classFactory);
26
27 bool isPrimitiveShape(const std::string &type);
28 void updateShape(const std::string &type, EntityGeometry *geomEntity, TopoDS_Shape &shape);
29
30 void createFromRubberbandJson(const std::string &note, const std::string& _json, std::vector<double> &_transform);
31
32 PrimitiveCone *getCone(void) { return cone; }
33 PrimitiveCuboid *getCuboid(void) { return cuboid; }
34 PrimitiveCylinder *getCylinder(void) { return cylinder; }
35 PrimitivePyramid *getPyramid(void) { return pyramid; }
36 PrimitiveSphere *getSphere(void) { return sphere; }
37 PrimitiveTorus *getTorus(void) { return torus; }
38
39 PrimitiveManager() = delete;
40
41private:
42 ot::components::UiComponent *uiComponent;
43 ot::components::ModelComponent *modelComponent;
44 std::string serviceName;
45 EntityCache *entityCache;
46 ClassFactory* classFactory;
47
48 PrimitiveCone *cone;
49 PrimitiveCuboid *cuboid;
50 PrimitiveCylinder *cylinder;
51 PrimitivePyramid *pyramid;
52 PrimitiveSphere *sphere;
53 PrimitiveTorus *torus;
54};
55
Definition EntityCache.h:26
Definition PrimitiveCone.h:6
Definition PrimitiveCuboid.h:6
Definition PrimitiveCylinder.h:6
Definition PrimitiveManager.h:22
void updateShape(const std::string &type, EntityGeometry *geomEntity, TopoDS_Shape &shape)
Definition PrimitiveManager.cpp:46
PrimitiveCylinder * getCylinder(void)
Definition PrimitiveManager.h:34
~PrimitiveManager()
Definition PrimitiveManager.cpp:26
PrimitiveManager()=delete
bool isPrimitiveShape(const std::string &type)
Definition PrimitiveManager.cpp:36
PrimitivePyramid * getPyramid(void)
Definition PrimitiveManager.h:35
PrimitiveTorus * getTorus(void)
Definition PrimitiveManager.h:37
void createFromRubberbandJson(const std::string &note, const std::string &_json, std::vector< double > &_transform)
Definition PrimitiveManager.cpp:78
PrimitiveSphere * getSphere(void)
Definition PrimitiveManager.h:36
PrimitiveCone * getCone(void)
Definition PrimitiveManager.h:32
PrimitiveCuboid * getCuboid(void)
Definition PrimitiveManager.h:33
Definition PrimitivePyramid.h:6
Definition PrimitiveSphere.h:6
Definition PrimitiveTorus.h:6
Definition ModelComponent.h:42
Definition UiComponent.h:31
unsigned short serviceID_t
ID type used to identify a service (16 bit unsigned integer).
Definition CoreTypes.h:14