资源简介
OriDemo; Gyroscope+Accelermeter; IMU; Kalman filter.
代码片段和文件信息
//|||||||||||||||||||||||||||||||||||||||||||||||
#include “AdvancedOgreframework.hpp“
//|||||||||||||||||||||||||||||||||||||||||||||||
using namespace Ogre;
//|||||||||||||||||||||||||||||||||||||||||||||||
template<> Ogreframework* Ogre::Singletonamework>::ms_Singleton = 0;
//|||||||||||||||||||||||||||||||||||||||||||||||
Ogreframework::Ogreframework()
{
m_pRoot = 0;
m_pRenderWnd = 0;
m_pViewport = 0;
m_pLog = 0;
m_pDatabaseLog = 0;
m_pTimer = 0;
m_pInputMgr = 0;
m_pKeyboard = 0;
m_pMouse = 0;
m_pWiimote = 0;
m_bFixedframeRate = false;
}
//|||||||||||||||||||||||||||||||||||||||||||||||
Ogreframework::~Ogreframework()
{
Ogreframework::getSingletonPtr()->m_pLog->logMessage(“Shutdown OGRE...“);
if(m_pTrayMgr) delete m_pTrayMgr;
if(m_pInputMgr) OIS::InputManager::destroyInputSystem(m_pInputMgr);
if(m_pRoot) delete m_pRoot;
if(m_pWiimote) delete m_pWiimote;
}
//|||||||||||||||||||||||||||||||||||||||||||||||
bool Ogreframework::initOgre(Ogre::String wndtitle OIS::KeyListener *pKeyListener OIS::MouseListener *pMouseListener)
{
Ogre::LogManager* logMgr = new Ogre::LogManager();
m_pLog = Ogre::LogManager::getSingleton().createLog(“OgreLogfile.log“ true true false);
m_pLog->setDebugOutputEnabled(true);
m_pRoot = new Ogre::Root();
if(!m_pRoot->showConfigDialog())
return false;
m_pRenderWnd = m_pRoot->initialise(true wndtitle);
m_pViewport = m_pRenderWnd->addViewport(0);
m_pViewport->setBackgroundColour(ColourValue(0.5f 0.5f 0.5f 1.0f));
m_pViewport->setCamera(0);
unsigned long hWnd = 0;
OIS::ParamList paramList;
m_pRenderWnd->getCustomAttribute(“WINDOW“ &hWnd);
paramList.insert(OIS::ParamList::value_type(“WINDOW“ Ogre::StringConverter::toString(hWnd)));
m_pInputMgr = OIS::InputManager::createInputSystem(paramList);
m_pKeyboard = static_cast(m_pInputMgr->createInputobject(OIS::OISKeyboard true));
m_pMouse = static_cast(m_pInputMgr->createInputobject(OIS::OISMouse true));
m_pMouse->getMouseState().height = m_pRenderWnd->getHeight();
m_pMouse->getMouseState().width = m_pRenderWnd->getWidth();
if(pKeyListener == 0)
m_pKeyboard->setEventCallback(this);
else
m_pKeyboard->setEventCallback(pKeyListener);
if(pMouseListener == 0)
m_pMouse->setEventCallback(this);
else
m_pMouse->setEventCallback(pMouseListener);
Ogre::String secName typeName archName;
Ogre::ConfigFile cf;
cf.load(“resources.cfg“);
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
Ogre::ConfigFile::SettingsMultiMap::iterator i;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 546 2011-04-12 13:26 OriDemo\OriDemo\bin\Debug\ogre.cfg
文件 20745 2011-04-12 13:26 OriDemo\OriDemo\bin\Debug\OgreLogfile.log
文件 20596224 2010-11-05 07:37 OriDemo\OriDemo\bin\Debug\OgreMain_d.dll
文件 443904 2010-11-05 07:13 OriDemo\OriDemo\bin\Debug\OIS_d.dll
文件 2121800 2011-04-12 13:42 OriDemo\OriDemo\bin\Debug\OriDemo.ilk
文件 146 2011-02-09 19:09 OriDemo\OriDemo\bin\Debug\plugins.cfg
文件 1994752 2010-11-05 07:45 OriDemo\OriDemo\bin\Debug\RenderSystem_Direct3D9_d.dll
文件 2221056 2010-11-05 07:45 OriDemo\OriDemo\bin\Debug\RenderSystem_GL_d.dll
文件 523 2011-03-06 19:06 OriDemo\OriDemo\bin\Debug\resources.cfg
文件 6932 2011-04-12 11:29 OriDemo\OriDemo\Debug\BuildLog.htm
文件 19456 2011-04-12 11:29 OriDemo\OriDemo\Debug\vc90.idb
文件 36864 2011-04-12 11:29 OriDemo\OriDemo\Debug\vc90.pdb
文件 2425 2011-04-12 13:19 OriDemo\OriDemo\include\AdvancedOgrefr
文件 2791 2011-02-16 14:16 OriDemo\OriDemo\include\AppState.hpp
文件 1187 2011-03-03 19:42 OriDemo\OriDemo\include\AppStateManager.hpp
文件 524 2010-10-05 22:11 OriDemo\OriDemo\include\DemoApp.hpp
文件 1076 2011-02-21 19:13 OriDemo\OriDemo\include\MenuState.hpp
文件 108054 2011-03-15 13:23 OriDemo\OriDemo\include\MySdkTrays.h
文件 1639 2011-03-31 17:18 OriDemo\OriDemo\include\OriEvalState.hpp
文件 2444 2011-04-03 17:59 OriDemo\OriDemo\include\OriMote.h
文件 1194 2011-02-21 19:14 OriDemo\OriDemo\include\PauseState.hpp
文件 274274 2008-08-30 19:59 OriDemo\OriDemo\media\packs\cubemap.zip
文件 452589 2010-02-15 20:03 OriDemo\OriDemo\media\packs\cubemapsJS.zip
文件 95346 2008-08-28 14:40 OriDemo\OriDemo\media\packs\OgreCore.zip
文件 131113 2009-10-17 14:14 OriDemo\OriDemo\media\packs\SdkTrays.zip
文件 146984 2011-03-04 13:07 OriDemo\OriDemo\media\VM_scene\blender_files\LegoBrick.blend
文件 22122 2011-03-04 13:08 OriDemo\OriDemo\media\VM_scene\blender_files\LegoBrick.mesh.xm
文件 155652 2011-03-04 13:23 OriDemo\OriDemo\media\VM_scene\blender_files\LegoBrick1x2.blend
文件 97400 2011-03-04 13:24 OriDemo\OriDemo\media\VM_scene\blender_files\LegoBrick1x2.mesh.xm
文件 414119 2011-03-04 22:32 OriDemo\OriDemo\media\VM_scene\blender_files\wii.mesh.xm
............此处省略56个文件信息
相关资源
- Tecnomatix Plant Simulation 8.2破解教程以及
- Electromagnetic Simulation Using the FDTD meth
- 三相永磁同步电机PMSM矢量控制建模与
- 语音信号频带传输通信系统仿真——
- 达索 SIMULIA 云平台仿真应用介绍.pdf
- Phase-Locked Loops Design Simulation and Appli
- Cadence® NC-Verilog® Simulator Help
- Fluid Simulation for Computer Graphics Second
- 周金平plantsimulation 教程源代码
- Molecular dynamics simulation Elementary Metho
- 汽车四自由度模型(横摆、车身侧倾
- 汽车三自由度模型(横摆、车身侧倾
- Power World Simulator中文用户手册+实验指
- computer simulation of liquids 2nd
- F16_Nonlinear_Model.zip
- ns3模拟数据中心网络datacenter network
- 非数值并行算法第一册模拟退火算法
- simulation with arena英文版教材的课后习
- 室内IMU+PDR资料
- pure control.zip
- imutils-master.rar压缩包,之前资源缺少
- VCE 考试模拟器(Avanset VCE Exam Simulat
- delmia simulation
- KEPServerEX6.4 104Server Simulator 项目文件
- KITTI数据集介绍
- plant-simulation基础培训教程(中文)
- lv_pc_simulator.rar
- MTK+PC+Simulator
- www.yimuhe.com-双色球霸主软件V6.0破解版
- 移植MPU9250_DMP原代码到STM32F429
评论
共有 条评论