游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3417|回复: 4

能不能直接加载.osm文件?象下面这样?

[复制链接]

10

主题

11

帖子

11

积分

新手上路

Rank: 1

积分
11
发表于 2008-3-20 21:16:00 | 显示全部楼层 |阅读模式
Entity* pBM = mSceneMgr->createEntity("BM", "bo.osm");
        SceneNode* pBMNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
        pBMNode->attachObject(pBM );
        pBMNode->setScale(0.3,0.3,0.3);
        pBMNode->translate(0,6,0);

我试图加载,得到如下提示:
21:10:57: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for bo.osm automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at e:\projects\ogrecvs\branches\eihort_vc8_clean\ogrenew\ogremain\src\ogreresourcegroupmanager.cpp (line 1368)

9

主题

31

帖子

31

积分

注册会员

Rank: 2

积分
31
发表于 2008-3-21 09:05:00 | 显示全部楼层

Re:能不能直接加载.osm文件?象下面这样?

To integrate the oScene loader library in your application you need to include the 'OgreOSMScene.cpp' and the TinyXML source files in your project/solution.

See the Demo_oSceneLoader project for an example of the oScene loader lib use.



In the file that will use the library include the oScene loader header file 'OgreOSMScene.h'.

// oScene loader library header file
#include "OgreOSMScene.h"


Create a oScene object that will handle the load process:

// Create the scene loader
OSMScene oScene;


Optionaly, if notifications or post-porcess of elements is requiered, create a OSMSceneCallbacks derived object:


// Create an oE_Loader Callback object to post-process created objects
oSceneCallback oe_Callback;


Initialise the oScene object with the scene file and optionaly with the callback object:
        
// Initialises with the scene to be loaded and the callback if requiered
oScene.initialise("scene.osm", &oe_Callback);


Create and setup the scene:
        
// create and setup the scene in the root node
oScene.createScene();


If the scene manager is not manually created, request it:

// Get the automatically created scene manager
mSceneMgr = oScene.getSceneManager();

2

主题

8

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2008-4-9 10:37:00 | 显示全部楼层

Re:能不能直接加载.osm文件?象下面这样?

excuse me ,
i can't find OgreOSMScene.h in SDK... [em12]

18

主题

211

帖子

419

积分

中级会员

Rank: 3Rank: 3

积分
419
发表于 2008-4-9 12:07:00 | 显示全部楼层

Re: 能不能直接加载.osm文件?象下面这样?

全是E文,,,不要用E文了,,,不能像你那样哟,,,要下载个OFSUION库哟,,,!!!!

到官网去下哟!!!

2

主题

8

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2008-4-9 12:36:00 | 显示全部楼层

Re:能不能直接加载.osm文件?象下面这样?

谢谢。下载一个来研究一下。。。
但愿不必麻烦的配置。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-22 21:43

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表