\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.2 - Three
Scene Class Reference

#include </home/cgal-testsuite/cgal_doc_build/CGAL-5.0.2-I-206/demo/Polyhedron/Scene.h>

Inherits from

QStandardItemModel, CGAL::Three::Scene_interface, and CGAL::Three::Scene_draw_interface.

Definition

This class is not supposed to be used by Plugins, but sometimes you may need access to peculiar signals or slots.

Public Slots

void setExpanded (QModelIndex)
 Specifies a group as Expanded for the Geometric Objects view.
 
void setCollapsed (QModelIndex)
 Specifies a group as Collapsed for the Geometric Objects view.
 
void itemChanged ()
 Transmits a CGAL::Three::Scene_item::itemChanged() signal to the scene.
 
void itemVisibilityChanged ()
 Transmits a CGAL::Three::Scene_item::itemVisibilityChanged() signal to the scene.
 
void remove_item_from_groups (CGAL::Three::Scene_item *item)
 Removes item from all the groups of the scene.
 
void redraw_model ()
 Re-organizes the sceneView.
 
void setSelectedItemIndex (int i)
 Sets the selected item to the target index. More...
 
void setSelectedItem (CGAL::Three::Scene_item *item_to_select)
 Does the same as setSelectedItem(int)
 
QList< int > setSelectedItemsList (QList< int > l)
 Sets the target list of indices as the selected indices.
 
void setItemVisible (int, bool b)
 Sets the item at index i to visible or not visible.
 
void setItemA (int i)
 Sets the item_A as the item at index i .
 
void setItemB (int i)
 Sets the item_B as the item at index i .
 

Signals

void indexErased (Scene_interface::Item_id id)
 Is emitted when the ids of the items are changed.
 
void itemPicked (const QModelIndex &modelindex)
 Emit this to mark modelindex as selected in the Geometric Objects view.
 
void newItem (int)
 Is emitted when a new item is added to the scene.
 
void updated_bbox (bool b)
 Emit this to re-compute the viewer's Bbox; If b is true, the scene will be recentered.
 
void updated ()
 Emit this to redraw the scene.
 
void itemAboutToBeDestroyed (CGAL::Three::Scene_item *item)
 Is emitted when item is erased.
 
void selectionRay (double, double, double, double, double, double)
 Is emitted when the selection ray is changed.
 
void selectionChanged (int i)
 Used to update the selected item in the Geometric Objects view.
 
void selectionChanged (QList< int > is)
 Used to update the selected items in the Geometric Objects view.
 
void itemIndexSelected (int i)
 Used when you don't want to update the selectedItem in the Geometric Objects view.
 
void restoreCollapsedState ()
 Emit this to reset the collapsed state of all groups after the Geometric Objects view has been redrawn.
 
void drawFinished ()
 Is emitted when draw() is finished.
 

Public Member Functions

void updatePrimitiveIds (Scene_item *item) Q_DECL_OVERRIDE
 Re-computes the primitiveIds for item
 
- Public Member Functions inherited from CGAL::Three::Scene_interface
virtual void itemChanged (Item_id i)=0
 Updates the information about the ith item in the Geometric Objects list and redraws the scene. More...
 
virtual void itemChanged (CGAL::Three::Scene_item *item)=0
 Updates the information about item in the Geometric Objects list and redraws the scene. More...
 
virtual void itemVisibilityChanged (CGAL::Three::Scene_item *)=0
 Re computes the scene Bbox without recentering it.
 
virtual void setSelectedItem (Item_id)=0
 Clears the current selection then sets the selected item to the target index. More...
 
virtual void allItemsChanged ()=0
 Updates all the items in the SceneView.
 
CGAL::Three::Scene_itemselectedItem () const
 

Additional Inherited Members

- Public Types inherited from CGAL::Three::Scene_interface
typedef CGAL::Bbox_3 Bbox
 A bounding box is a box with each face corresponding to an extremum of its contents.
 
typedef int Item_id
 Integer used as the index of a Scene_item. More...
 

Member Function Documentation

◆ selectedItem()

CGAL::Three::Scene_item* Scene::selectedItem ( ) const

◆ setSelectedItemIndex

void Scene::setSelectedItemIndex ( int  i)
slot

Sets the selected item to the target index.

Emits a signal to notify that a new item is now selected, but does not update the Geometric Objects view. Used in intern and by the mainwindow