$search
#include <wx_ogre_render_window.h>
Public Member Functions | |
virtual void | createRenderWindow () |
virtual wxSize | DoGetBestSize () const |
virtual std::string | getOgreHandle () const |
Ogre::RenderWindow * | getRenderWindow () const |
Ogre::Viewport * | getViewport () const |
void | setAutoRender (bool auto_render) |
void | setCamera (Ogre::Camera *camera) |
void | setOrthoScale (float scale) |
Set the scale of the orthographic window. Only valid for an orthographic camera. | |
virtual void | setPostRenderCallback (boost::function< void()> func) |
virtual void | setPreRenderCallback (boost::function< void()> func) |
wxOgreRenderWindow (Ogre::Root *ogre_root, wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSUNKEN_BORDER, const wxValidator &validator=wxDefaultValidator, bool create_render_window=true) | |
virtual | ~wxOgreRenderWindow () |
Protected Member Functions | |
virtual void | onMouseEvents (wxMouseEvent &evt) |
virtual void | onMove (wxMoveEvent &evt) |
virtual void | onPaint (wxPaintEvent &evt) |
virtual void | onSize (wxSizeEvent &evt) |
virtual bool | Reparent (wxWindowBase *new_parent) |
void | setCameraAspectRatio () |
Protected Attributes | |
bool | auto_render_ |
Ogre::Root * | ogre_root_ |
This control's pointer to the global Ogre::Root. | |
float | ortho_scale_ |
boost::function< void()> | post_render_callback_ |
Functor which is called after each render. | |
boost::function< void()> | pre_render_callback_ |
Functor which is called before each render. | |
Ogre::RenderWindow * | render_window_ |
This control's own render window reference. | |
Ogre::Viewport * | viewport_ |
This control's Viewport. | |
Static Protected Attributes | |
static unsigned int | sm_NextRenderWindowId = 1 |
The Id of the next render window. | |
Private Member Functions | |
DECLARE_EVENT_TABLE () |
wxWidgets Ogre render window widget. Strongly based on the existing wxOgre widget implementation, this one isolates the wx component from Ogre, acting as a simple bind to render inside a wxWidgets window.
Definition at line 26 of file wx_ogre_render_window.h.
ogre_tools::wxOgreRenderWindow::wxOgreRenderWindow | ( | Ogre::Root * | ogre_root, | |
wxWindow * | parent, | |||
wxWindowID | id = wxID_ANY , |
|||
const wxPoint & | pos = wxDefaultPosition , |
|||
const wxSize & | size = wxDefaultSize , |
|||
long | style = wxSUNKEN_BORDER , |
|||
const wxValidator & | validator = wxDefaultValidator , |
|||
bool | create_render_window = true | |||
) |
wx-like Constructor.
parent | The parent wxWindow component. | |
id | The control id. | |
pos | The default position. | |
size | The default size. | |
style | The default style for this componOgre::SceneManager* scene_manager,ent. | |
validator | A default validator for the component. |
Definition at line 40 of file wx_ogre_render_window.cpp.
ogre_tools::wxOgreRenderWindow::~wxOgreRenderWindow | ( | ) | [virtual] |
Virtual destructor.
Definition at line 57 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::createRenderWindow | ( | ) | [virtual] |
Creates an Ogre render window for this widget.
Definition at line 207 of file wx_ogre_render_window.cpp.
ogre_tools::wxOgreRenderWindow::DECLARE_EVENT_TABLE | ( | ) | [private] |
wxSize ogre_tools::wxOgreRenderWindow::DoGetBestSize | ( | ) | const [inline, virtual] |
Overrides the default implementation. This override is here for convenience. Returns a symbolic 320x240px size.
Definition at line 70 of file wx_ogre_render_window.cpp.
std::string ogre_tools::wxOgreRenderWindow::getOgreHandle | ( | ) | const [virtual] |
Gets the handle for the render window.
Definition at line 279 of file wx_ogre_render_window.cpp.
Ogre::RenderWindow * ogre_tools::wxOgreRenderWindow::getRenderWindow | ( | ) | const |
Gets the associated Ogre render window.
Definition at line 75 of file wx_ogre_render_window.cpp.
Ogre::Viewport * ogre_tools::wxOgreRenderWindow::getViewport | ( | ) | const |
Gets the associated Ogre viewport.
Definition at line 81 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::onMouseEvents | ( | wxMouseEvent & | evt | ) | [protected, virtual] |
Mouse events callback.
evt | Data regarding the mouse event. |
Definition at line 202 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::onMove | ( | wxMoveEvent & | evt | ) | [protected, virtual] |
Definition at line 191 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::onPaint | ( | wxPaintEvent & | evt | ) | [protected, virtual] |
Painting event callback.
evt | Data regarding the painting event. |
Definition at line 134 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::onSize | ( | wxSizeEvent & | evt | ) | [protected, virtual] |
Resizing events callback.
evt | Data regarding the resize event. |
Definition at line 164 of file wx_ogre_render_window.cpp.
bool ogre_tools::wxOgreRenderWindow::Reparent | ( | wxWindowBase * | new_parent | ) | [protected, virtual] |
Definition at line 316 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::setAutoRender | ( | bool | auto_render | ) | [inline] |
Definition at line 102 of file wx_ogre_render_window.h.
void ogre_tools::wxOgreRenderWindow::setCamera | ( | Ogre::Camera * | camera | ) |
Set the camera associated with this render window's viewport.
Definition at line 86 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::setCameraAspectRatio | ( | ) | [protected] |
Sets the aspect ratio on the camera
Definition at line 95 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::setOrthoScale | ( | float | scale | ) |
Set the scale of the orthographic window. Only valid for an orthographic camera.
scale | The scale |
Definition at line 116 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::setPostRenderCallback | ( | boost::function< void()> | func | ) | [virtual] |
Set a callback which is called after each render
func | The callback functor |
Definition at line 128 of file wx_ogre_render_window.cpp.
void ogre_tools::wxOgreRenderWindow::setPreRenderCallback | ( | boost::function< void()> | func | ) | [virtual] |
Set a callback which is called before each render
func | The callback functor |
Definition at line 123 of file wx_ogre_render_window.cpp.
bool ogre_tools::wxOgreRenderWindow::auto_render_ [protected] |
Definition at line 144 of file wx_ogre_render_window.h.
Ogre::Root* ogre_tools::wxOgreRenderWindow::ogre_root_ [protected] |
This control's pointer to the global Ogre::Root.
Definition at line 36 of file wx_ogre_render_window.h.
float ogre_tools::wxOgreRenderWindow::ortho_scale_ [protected] |
Definition at line 143 of file wx_ogre_render_window.h.
boost::function<void ()> ogre_tools::wxOgreRenderWindow::post_render_callback_ [protected] |
Functor which is called after each render.
Definition at line 141 of file wx_ogre_render_window.h.
boost::function<void ()> ogre_tools::wxOgreRenderWindow::pre_render_callback_ [protected] |
Functor which is called before each render.
Definition at line 140 of file wx_ogre_render_window.h.
Ogre::RenderWindow* ogre_tools::wxOgreRenderWindow::render_window_ [protected] |
This control's own render window reference.
Definition at line 33 of file wx_ogre_render_window.h.
unsigned int ogre_tools::wxOgreRenderWindow::sm_NextRenderWindowId = 1 [static, protected] |
The Id of the next render window.
Definition at line 42 of file wx_ogre_render_window.h.
Ogre::Viewport* ogre_tools::wxOgreRenderWindow::viewport_ [protected] |
This control's Viewport.
Definition at line 39 of file wx_ogre_render_window.h.