ui::MapPreview Class Reference

#include <MapPreview.h>

Public Member Functions

 MapPreview ()
 ~MapPreview ()
void setSize (int size)
void initialisePreview ()
 operator GtkWidget * ()
void setRootNode (scene::Node *root)
scene::Node * getRootNode ()
void draw ()

Static Private Member Functions

static float getRadius (scene::Node *root)
static void onExpose (GtkWidget *, GdkEventExpose *, MapPreview *)
static void onMouseMotion (GtkWidget *, GdkEventMotion *, MapPreview *)
static void onMouseScroll (GtkWidget *, GdkEventScroll *, MapPreview *)

Private Attributes

GtkWidget_widget
GtkWidget_glWidget
GLfloat _camDist
Matrix4 _rotation
scene::Node * _root
Shader * _stateSelect1
Shader * _stateSelect2

Detailed Description

greebo: This is a preview widget similar to the ui::ModelPreview class, providing a GL render preview of a given root node.

It comes with a Filters Menu included. Use the GtkWidget* operator to retrieve the widget for packing into a parent container.

Use the setRootNode() method to specify the subgraph to preview.

Definition at line 23 of file MapPreview.h.


Constructor & Destructor Documentation

ui::MapPreview::MapPreview (  ) 
ui::MapPreview::~MapPreview (  ) 

Member Function Documentation

void ui::MapPreview::draw (  ) 
static float ui::MapPreview::getRadius ( scene::Node *  root  )  [static, private]
scene::Node* ui::MapPreview::getRootNode (  ) 
void ui::MapPreview::initialisePreview (  ) 

Initialise the GL preview. This clears the window and sets up the initial matrices and lights.

static void ui::MapPreview::onExpose ( GtkWidget ,
GdkEventExpose ,
MapPreview  
) [static, private]
static void ui::MapPreview::onMouseMotion ( GtkWidget ,
GdkEventMotion *  ,
MapPreview  
) [static, private]
static void ui::MapPreview::onMouseScroll ( GtkWidget ,
GdkEventScroll *  ,
MapPreview  
) [static, private]
ui::MapPreview::operator GtkWidget * (  )  [inline]

Operator cast to GtkWidget*, for packing into the parent window.

Definition at line 69 of file MapPreview.h.

References _widget.

void ui::MapPreview::setRootNode ( scene::Node *  root  ) 
void ui::MapPreview::setSize ( int  size  ) 

Set the pixel size of the MapPreviewCam widget. The widget is always square.

Parameters:
size The pixel size of the square widget.

Field Documentation

GLfloat ui::MapPreview::_camDist [private]

Definition at line 32 of file MapPreview.h.

Definition at line 29 of file MapPreview.h.

scene::Node* ui::MapPreview::_root [private]

Definition at line 38 of file MapPreview.h.

Matrix4 ui::MapPreview::_rotation [private]

Definition at line 35 of file MapPreview.h.

Shader* ui::MapPreview::_stateSelect1 [private]

Definition at line 40 of file MapPreview.h.

Shader* ui::MapPreview::_stateSelect2 [private]

Definition at line 41 of file MapPreview.h.

Definition at line 26 of file MapPreview.h.

Referenced by operator GtkWidget *().


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

Generated by  doxygen 1.6.2