9 #include <osg/AutoTransform> 12 #include "ProtectedGroup.h" 14 #include "../libGUI/hudcamera.h" 15 #include "UserScene.h" 19 #include "Bookmarks.h" 20 #include "../libGUI/ListWidget.h" 21 #include "ToolGlobal.h" 22 #include "SceneState.h" 24 #include "CamPoseData.h" 25 #include "DraggableWire.h" 28 #include <QModelIndex> 31 class AddStrokeCommand;
55 QUndoStack* getUndoStack()
const;
58 void setFilePath(
const std::string& name);
61 bool isSetFilePath()
const;
64 bool isSavedToFile()
const;
67 void setSavedToFile(
bool saved);
70 bool isEmptyScene()
const;
76 void setToolsVisibility(
bool vis);
79 bool getToolsVisibility()
const;
82 void setAxesVisibility(
bool vis);
85 bool getAxesVisibility()
const;
94 bool writeScenetoFile();
98 bool exportSceneToFile(
const std::string& name);
101 bool loadSceneFromFile();
104 int getStrokeLevel()
const;
107 int getCanvasLevel()
const;
110 int getPhotoLevel()
const;
113 void addCanvas(
const osg::Matrix& R,
const osg::Matrix& T);
116 void addCanvas(
const osg::Vec3f& normal,
const osg::Vec3f& center);
119 void addCanvas(
const osg::Matrix& R,
const osg::Matrix& T,
const std::string& name);
122 void addStroke(
float u,
float v,
cher::EVENT event);
125 void addPolygon(
float u,
float v,
cher::EVENT event);
128 void addLineSegment(
float u,
float v,
cher::EVENT event);
131 void selectAllEntities();
134 void addPhoto(
const std::string& fname);
137 void addBookmark(
BookmarkWidget* widget,
const osg::Vec3d& eye,
const osg::Vec3d& center,
const osg::Vec3d& up,
const double& fov);
145 bool addPhotoScaleData();
148 bool hidePhotoScaleData();
151 bool removePhotoScaleData();
159 bool addCamPoseData();
162 void hideAndUpdateSVMData();
165 void hideAndUpdateCamPoseData();
175 void addBookmarkTool(
const osg::Vec3d& eye,
const osg::Vec3d& center,
const osg::Vec3d& up);
177 void deleteBookmark(
BookmarkWidget* widget,
const QModelIndex& index);
178 void deleteBookmarkTool(
int first,
int last);
187 void setBookmarkToolVisibility(
bool vis);
191 bool getBookmarkToolVisibility()
const;
200 void setCanvasesButCurrent(
bool enable);
204 void setAllCanvases(
bool enable);
210 void editCanvasOffset(
const osg::Vec3f& translate,
cher::EVENT event);
211 void editCanvasRotate(
const osg::Quat& rotation,
const osg::Vec3f& center3d,
cher::EVENT event);
212 void editCanvasClone(
const osg::Vec3f& translate,
cher::EVENT event);
213 void editCanvasSeparate(
const osg::Vec3f& translate,
cher::EVENT event);
222 void editStrokesPush(osg::Camera *camera);
223 void editStrokesMove(
double u,
double v,
cher::EVENT event);
224 void editStrokesScale(
double u,
double v,
cher::EVENT event);
225 void editStrokesRotate(
double u,
double v,
cher::EVENT event);
232 void pasteFromBuffer();
234 const std::vector< osg::ref_ptr<entity::Entity2D> >& getBuffer()
const;
252 osg::ref_ptr<entity::UserScene> m_userScene;
253 osg::ref_ptr<entity::AxisGlobalTool> m_axisTool;
254 osg::ref_ptr<osg::Group> m_bookmarkTools;
255 std::vector< osg::ref_ptr<entity::Entity2D> > m_buffer;
256 QUndoStack* m_undoStack;
258 bool m_visibilityBookmarkTool;
A proxy class that helps to connect scene graph camera positions (in format eye, center, up and name) with the corresponding BookmarkWidget.
Definition: Bookmarks.h:48
Scene graph entities.
Definition: AddEntityCommand.h:17
EVENT
Definition: Settings.h:160
Geometry class that defined strokes entered by a user. The creation and usage of this class must be f...
Definition: Stroke.h:62
Contains all the entities that will appear on the scene: both user scene and utility entities (i...
Definition: RootScene.h:46
Geometry class that defines opacity polygons drawn by a user. The creation and usage of this class mu...
Definition: Polygon.h:47
The UserScene class contains scene graph that was created by user, including the construction tools...
Definition: UserScene.h:86
Definition: Entity2D.h:13
Settings is a configuration variables file for Cherish: enums, consts, defaults. Contains settings su...
Quad that uses texture to represent a 2D photo in 3D space.
Definition: Photo.h:22
A convinience class that inherits full functionality of osg::Group except the methods that allow dire...
Definition: ProtectedGroup.h:17
Contains QUndoCommand - based classes that are defined within undo/redo framework. All these classes are made friend classes for entity::UserScene (protected) so that to access add and remove entity functionality.
A class to describe the current state of the scene, e.g., state of switches.
Definition: SceneState.h:29
Definition: CamPoseData.h:21