Basic OpenGL viewing window.
Inheritance:
Viewer
Public Fields
-
SpaceEntity camera
- This is the object which specifies position, lookat and up orientation of the GL camera (via a gluLookat call within updategl).
-
Vector3 gl_light_pos
- Specifies the light position.
-
Gtk::HBox upper_hbox
- One of two containers in which additional widgets can be inserted afterwards.
-
Gtk::HBox lower_hbox
- One of two containers in which additional widgets can be inserted afterwards.
-
SigC::Signal0<void> gl_changed_event
- This signal will be emmitted whenever the gl stats have changed.
Public Methods
-
Viewer(const char* name)
- Constructor.
-
void initgl()
- This method initializes the Viewer specific GL environment.
-
void updategl()
- Updates all the gl stats like gluLookat.
-
gint drawgl()
- Draws the GL content.
-
virtual gint init_gl_context_imp()
- Virtual method which is called within initgl.
-
virtual gint draw_gl_context_imp()
- Within this virtual method all drawing calls are processed.
-
gint gl_expose_handler(GdkEventExpose* expose)
- This handling method is called when ever an expose event occurs, eg when the mouse enters the window (?)
-
gint gl_configure_handler(GdkEventConfigure* configure)
- Another handling method.
-
void gl_realize_handler()
- Is called once when the window is realized (eg.
-
virtual gint gl_motion_notify_handler_imp(GdkEventMotion* event)
- Virtual method which handels mouse motion.
-
virtual gint gl_button_press_handler_imp(GdkEventButton* event)
- Virtual method which handels mouse clicks.
-
virtual gint gl_button_release_handler_imp(GdkEventButton* event)
- Virtual method which handels mouse clicks.
-
int set_light(Vector3 pos)
- Change the light position.
Documentation
Basic OpenGL viewing window.
The Viewer consists of an ViewerDisplay object nested within a single window.
Mouse events like clicking and moving are handled within appropiate methods,
which enables the user to rotate the scene and zoom in and out.
No content is drawn yet. The Viewer is meant to inherit to another Class
where then GL content can be specified by overriding the virtual method
draw_gl_context_imp. The mouse handling methods can also be overriden.
Finally there are public Gtk container members to insert additional widgets
afterwards.
- Viewer(const char* name)
- Constructor.
Argument is a string which labels the Viewer window.
- void initgl()
- This method initializes the Viewer specific GL environment. It is called
within the constructor. Right now there is no need to call this method
otherwise.
- void updategl()
- Updates all the gl stats like gluLookat. It is called whenever the camera
stats have changed, for example.
- gint drawgl()
- Draws the GL content. Calls draw_gl_context_imp. Whenever the content or
the camera stats have changed, drawgl is called.
- virtual gint init_gl_context_imp()
- Virtual method which is called within initgl. It can be overriden to
initialize some gl content like display lists.
- virtual gint draw_gl_context_imp()
- Within this virtual method all drawing calls are processed. The GL content
is specified here. drawgl must be called to do the actual drawing!
- gint gl_expose_handler(GdkEventExpose* expose)
- This handling method is called when ever an expose event occurs, eg when
the mouse enters the window (?)
- gint gl_configure_handler(GdkEventConfigure* configure)
- Another handling method. It is called when the window is resized.
- void gl_realize_handler()
- Is called once when the window is realized (eg. by a show() call).
- virtual gint gl_motion_notify_handler_imp(GdkEventMotion* event)
- Virtual method which handels mouse motion. Contains the standard Viewer
mouse control. Override to realize alternative mouse control.
- virtual gint gl_button_press_handler_imp(GdkEventButton* event)
- Virtual method which handels mouse clicks. Contains the standard Viewer
mouse control. Override to realize alternative mouse control.
- virtual gint gl_button_release_handler_imp(GdkEventButton* event)
- Virtual method which handels mouse clicks. Contains the standard Viewer
mouse control. Override to realize alternative mouse control.
- SpaceEntity camera
- This is the object which specifies position, lookat and up orientation
of the GL camera (via a gluLookat call within updategl).
- Vector3 gl_light_pos
- Specifies the light position.
- int set_light(Vector3 pos)
- Change the light position.
- Gtk::HBox upper_hbox
- One of two containers in which additional widgets can be inserted
afterwards. This one is located above the GL widget.
- Gtk::HBox lower_hbox
- One of two containers in which additional widgets can be inserted
afterwards. This one is located beneath the GL widget.
- SigC::Signal0<void> gl_changed_event
- This signal will be emmitted whenever the gl stats have changed. It can be
used to monitor the camera stats in other objects.
- Direct child classes:
- GenericViewer
Alphabetic index Hierarchy of classes
This page was generated with the help of DOC++.