QtPlaneSelect.hh
00001 #ifndef QTPLANESELECT_HH
00002 #define QTPLANESELECT_HH
00003
00004 #include <ACG/GL/GLState.hh>
00005 #include <ACG/Math/VectorT.hh>
00006
00007 #include <ACG/Scenegraph/TransformNode.hh>
00008 #include <ACG/Scenegraph/LineNode.hh>
00009
00010 #include <qnamespace.h>
00011 #include <qgl.h>
00012 #include <QObject>
00013
00014 #include <list>
00015
00016 class QtPlaneSelect : public QObject
00017 {
00018 Q_OBJECT
00019
00020 typedef ACG::Vec2i Vec2i;
00021 typedef ACG::Vec2f Vec2f;
00022 typedef ACG::Vec3d Vec3d;
00023
00024
00025
00026
00027 public:
00028 QtPlaneSelect( ACG::GLState& glState );
00029 ~QtPlaneSelect();
00030
00031
00032
00033
00034
00035 public slots:
00036
00037
00038
00039
00040 void slotMouseEvent(QMouseEvent* _event);
00041
00042
00043
00044
00045 void slotKeyReleaseEvent(QKeyEvent* _event);
00046
00047
00048
00049
00050 signals:
00051 void signalTriggerCut( );
00052 void updateViewProxy();
00053
00054
00055
00056
00057
00058 public:
00059 Vec3d getNormal( ) { return normal; }
00060 Vec3d getSourcePoint( ) { return sourcePoint3D; }
00061 unsigned int getNode() { return nodeIdx_; };
00062 unsigned int getTargetIndex() { return targetIdx_; };
00063
00064
00065
00066
00067
00068 protected:
00069 ACG::GLState& glState;
00070 Vec3d sourcePoint3D;
00071 Vec3d normal;
00072 unsigned int nodeIdx_;
00073 unsigned int targetIdx_;
00074 bool isDragging;
00075
00076 ACG::SceneGraph::TransformNode* transformNode;
00077 ACG::SceneGraph::TransformNode* transformNodeSource;
00078 ACG::SceneGraph::TransformNode* transformNodeDrag;
00079 ACG::SceneGraph::LineNode* lineNode;
00080 };
00081
00082
00083
00084 #endif // QTPLANESELECT_HH