55 #include <visp/vpConfig.h>
60 #include <visp/vpImage.h>
61 #include <visp/vpImageConvert.h>
62 #include <visp/vpRGBa.h>
64 #include <visp/vpImageTools.h>
65 #include <visp/vpHomogeneousMatrix.h>
66 #include <visp/vpRotationMatrix.h>
67 #include <visp/vpRxyzVector.h>
70 #include <OgreFrameListener.h>
90 class VISP_EXPORT
vpAROgre :
public Ogre::FrameListener,
public Ogre::WindowEventListener
92 ,
public OIS::KeyListener
97 unsigned int width = 0,
unsigned int height = 0,
98 const char* resourcePath =
99 #ifdef VISP_HAVE_OGRE_RESOURCES_PATH
100 VISP_HAVE_OGRE_RESOURCES_PATH,
104 const char* pluginsPath =
105 #ifdef VISP_HAVE_OGRE_PLUGINS_PATH
106 VISP_HAVE_OGRE_PLUGINS_PATH
125 mOptionnalResourceLocation.push_back(resourceLocation);
130 bool continueRendering(
void);
132 virtual bool customframeStarted(
const Ogre::FrameEvent& evt);
134 virtual bool customframeEnded(
const Ogre::FrameEvent& evt);
151 virtual void init(
vpImage<vpRGBa> &I,
bool bufferedKeys=
false,
bool hidden=
false);
164 virtual bool keyPressed(
const OIS::KeyEvent & ) {
return true; }
168 virtual bool keyReleased(
const OIS::KeyEvent & ) {
return true; }
171 void load(
const std::string &name,
const std::string &model);
189 mPluginsPath = pluginsPath;
192 void setPosition(
const std::string &name,
206 mResourcePath = resourcePath;
211 void setScale(
const std::string &name,
const float factorx,
const float factory,
const float factorz);
222 mshowConfigDialog = showConfigDialog;
225 void setVisibility(
const std::string &name,
bool isVisible);
253 mWindow->reposition(static_cast<int>(win_x), static_cast<int>(win_y));
256 virtual void windowClosed(Ogre::RenderWindow* rw);
260 virtual void init(
bool bufferedKeys=
false,
bool hidden=
false);
261 virtual void createCamera(
void);
269 virtual void closeOIS(
void);
276 virtual bool updateScene(
const Ogre::FrameEvent & ) {
return true;};
294 virtual void updateCameraProjection(
void);
306 bool frameStarted(
const Ogre::FrameEvent& evt);
308 bool frameEnded(
const Ogre::FrameEvent& evt);
310 bool stopTest(
const Ogre::FrameEvent& evt);
351 #endif // VISP_HAVE_OGRE