|
cherish
|
Contains all the entities that will appear on the scene: both user scene and utility entities (i.e. global axis). More...
#include <RootScene.h>
Public Member Functions | |
| RootScene (QUndoStack *undoStack) | |
| entity::UserScene * | getUserScene () const |
| QUndoStack * | getUndoStack () const |
| void | setFilePath (const std::string &name) |
| bool | isSetFilePath () const |
| bool | isSavedToFile () const |
| void | setSavedToFile (bool saved) |
| bool | isEmptyScene () const |
| void | clearUserData () |
| void | setToolsVisibility (bool vis) |
| bool | getToolsVisibility () const |
| void | setAxesVisibility (bool vis) |
| bool | getAxesVisibility () const |
| void | setCanvasVisibilityAll (entity::Canvas *canvas, bool vis) |
| bool | getCanvasVisibilityAll (entity::Canvas *canvas) const |
| bool | writeScenetoFile () |
| bool | exportSceneToFile (const std::string &name) |
| bool | loadSceneFromFile () |
| int | getStrokeLevel () const |
| int | getCanvasLevel () const |
| int | getPhotoLevel () const |
| void | addCanvas (const osg::Matrix &R, const osg::Matrix &T) |
| void | addCanvas (const osg::Vec3f &normal, const osg::Vec3f ¢er) |
| void | addCanvas (const osg::Matrix &R, const osg::Matrix &T, const std::string &name) |
| void | addStroke (float u, float v, cher::EVENT event) |
| void | addPolygon (float u, float v, cher::EVENT event) |
| void | addLineSegment (float u, float v, cher::EVENT event) |
| void | selectAllEntities () |
| void | addPhoto (const std::string &fname) |
| void | addBookmark (BookmarkWidget *widget, const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up, const double &fov) |
| bool | addSVMData () |
| bool | addPhotoScaleData () |
| bool | hidePhotoScaleData () |
| bool | removePhotoScaleData () |
| const entity::SVMData * | getPhotoScaleData () const |
| bool | addCamPoseData () |
| void | hideAndUpdateSVMData () |
| void | hideAndUpdateCamPoseData () |
| entity::SVMData * | getSVMDataCurrent () const |
| entity::CamPoseData * | getCamPoseDataCurrent () const |
| void | addBookmarkTool (const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up) |
| void | updateBookmark (BookmarkWidget *widget, int row) |
| void | deleteBookmark (BookmarkWidget *widget, const QModelIndex &index) |
| void | deleteBookmarkTool (int first, int last) |
| void | resetBookmarks (BookmarkWidget *widget) |
| void | setBookmarkToolVisibility (bool vis) |
| bool | getBookmarkToolVisibility () const |
| void | eraseStroke (entity::Stroke *stroke, int first, int last, cher::EVENT event) |
| bool | setCanvasCurrent (entity::Canvas *cnv) |
| bool | setCanvasPrevious (entity::Canvas *cnv) |
| void | setCanvasesButCurrent (bool enable) |
| void | setAllCanvases (bool enable) |
| entity::Canvas * | getCanvasCurrent () const |
| entity::Canvas * | getCanvasPrevious () const |
| entity::Bookmarks * | getBookmarksModel () const |
| void | editCanvasOffset (const osg::Vec3f &translate, cher::EVENT event) |
| void | editCanvasRotate (const osg::Quat &rotation, const osg::Vec3f ¢er3d, cher::EVENT event) |
| void | editCanvasClone (const osg::Vec3f &translate, cher::EVENT event) |
| void | editCanvasSeparate (const osg::Vec3f &translate, cher::EVENT event) |
| void | editCanvasDelete (entity::Canvas *canvas) |
| void | editPhotoDelete (entity::Photo *photo, entity::Canvas *canvas) |
| void | editPhotoPush (entity::Photo *photo, entity::Canvas *source, entity::Canvas *destination) |
| void | editPolygonDelete (entity::Polygon *poly, entity::Canvas *canvas) |
| void | editStrokesPush (osg::Camera *camera) |
| void | editStrokesMove (double u, double v, cher::EVENT event) |
| void | editStrokesScale (double u, double v, cher::EVENT event) |
| void | editStrokesRotate (double u, double v, cher::EVENT event) |
| void | editStrokeDelete (entity::Stroke *stroke) |
| void | editEntity2DDelete (entity::Entity2D *entity) |
| void | copyToBuffer () |
| void | cutToBuffer () |
| void | pasteFromBuffer () |
| const std::vector< osg::ref_ptr< entity::Entity2D > > & | getBuffer () const |
| entity::SceneState * | createSceneState () const |
| bool | setSceneState (const entity::SceneState *state) |
| entity::BookmarkTool * | getBookmarkTool (int index) |
Public Member Functions inherited from osg::ProtectedGroup | |
| ProtectedGroup (const ProtectedGroup &group, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Contains all the entities that will appear on the scene: both user scene and utility entities (i.e. global axis).
This class also represents an intersface for entity::UserScene.
| RootScene::RootScene | ( | QUndoStack * | undoStack | ) |
Constructor: initializes structure of entity::UserScene, initializes global tools.
| void RootScene::addBookmark | ( | BookmarkWidget * | widget, |
| const osg::Vec3d & | eye, | ||
| const osg::Vec3d & | center, | ||
| const osg::Vec3d & | up, | ||
| const double & | fov | ||
| ) |
A method to add a new camera position as a bookmark to the BookmarkWidget, and also to the scene graph as entity::SceneState.
| void RootScene::addCanvas | ( | const osg::Matrix & | R, |
| const osg::Matrix & | T | ||
| ) |
A method to add new canvas to scene with provided rotation and translation matrices.
| void RootScene::addCanvas | ( | const osg::Vec3f & | normal, |
| const osg::Vec3f & | center | ||
| ) |
A method to add new canvas to scene with provided normal and center point.
| void RootScene::addCanvas | ( | const osg::Matrix & | R, |
| const osg::Matrix & | T, | ||
| const std::string & | name | ||
| ) |
A method to add canvas to scene with provided rotation and translation matrices, as well as a name.
| void RootScene::addLineSegment | ( | float | u, |
| float | v, | ||
| cher::EVENT | event | ||
| ) |
Add line segment point given local coordinates.
| void RootScene::addPhoto | ( | const std::string & | fname | ) |
A method to add specified photo to the current canvas.
| bool RootScene::addPhotoScaleData | ( | ) |
| void RootScene::addPolygon | ( | float | u, |
| float | v, | ||
| cher::EVENT | event | ||
| ) |
A method to add/contribute to a polygon given local coordinates.
| void RootScene::addStroke | ( | float | u, |
| float | v, | ||
| cher::EVENT | event | ||
| ) |
A method to add/contribute to a stroke given local coordinates.
| bool RootScene::addSVMData | ( | ) |
A method to suplement a last added entity::SceneState with entity::SVMData as a child. Used to create a new bookmark using correspondence between four points in two different planes This method requires presense of at least two canvases on the screen.
| void RootScene::clearUserData | ( | ) |
A method to make the scene empty.
| entity::SceneState * RootScene::createSceneState | ( | ) | const |
| void RootScene::editPolygonDelete | ( | entity::Polygon * | poly, |
| entity::Canvas * | canvas | ||
| ) |
A method to remove a given polygon from the canvas; called from EventHandler.
| bool RootScene::exportSceneToFile | ( | const std::string & | name | ) |
A method to export the user scene to OBJ or 3DS format. It uses Parallel Transport Frame algorithm in order to convert shadered strokes into triangular meshes.
| bool RootScene::getAxesVisibility | ( | ) | const |
| entity::BookmarkTool * RootScene::getBookmarkTool | ( | int | index | ) |
A method to obtain a bookmark tool associated with the entity::Bookmarks.
| index | is the tool index associated with the bookmark data. |
| bool RootScene::getBookmarkToolVisibility | ( | ) | const |
| entity::CamPoseData * RootScene::getCamPoseDataCurrent | ( | ) | const |
A method to obtain a pointer on campose data that is in the state of editing by user. If no such data available, return 0.
| int RootScene::getCanvasLevel | ( | ) | const |
| bool RootScene::getCanvasVisibilityAll | ( | entity::Canvas * | canvas | ) | const |
| int RootScene::getPhotoLevel | ( | ) | const |
| const entity::SVMData * RootScene::getPhotoScaleData | ( | ) | const |
| int RootScene::getStrokeLevel | ( | ) | const |
| entity::SVMData * RootScene::getSVMDataCurrent | ( | ) | const |
A method to obtain a pointer on SVMData that is in the state of editing by user. If no such data available, return NULL.
| bool RootScene::getToolsVisibility | ( | ) | const |
| QUndoStack * RootScene::getUndoStack | ( | ) | const |
| entity::UserScene * RootScene::getUserScene | ( | ) | const |
| void RootScene::hideAndUpdateCamPoseData | ( | ) |
A method to hide all the visible CamPoseData from scene.
| void RootScene::hideAndUpdateSVMData | ( | ) |
A method to hide all the visible SVMData from scene.
| bool RootScene::hidePhotoScaleData | ( | ) |
| bool RootScene::isEmptyScene | ( | ) | const |
| bool RootScene::isSavedToFile | ( | ) | const |
| bool RootScene::isSetFilePath | ( | ) | const |
| bool RootScene::loadSceneFromFile | ( | ) |
| bool RootScene::removePhotoScaleData | ( | ) |
| void RootScene::resetBookmarks | ( | BookmarkWidget * | widget | ) |
A method which is called when a file is opened. It resets the screenshot bookmarks.
| widget | is a pointer on bookmark widget (member of MainWindow). |
| void RootScene::selectAllEntities | ( | ) |
A method to select all strokes of the current canvas.
| void RootScene::setAllCanvases | ( | bool | enable | ) |
A method to set up traversal masks for all the canvases.
| void RootScene::setAxesVisibility | ( | bool | vis | ) |
A method to make the global axis tool to hide or appear.
| void RootScene::setBookmarkToolVisibility | ( | bool | vis | ) |
A method to set visibility of all the bookmarks tools. The visibility cannot be set for individual bookmarks tool, only for the whole group.
| vis | is the visibility flag: true for visibile and false for invisible state. |
| void RootScene::setCanvasesButCurrent | ( | bool | enable | ) |
A method to set up traversal masks for all the canvases but current.
| void RootScene::setCanvasVisibilityAll | ( | entity::Canvas * | canvas, |
| bool | vis | ||
| ) |
A method to set up canvas visibility for both scene graph and GUI.
| void RootScene::setFilePath | ( | const std::string & | name | ) |
A method to attach current scene graph to a specified file name where the scene will be kept on disk.
| void RootScene::setSavedToFile | ( | bool | saved | ) |
Method is only used by testers. Not to be used otherwise.
| bool RootScene::setSceneState | ( | const entity::SceneState * | state | ) |
| A | pointer on SceneState instance which is served as a source for RootScene settings. |
| void RootScene::setToolsVisibility | ( | bool | vis | ) |
A method to make all the tools hide or appear.
| bool RootScene::writeScenetoFile | ( | ) |
A method to write the user scene to file.
1.8.12