本文整理汇总了C++中ois::ParamList类的典型用法代码示例。如果您正苦于以下问题:C++ ParamList类的具体用法?C++ ParamList怎么用?C++ ParamList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParamList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createFrameListener
//-------------------------------------------------------------------------------------
void OgreBase::createFrameListener(void)
{
Ogre::LogManager::getSingletonPtr()->logMessage("*** Initializing OIS ***");
OIS::ParamList pl;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
mWindow->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem( pl );
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, true ));
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject( OIS::OISMouse, true ));
mMouse->setEventCallback(this);
mKeyboard->setEventCallback(this);
//Set initial mouse clipping size
windowResized(mWindow);
//Register as a Window listener
Ogre::WindowEventUtilities::addWindowEventListener(mWindow, this);
OgreBites::InputContext inputContext;
inputContext.mMouse = mMouse;
inputContext.mKeyboard = mKeyboard;
mTrayMgr = new OgreBites::SdkTrayManager("InterfaceName", mWindow, inputContext, this);
mTrayMgr->showFrameStats(OgreBites::TL_BOTTOMLEFT);
mTrayMgr->showLogo(OgreBites::TL_BOTTOMRIGHT);
mTrayMgr->hideCursor();
// create a params panel for displaying sample details
Ogre::StringVector items;
items.push_back("cam.pX");
items.push_back("cam.pY");
items.push_back("cam.pZ");
items.push_back("");
items.push_back("cam.oW");
items.push_back("cam.oX");
items.push_back("cam.oY");
items.push_back("cam.oZ");
items.push_back("");
items.push_back("Filtering");
items.push_back("Poly Mode");
mDetailsPanel = mTrayMgr->createParamsPanel(OgreBites::TL_NONE, "DetailsPanel", 200, items);
mDetailsPanel->setParamValue(9, "Bilinear");
mDetailsPanel->setParamValue(10, "Solid");
mDetailsPanel->hide();
mRoot->addFrameListener(this);
}
示例2: go
void go(void)
{
// OGRE의 메인 루트 오브젝트 생성
#if !defined(_DEBUG)
mRoot = new Root("plugins.cfg", "ogre.cfg", "ogre.log");
#else
mRoot = new Root("plugins_d.cfg", "ogre.cfg", "ogre.log");
#endif
// 초기 시작의 컨피규레이션 설정 - ogre.cfg 이용
if (!mRoot->restoreConfig()) {
if (!mRoot->showConfigDialog()) return;
}
mWindow = mRoot->initialise(true, "Hello Professor : Copyleft Dae-Hyun Lee");
// ESC key를 눌렀을 경우, 오우거 메인 렌더링 루프의 탈출을 처리
size_t windowHnd = 0;
std::ostringstream windowHndStr;
OIS::ParamList pl;
mWindow->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem(pl);
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, false));
mESCListener = new ESCListener(mKeyboard);
mRoot->addFrameListener(mESCListener);
mSceneMgr = mRoot->createSceneManager(ST_GENERIC);
mCamera = mSceneMgr->createCamera("camera");
mCamera->setPosition(0.0f, 200.0f, 300.0f);
mCamera->lookAt(0.0f, 100.0f, 0.00f);
mCamera->setNearClipDistance(5.0f);
mViewport = mWindow->addViewport(mCamera);
mViewport->setBackgroundColour(ColourValue(0.0f,0.0f,0.5f));
mCamera->setAspectRatio(Real(mViewport->getActualWidth()) / Real(mViewport->getActualHeight()));
ResourceGroupManager::getSingleton().addResourceLocation("resource.zip", "Zip");
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
mSceneMgr->setAmbientLight(ColourValue(1.0f, 1.0f, 1.0f));
Entity* daehyunEntity = mSceneMgr->createEntity("Daehyun", "DustinBody.mesh");
SceneNode* daehyunNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
daehyunNode->attachObject(daehyunEntity);
mRoot->startRendering();
mInputManager->destroyInputObject(mKeyboard);
OIS::InputManager::destroyInputSystem(mInputManager);
delete mRoot;
}
示例3: initialise
void InputController::initialise( Ogre::RenderWindow *renderWindow ) {
if( !mInputSystem ) {
// Setup basic variables
OIS::ParamList paramList;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
// Get window handle
renderWindow->getCustomAttribute( "WINDOW", &windowHnd );
// Fill parameter list
windowHndStr << (unsigned int) windowHnd;
paramList.insert( std::make_pair( std::string( "WINDOW" ), windowHndStr.str() ) );
// Create inputsystem
mInputSystem = OIS::InputManager::createInputSystem( paramList );
// If possible create a buffered keyboard
// (note: if below line doesn't compile, try: if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
//if( mInputSystem->numKeyboards() > 0 ) {
if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
mKeyboard = static_cast<OIS::Keyboard*>( mInputSystem->createInputObject( OIS::OISKeyboard, true ) );
mKeyboard->setEventCallback( this );
}
// If possible create a buffered mouse
// (note: if below line doesn't compile, try: if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
//if( mInputSystem->numMice() > 0 ) {
if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
mMouse = static_cast<OIS::Mouse*>( mInputSystem->createInputObject( OIS::OISMouse, true ) );
mMouse->setEventCallback( this );
// Get window size
unsigned int width, height, depth;
int left, top;
renderWindow->getMetrics( width, height, depth, left, top );
// Set mouse region
this->setWindowExtents( width, height );
}
// If possible create all joysticks in buffered mode
// (note: if below line doesn't compile, try: if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
//if( mInputSystem->numJoySticks() > 0 ) {
if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
//mJoysticks.resize( mInputSystem->numJoySticks() );
mJoysticks.resize( mInputSystem->getNumberOfDevices(OIS::OISJoyStick) );
itJoystick = mJoysticks.begin();
itJoystickEnd = mJoysticks.end();
for(; itJoystick != itJoystickEnd; ++itJoystick ) {
(*itJoystick) = static_cast<OIS::JoyStick*>( mInputSystem->createInputObject( OIS::OISJoyStick, true ) );
(*itJoystick)->setEventCallback( this );
}
}
}
}
示例4: createFrameListener
// -------------------------------------------------------------------------
void OgreBulletApplication::createFrameListener(void)
{
mFrameListener = 0;
#if (OGRE_VERSION < ((1 << 16) | (3 << 8) | 0))
mInput = PlatformManager::getSingleton().createInputReader();
//mInput->initialise(mWindow, false, false);
mInputSystem = new EventProcessor();
mInputSystem->initialise (mWindow);
mInputSystem->startProcessingEvents();
mInput = mInputSystem->getInputReader();
#else
size_t windowHnd = 0;
std::ostringstream windowHndStr;
OIS::ParamList pl;
#if defined OIS_WIN32_PLATFORM
mWindow->getCustomAttribute("WINDOW", &windowHnd);
#elif defined OIS_LINUX_PLATFORM
//mWindow->getCustomAttribute( "GLXWINDOW", &windowHnd );
mWindow->getCustomAttribute( "WINDOW", &windowHnd );
#endif
// Fill parameter list
windowHndStr << (unsigned int) windowHnd;
pl.insert( std::make_pair( std::string( "WINDOW" ), windowHndStr.str() ) );
// Uncomment these two lines to allow users to switch keyboards via the language bar
//paramList.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND") ));
//paramList.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE") ));
mInputSystem = InputManager::createInputSystem( pl );
//Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
mInput = static_cast<Keyboard*>(mInputSystem->createInputObject( OISKeyboard, true ));
mMouse = static_cast<Mouse*>(mInputSystem->createInputObject( OISMouse, true ));
unsigned int width, height, depth;
int left, top;
mWindow->getMetrics(width, height, depth, left, top);
const OIS::MouseState &ms = mMouse->getMouseState();
ms.width = width;
ms.height = height;
#endif //OGRE_VERSION not Eihort
switchListener (*(mBulletListeners->begin()));
mRoot->addFrameListener(this);
}
示例5:
OISListener::OISListener(size_t handle,OISSubsystem* sys,bool grabMouse)
{
mSubsystem = sys;
std::ostringstream windowHndStr;
windowHndStr << handle;
OIS::ParamList pl;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
if(!grabMouse)
{
#ifdef OIS_WIN32_PLATFORM
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
#elif defined OIS_LINUX_PLATFORM
pl.insert(std::make_pair(std::string("x11_mouse_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
#endif
}
mInputManager = OIS::InputManager::createInputSystem(pl);
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, true ));
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject( OIS::OISMouse, true ));
mKeyboard->setEventCallback(this);
mMouse->setEventCallback(this);
const OIS::MouseState &ms = mMouse->getMouseState();
ms.width = 800;
ms.height = 600;
setMousePosition(ms.width/2,ms.height/2);
}
示例6: mMouse
InputHandlerOIS::InputHandlerOIS(unsigned int hWnd)
:mInputManager(nullptr), mMouse(nullptr), mKeyboard(nullptr), mLastMouseUpdateFrame(0), mTimestampClockOffset(0)
{
mMouseSampleAccumulator[0] = 0;
mMouseSampleAccumulator[1] = 0;
mTotalMouseSamplingTime[0] = 1.0f / 125.0f; // Use 125Hz as initial pooling rate for mice
mTotalMouseSamplingTime[1] = 1.0f / 125.0f;
mTotalMouseNumSamples[0] = 1;
mTotalMouseNumSamples[1] = 1;
mMouseSmoothedAxis[0] = 0.0f;
mMouseSmoothedAxis[1] = 0.0f;
mMouseZeroTime[0] = 0.0f;
mMouseZeroTime[1] = 0.0f;
OIS::ParamList pl;
std::ostringstream windowHndStr;
windowHndStr << hWnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
#if defined BS_PLATFORM == BS_PLATFORM_WIN32
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
#elif defined BS_PLATFORM == BS_PLATFORM_LINUX || BS_PLATFORM == BS_PLATFORM_APPLE
pl.insert(std::make_pair(std::string("x11_mouse_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
#endif
mInputManager = OIS::InputManager::createInputSystem(pl);
if (mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
}
if (mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
UINT32 numGamepads = mInputManager->getNumberOfDevices(OIS::OISJoyStick);
for (UINT32 i = 0; i < numGamepads; i++)
{
mGamepads.push_back(GamepadData());
GamepadData& gamepadData = mGamepads.back();
gamepadData.gamepad = static_cast<OIS::JoyStick*>(mInputManager->createInputObject(OIS::OISJoyStick, true));
gamepadData.listener = bs_new<GamepadEventListener>(this, i);
gamepadData.gamepad->setEventCallback(gamepadData.listener);
}
// OIS reports times since system start but we use time since program start
mTimestampClockOffset = gTime().getStartTimeMs();
}
示例7: initializeOIS
bool Game::initializeOIS() {
//get the window handle;
size_t windowHandle = 0;
m_pWindow->getCustomAttribute("WINDOW", &windowHandle);
std::ostringstream windowHandleStr;
windowHandleStr << windowHandle;
// create the input system
OIS::ParamList pl;
pl.insert(std::make_pair(std::string("WINDOW"), windowHandleStr.str()));
#if defined OIS_WIN32_PLATFORM
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
#elif defined OIS_LINUX_PLATFORM
pl.insert(std::make_pair(std::string("x11_mouse_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
#endif
m_pInputManager = OIS::InputManager::createInputSystem(pl);
// create the keyboard
m_pKeyboard = static_cast<OIS::Keyboard*>(m_pInputManager->createInputObject(OIS::OISKeyboard, m_BufferedKeys));
m_pKeyboard->setEventCallback(this);
// create the mouse
m_pMouse = static_cast<OIS::Mouse*>(m_pInputManager->createInputObject( OIS::OISMouse, m_BufferedMouse));
m_pMouse->setEventCallback(this);
// tell OIS the range of mouse movement
OISSetWindowSize();
return true;
}//Game::initializeOIS
示例8: setupInputManager
void
setupInputManager() {
const std::string HANDLE_NAME = "WINDOW";
size_t windowHandle = 0;
m_graphics.renderWindow->getCustomAttribute(HANDLE_NAME, &windowHandle);
OIS::ParamList parameters;
parameters.insert(std::make_pair(
HANDLE_NAME,
boost::lexical_cast<std::string>(windowHandle)
));
#if defined OIS_WIN32_PLATFORM
parameters.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
parameters.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
parameters.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
parameters.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
#elif defined OIS_LINUX_PLATFORM
parameters.insert(std::make_pair(std::string("x11_mouse_grab"), std::string("false")));
parameters.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false")));
parameters.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false")));
parameters.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
#endif
m_input.inputManager = OIS::InputManager::createInputSystem(parameters);
m_input.keyboard.init(m_input.inputManager);
m_input.mouse.init(m_input.inputManager);
}
示例9: createInput
void InputManager::createInput(size_t _handle)
{
std::ostringstream windowHndStr;
windowHndStr << _handle;
OIS::ParamList pl;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
#if defined OIS_WIN32_PLATFORM
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
pl.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
pl.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
#elif defined OIS_LINUX_PLATFORM
pl.insert(std::make_pair(std::string("x11_mouse_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false")));
pl.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false")));
pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
#endif
mInputManager = OIS::InputManager::createInputSystem(pl);
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, true ));
mKeyboard->setEventCallback(this);
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject( OIS::OISMouse, true ));
mMouse->setEventCallback(this);
}
示例10: createInputSystem
OIS::InputManager* InputSystem::createInputSystem(Ogre::Root* p_root)
{
std::clog << "Initializing input system..." << std::endl;
OIS::ParamList paramList;
size_t windowHandle = 0;
std::ostringstream windowHandleStr;
p_root->getRenderTarget("main_window")->getCustomAttribute("WINDOW", &windowHandle);
windowHandleStr << windowHandle;
paramList.insert(std::make_pair(std::string("WINDOW"), windowHandleStr.str()));
return OIS::InputManager::createInputSystem(paramList);
}
示例11: initOIS
void App::initOIS()
{
size_t windowHnd = 0;
mWindow->getCustomAttribute("WINDOW", &windowHnd);
std::ostringstream windowHndStr;
windowHndStr << windowHnd;
OIS::ParamList pl;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
OIS::InputManager* inputManager = OIS::InputManager::createInputSystem(pl);
mKeyboard = static_cast<OIS::Keyboard*>(inputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
}
示例12: initialize
void OISServer::initialize(const ion_intptr windowhandle)
{
// TODO: resolve this ( a 64bit-issue)
std::stringstream wnd;
wnd << windowhandle;
OIS::ParamList pl;
pl.insert(std::make_pair(std::string("WINDOW"), wnd.str()));
m_pInternaldata->m_pInputmanager=OIS::InputManager::createInputSystem(pl);
enumerateDevices();
}
示例13: init
void InputManager::init( const device::IDevicePtr& device )
{
if( !m_pInputSystem )
{
// Setup basic variables
OIS::ParamList paramList;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
// Fill parameter list
windowHndStr << (unsigned int) device->getWindowID();
paramList.insert( std::make_pair( std::string( "WINDOW" ), windowHndStr.str() ) );
// Create inputsystem
m_pInputSystem = OIS::InputManager::createInputSystem( paramList );
// If possible create a buffered keyboard
if( m_pInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0 )
{
m_pKeyboard = static_cast<OIS::Keyboard*>( m_pInputSystem->createInputObject( OIS::OISKeyboard, true ) );
m_pKeyboard->setEventCallback( this );
}
// If possible create a buffered mouse
if( m_pInputSystem->getNumberOfDevices(OIS::OISMouse) > 0 )
{
m_pMouse = static_cast<OIS::Mouse*>( m_pInputSystem->createInputObject( OIS::OISMouse, true ) );
m_pMouse->setEventCallback( this );
// Get window size
int left, top, width, height;
device->getWindowRect(left,top,width,height);
// Set mouse region
this->setWindowExtents( width, height );
}
// If possible create all joysticks in buffered mode
int joystickNum = m_pInputSystem->getNumberOfDevices(OIS::OISJoyStick);
if( joystickNum> 0 )
{
m_pJoysticks.resize( joystickNum );
m_joystickIter = m_pJoysticks.begin();
m_joystickIterEnd = m_pJoysticks.end();
for(; m_joystickIter != m_joystickIterEnd; ++m_joystickIter ) {
(*m_joystickIter) = static_cast<OIS::JoyStick*>( m_pInputSystem->createInputObject( OIS::OISJoyStick, true ) );
(*m_joystickIter)->setEventCallback( this );
}
}
}
}
示例14: mRenderWindow
InputHandler::InputHandler(Ogre::RenderWindow *renderWindow) : mRenderWindow(renderWindow) {
OIS::ParamList pl;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
renderWindow->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem( pl );
mCurrentKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, false /* not buffered */ ));
}
示例15:
CEGuiDemoFrameListener::CEGuiDemoFrameListener(CEGuiBaseApplication* baseApp, Ogre::RenderWindow* window, Ogre::Camera* camera, bool useBufferedInputKeys, bool useBufferedInputMouse)
{
// OIS setup
OIS::ParamList paramList;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
// get window handle
window->getCustomAttribute("WINDOW", &windowHnd);
// fill param list
windowHndStr << (unsigned int)windowHnd;
paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
// create input system
d_inputManager = OIS::InputManager::createInputSystem(paramList);
// create buffered keyboard
//if (d_inputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
if (d_inputManager->numKeyboards() > 0)
{
d_keyboard = static_cast<OIS::Keyboard*>(d_inputManager->createInputObject(OIS::OISKeyboard, true));
d_keyboard->setEventCallback(this);
}
// create buffered mouse
//if (d_inputManager->getNumberOfDevices(OIS::OISMouse) > 0)
if (d_inputManager->numMice() > 0)
{
d_mouse = static_cast<OIS::Mouse*>(d_inputManager->createInputObject(OIS::OISMouse, true));
d_mouse->setEventCallback(this);
unsigned int width, height, depth;
int left, top;
window->getMetrics(width, height, depth, left, top);
const OIS::MouseState& mouseState = d_mouse->getMouseState();
mouseState.width = width;
mouseState.height = height;
}
// store inputs we want to make use of
d_camera = camera;
d_window = window;
// we've not quit yet.
d_quit = false;
// setup base app ptr
d_baseApp = baseApp;
}