to myself 的分类学习日志

做自己想做的事
posts - 232, comments - 6, trackbacks - 0, articles - 0

ogre点滴

Posted on 2011-04-08 18:38 kongkongzi 阅读(343) 评论(0)  编辑 收藏 引用 所属分类: ogre
Ogre::ResourceGroupManager


class Ogre::QuadtreeSceneManager : public Ogre::SceneManager
Ogre::TerrainGlobalOptions
Ogre::TerrainGroup


Ogre场景管理器:
分块地形和四叉树场景管理

Ogre默认没有提供四叉树场景管理器?

提供了class _OgreOctreePluginExport OctreeSceneManager : public SceneManager

// Initializes the manager to the given box and depth.
init(); 

// Cascade down the graph updating transforms & world bounds
// In this implementation, just update from the root
// Smarter SceneManager subclasses may choose to update only
// certain scene graph branches
updateSceneGraph();

/** Walks through the octree, adding any visible objects to the render queue.
@remarks
If any octant in the octree if completely within the view frustum,
all subchildren are automatically added with no visibility tests.
*/
walkOctree();



Node
APK
RPK
Bounding
Collision

Mesh
AnimeMesh,动画骨骼
CollisionFace,碰撞面


// 创建一个Entity,定义物体的形状(3D网格)、是否可见等
Entity *ent2 = mSceneMgr->createEntity( "Robot2", "robot.mesh" ); 

// 创建一个Node(这个Node挂在Root Node下,偏离了根SceneNode50个单位),定义物体的方向、坐标、变换、旋转等
SceneNode *node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode2", Vector3( 50, 0, 0 ) );

// 将Entity挂载到Node上
node2->attachObject( ent2 ); 




参考:
1,http://dev.gameres.com/Program/Visual/3D/ogre/Ogre1_SceneNode.htm