OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Transformations.h
Go to the documentation of this file.
1#pragma once
2
3namespace ot
4{
5 class EntityInformation;
6}
7
8#include "ShapesBase.h"
9
10#include <list>
11#include <string>
12
15
16#include <gp_Trsf.hxx>
17
18class EntityBrep;
19class TopoDS_Shape;
20class EntityGeometry;
21class EntityCache;
22class UpdateManager;
23
25{
26public:
27 Transformations(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, ot::serviceID_t _serviceID, const std::string &_serviceName, EntityCache *_entityCache, ClassFactory *_classFactory)
28 : ShapesBase(_uiComponent, _modelComponent, _serviceID, _serviceName, _entityCache, _classFactory),
29 updateManager(nullptr) {};
31
32 void setUpdateManager(UpdateManager *_updateManager) { updateManager = _updateManager; };
33
34 void enterTransformMode(const std::list<ot::EntityInformation> &selectedGeometryEntities);
35 void transformEntities(const std::string &selectionInfo, std::map<std::string, std::string> &options);
36
37 static gp_Trsf setTransform(EntityGeometry *geomEntity, TopoDS_Shape &shape, gp_Trsf prevTransform);
38
39 Transformations() = delete;
40
41private:
42 void updateTransformationProperties(EntityGeometry *geometryEntity, gp_XYZ transformTranslate, gp_XYZ transformAxis, double transformAngle, gp_XYZ rotationCenter);
43 UpdateManager *getUpdateManager(void) { assert(updateManager != nullptr); return updateManager; }
44
45 UpdateManager *updateManager;
46};
Definition EntityCache.h:26
Definition ShapesBase.h:19
Definition Transformations.h:25
Transformations()=delete
void setUpdateManager(UpdateManager *_updateManager)
Definition Transformations.h:32
static gp_Trsf setTransform(EntityGeometry *geomEntity, TopoDS_Shape &shape, gp_Trsf prevTransform)
Definition Transformations.cpp:48
void transformEntities(const std::string &selectionInfo, std::map< std::string, std::string > &options)
Definition Transformations.cpp:123
~Transformations()
Definition Transformations.h:30
void enterTransformMode(const std::list< ot::EntityInformation > &selectedGeometryEntities)
Definition Transformations.cpp:26
Transformations(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, ot::serviceID_t _serviceID, const std::string &_serviceName, EntityCache *_entityCache, ClassFactory *_classFactory)
Definition Transformations.h:27
Definition UpdateManager.h:30
Definition ModelComponent.h:42
Definition UiComponent.h:31
Definition Connector.h:8
unsigned short serviceID_t
ID type used to identify a service (16 bit unsigned integer).
Definition CoreTypes.h:14