ui::ParticlePreview Class Reference

#include <ParticlePreview.h>

Public Member Functions

 ParticlePreview ()
 ~ParticlePreview ()
void setSize (int size)
void initialisePreview ()
void setParticle (scripts::IParticlePtr &particle)
scripts::IParticlePtr getParticle ()
 operator GtkWidget * ()

Static Private Member Functions

static void callbackGLDraw (GtkWidget *, GdkEventExpose *, ParticlePreview *)
static void callbackGLMotion (GtkWidget *, GdkEventMotion *, ParticlePreview *)
static void callbackGLScroll (GtkWidget *, GdkEventScroll *, ParticlePreview *)
static void callbackToggleBBox (GtkToggleToolButton *, ParticlePreview *)

Private Attributes

GtkWidget_widget
GtkWidget_glWidget
GLfloat _camDist
Matrix4 _rotation
scripts::IParticlePtr _particle

Detailed Description

Preview widget for a particle. This class encapsulates the GTK widgets to render a specified particle using OpenGL, and return a single GTK widget to be packed into the parent window.

Definition at line 17 of file ParticlePreview.h.


Constructor & Destructor Documentation

ui::ParticlePreview::ParticlePreview (  ) 

Construct a ParticlePreview widget.

ui::ParticlePreview::~ParticlePreview (  ) 

Destructor for destroying loaded models


Member Function Documentation

static void ui::ParticlePreview::callbackGLDraw ( GtkWidget ,
GdkEventExpose ,
ParticlePreview  
) [static, private]
static void ui::ParticlePreview::callbackGLMotion ( GtkWidget ,
GdkEventMotion *  ,
ParticlePreview  
) [static, private]
static void ui::ParticlePreview::callbackGLScroll ( GtkWidget ,
GdkEventScroll *  ,
ParticlePreview  
) [static, private]
static void ui::ParticlePreview::callbackToggleBBox ( GtkToggleToolButton *  ,
ParticlePreview  
) [static, private]
scripts::IParticlePtr ui::ParticlePreview::getParticle (  ) 
void ui::ParticlePreview::initialisePreview (  ) 

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

ui::ParticlePreview::operator GtkWidget * (  )  [inline]

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

Definition at line 70 of file ParticlePreview.h.

References _widget.

void ui::ParticlePreview::setParticle ( scripts::IParticlePtr particle  ) 
void ui::ParticlePreview::setSize ( int  size  ) 

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

Parameters:
size The pixel size of the square widget.

Field Documentation

GLfloat ui::ParticlePreview::_camDist [private]

Definition at line 26 of file ParticlePreview.h.

Definition at line 23 of file ParticlePreview.h.

Definition at line 31 of file ParticlePreview.h.

Matrix4 ui::ParticlePreview::_rotation [private]

Definition at line 29 of file ParticlePreview.h.

Definition at line 20 of file ParticlePreview.h.

Referenced by operator GtkWidget *().


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

Generated by  doxygen 1.6.2