OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
WorkingPlane.h
Go to the documentation of this file.
1#pragma once
2
3#include "OTCore/Color.h"
4
5#include <osg/Node>
6#include <osg/Geode>
7#include <osg/Matrix>
8
9namespace osg {
10 class Node;
11 class Group;
12}
13
15public:
16 WorkingPlane(osg::Node * _rootGeometryNode, osg::Group * _parentGroup);
17 virtual ~WorkingPlane();
18
19 // ################################################################################################
20
21 // Setter
22
23 void setCenterPoint(float _x, float _y, float _z);
24
25 bool setVisible(bool _isVisible);
26
27 bool refreshAfterModelChange(void);
28
30
31 void setTransformation(osg::Matrix &matrix);
32
33 // ################################################################################################
34
35 // Getter
36
37 float centerX(void) const { return m_centerX; }
38 float centerY(void) const { return m_centerY; }
39 float centerZ(void) const { return m_centerZ; }
40
41 float height(void) const { return m_height; }
42 float width(void) const { return m_width; }
43
44 bool isVisible(void) const { return m_isVisible; }
45
46private:
47
48 bool calculateSize(bool _calculateGridStepWidth, bool& _gridResolutionChanged);
49 void calculateGridStepWidth(bool& _gridResolutionChanged);
50
51 void rebuildNode(void);
52
53 osg::Node * m_rootGeometryNode;
54 osg::Group * m_parentGroup;
55 osg::ref_ptr<osg::Geode> m_nodePlane;
56 osg::ref_ptr<osg::Geode> m_nodeGridLines;
57 osg::ref_ptr<osg::Geode> m_nodeGridLinesWide;
58
59 osg::ref_ptr<osg::MatrixTransform> m_planeNode;
60
61 bool m_firstVisibility;
62
63 float m_centerX;
64 float m_centerY;
65 float m_centerZ;
66
67 float m_height;
68 float m_width;
69
70 bool m_isVisible;
71
72 WorkingPlane() = delete;
73 WorkingPlane(WorkingPlane&) = delete;
74 WorkingPlane& operator = (WorkingPlane&) = delete;
75};
Definition Group.h:20
Definition WorkingPlane.h:14
float centerX(void) const
Definition WorkingPlane.h:37
float centerY(void) const
Definition WorkingPlane.h:38
float height(void) const
Definition WorkingPlane.h:41
bool refreshAfterModelChange(void)
Definition WorkingPlane.cpp:85
bool setVisible(bool _isVisible)
Definition WorkingPlane.cpp:64
virtual ~WorkingPlane()
Definition WorkingPlane.cpp:39
float centerZ(void) const
Definition WorkingPlane.h:39
bool isVisible(void) const
Definition WorkingPlane.h:44
bool refreshAfterSettingsChange(void)
Definition WorkingPlane.cpp:94
float width(void) const
Definition WorkingPlane.h:42
void setCenterPoint(float _x, float _y, float _z)
Definition WorkingPlane.cpp:56
void setTransformation(osg::Matrix &matrix)
Definition WorkingPlane.cpp:51
Definition RubberbandOsgWrapper.h:22