CLASSIFIER : Viewer
uid: class-CVEViewer-CVEViewer-MetaModel@g-scop.grenoble-inp.fr
About
Abstract
A viewer instance describes how to visualise and also how to interact with a 3D Scene.
- The viewer visualises a hierarchy of graphic nodes called grnodes.
- A space refers to bookmarks to specific graphic nodes enabling to reconfigure the scene by relocating the spaces.
- The viewer also identifies observers and selectors. Observers survey incoming events. And a selector may react to an observation to trigger an event.
- The selector is also associated to an avatar.
Class Diagram
Attributes table
attribute | type | cardinality |
---|---|---|
__call__ | vstring | [1,1] |
__debug__ | vboolean | [1,1] |
__startup__ | vstring | [1,1] |
frequency | vreal | [1,1] |
sleep | vboolean | [1,1] |
quit | vboolean | [1,1] |
title | vstring | [1,1] |
application | vstring | [1,1] |
configuration | vstring | [1,1] |
size | vvector | [1,1] |
space | Space | [0,-1] |
scene-camera | GRNODE | [1,1] |
scene-left | GRNODE | [1,1] |
scene-right | GRNODE | [1,1] |
scene-top | GRNODE | [1,1] |
scene-bottom | GRNODE | [1,1] |
scene-origin | GRNODE | [1,1] |
scene-front | GRNODE | [1,1] |
main-menu | GRNODE | [1,1] |
objects | GRNODE | [0,-1] |
configuration-cave | vboolean | [1,1] |
configuration-hmd | vboolean | [1,1] |
fullscreen | vboolean | [1,1] |
3D Mode | 3DMode | [1,1] |
camera | Camera | [1,1] |
light | Light | [0,-1] |
camera-list | Camera | [0,-1] |
driven-timeout | vreal | [1,1] |
interaction-mode | Interaction Mode | [1,1] |
interaction-actor | vboolean | [1,1] |
interaction | vboolean | [1,1] |
NPressed | vboolean | [1,1] |
key-pressed | vstring | [1,1] |
edit-text | GR3DTEXT | [0,1] |
edit-cursor | vint | [1,1] |
screenshot | vfile | [1,1] |
camera-tracker | CameraTracker | [0,1] |
file-selector | GRFileSelector | [1,1] |
selectors | Selector | [0,-1] |
observers | Observer | [0,-1] |
trackball | vboolean | [1,1] |
physics | Physics | [0,-1] |
background | vcolor | [1,1] |
background-texture | TEXTURE | [0,1] |
background-texture-use | vboolean | [1,1] |
panorama-texture | TEXTURE | [0,1] |
panorama-use | vboolean | [1,1] |
skybox | SkyBox | [0,1] |
skybox-use | vboolean | [1,1] |
Methods
-
add_object(self,..) : Add an object (graphical node) at the main frame of the viewer < node : the graphical node to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
-
remove_object(self,..) : Remove an object (graphical node) from the main frame of the viewer < node : the graphical node to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
-
get_objects(self,..) : Get the list of top objects return a list of graphic nodes
-
buffer_add(self,..) : Add an object (graphical node) at the main from the main transfer buffer < node : the graphical node to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
-
buffer_move_children(self,..) : Add an object (graphical node) at the main from the main transfer buffer < node : the graphical node to move < father : new father of the node
-
buffer_move(self,..) : Add an object (graphical node) at the main from the main transfer buffer < node : the graphical node to move < father : new father of the node
-
buffer_remove(self,..) : Remove an object (graphical node) from the main transfer buffer < node : the graphical node to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
- add_selector(self,..) : add a selector to the viewer
- get_selectors(self,..) : get the viewer selectors
- remove_selector(self,..) : remove a selector from the viewer
- add_observer(self,..) : add an observer to the viewer
- get_observers(self,..) : get the list of observers
- remove_observer(self,..) : remove an observer from the viewer
-
save_scene(self,..) : Save just the scene objects. < FileName : the file name without extension “-grnode.cve” will be appended
-
save(self,..) : Save the viewer itself. < FileName : the file name without extension “-viewer.cve” will be appended
-
set_3D_mode(self,..) :
< mode = 'Cyclope', 'Stereoscopy' , 'Anagliph' , 'Intralaced', 'Left Eye only', 'Right Eye only', 'Dresden', 'Red/Blue', 'Side By Side Left Right', 'Side By Side Top Down'
- edit_text_field(self,..) : focuss keyboard input towards a textfield < textfield : the text node to be edited Escape key switch this mode off automatically
- add_space(self,..) :
-
get_spaces(self,..) : Get the dictionary of spaces return DS[label]=node
-
get_space(self,..) : Get the list of top objects return a list of graphic nodes
- move_space(self,..) :
-
reattach_object(self,..) :
change object attachment. It is equivalent to unattach and attach again to a new father but it is made in a single step and is more efficient. Does not need to recompile the scene obj : object to reattach father : new father : None it will be attached as a root object transform : new relative position : identity if transform in None use_reattach : more efficient but not stable when object if moved from a viewer to a second one
- get_scene_origin(self,..) : get the node at the origin of the scene space
- get_top_origin(self,..) : get the node at the origin of the top view space
- get_bottom_origin(self,..) : get the node at the origin of the bottom space
- get_left_origin(self,..) : get the node at the origin of the left space
- get_right_origin(self,..) : get the node at the origin of the right space
- get_camera(self,..) :
- get_camera_origin(self,..) : get the node at the origin of camera position
-
get_camera_state(self,..) : provides the transform state of the camera and makes the scene camera fit this state
-
screenshot(self,..) : screenshot of the current viewer < filename : the name of a png file where the screenshot will be recorded The file is saved where the reviewer was launched
-
set_cursor_mode(self,..) :
change the cursor behavior < mode 1 : makes the cursor visible and behaving normally. (The default) 0 : makes the cursor invisible when it is over the client area of the window but does not restrict the cursor from leaving. -1 : hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera controls.
-
set_cursor_position(self,..) : set the cursor position < px E [-1,1] on horizontal axis from left to right < py E [-1,1] on vertical axis from bottom to top
-
set_cursor_cross_hair(self,..) :
change the cursor behavior < boolean True switch to crosshair, False standard cursor arrow
- get_size(self,..) :
-
add_physics_engine(self,..) : Add a physics engine < phys : the engne to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
-
remove_physics_engine(self,..) : Remove a physics engine from the viewer < node : the physics engine to add < newitem : boolean True if the object was not referred yet in the cve model otherwise False
- notification(self,..) :
- notification_show(self,..) :
- notification_delay(self,..) :