golib  0.5
goGUI::SceneView Class Reference

Scene view widget, showing a goGL::Scene. More...

#include <sceneview.h>

Public Member Functions

void loadOFF (const char *filename)
 Load an OFF into the scene. More...
 
virtual void glDraw ()
 Sets the camera width/height to this widget's size and calls goGL::Scene::render().
 
void setRadius (goFloat)
 Set radius of the sphere around the origin at which the camera resides. More...
 
void setSphericalPosition (const goVectorf &phiThetaRadius)
 Set the spherical position of the camera. More...
 
void setView (const goVectorf &position, const goVectorf &up, const goVectorf &focus)
 Set the camera position. More...
 
const goVectorfgetSphericalPosition () const
 Get the spherical position of the camera around the scene. More...
 
void setLight (const goGL::Light &light)
 Set the light GL_LIGHT0. More...
 
void setScene (goAutoPtr< goGL::Scene > s)
 Set the scene. More...
 
goAutoPtr< goGL::ScenegetScene ()
 Get goAutoPtr to the scene. More...
 
void setActiveObject (goIndex_t i)
 
sigc::signal< void > & signalChanged ()
 
sigc::signal< void > & signalChangedFinal ()
 
sigc::signal< void > & signalRotated ()
 
bool motionSlot (GdkEventMotion *e)
 
bool buttonSlot (GdkEventButton *e)
 
- Public Member Functions inherited from goGUI::GLWidget
void GLWidgetBegin ()
 
void GLWidgetEnd ()
 
void swapBuffers ()
 Can only be called between GLWidgetBegin and ...End.
 
const goVectorfgetRotationStart () const
 2-Vector, mouse position last rotation start More...
 
const goVectorfgetRotationEnd () const
 2-Vector, mouse position last rotation end More...
 
bool renderSlot (const Glib::RefPtr< Gdk::GLContext > &context)
 
bool exposeSlot (GdkEventExpose *e)
 
bool motionSlot (GdkEventMotion *e)
 
bool buttonSlot (GdkEventButton *e)
 

Detailed Description

Scene view widget, showing a goGL::Scene.

Member Function Documentation

◆ getScene()

goAutoPtr< goGL::Scene > goGUI::SceneView::getScene ( )

Get goAutoPtr to the scene.

Returns

◆ getSphericalPosition()

const goVectorf & goGUI::SceneView::getSphericalPosition ( ) const

Get the spherical position of the camera around the scene.

This is a remnant from OFFView – keep it or not?

Returns
Vector containing the phi,theta pair.

◆ loadOFF()

void goGUI::SceneView::loadOFF ( const char *  filename)

Load an OFF into the scene.

Todo:
This is a little misplaced here — move it to SceneControl.
Parameters
filename

◆ setLight()

void goGUI::SceneView::setLight ( const goGL::Light light)

Set the light GL_LIGHT0.

Todo:
Remove — the lights are all stored in the scene.
Parameters
light

◆ setRadius()

void goGUI::SceneView::setRadius ( goFloat  r)

Set radius of the sphere around the origin at which the camera resides.

This is a remnant from OFFView – keep it or not?

Parameters
r

◆ setScene()

void goGUI::SceneView::setScene ( goAutoPtr< goGL::Scene s)

Set the scene.

Parameters
sThe scene. It is not copied, the same pointer is used.

◆ setSphericalPosition()

void goGUI::SceneView::setSphericalPosition ( const goVectorf r)

Set the spherical position of the camera.

This is a remnant from OFFView – keep it or not?

Parameters
r

◆ setView()

void goGUI::SceneView::setView ( const goVectorf position,
const goVectorf up,
const goVectorf focus 
)

Set the camera position.

This is a remnant from OFFView – keep it or not?

Parameters
positionPosition of the camera
upUp vector
focusPoint the camera looks at.

The documentation for this class was generated from the following files: