JCHub

  • Home
  • Category
    • A/V
    • WebRTC
    • Beauty of Programming
    • Linux
    • Windows
    • Moments of Life
    • Campus Life
  • Reference
    • API Reference
    • Utilities
    • AV Test
    • Doc
  • Message Board
  • About
JCHub
Code as My Sword, Lost in Obsession
  1. Main page
  2. Beauty of Programming
  3. Main content

Ogre学习笔记(4)

2014年3月15日 1263hotness 0likes 0comments

这篇文章主要是自己对一些Ogre容易错的知识点的总结,会不断补充更新:

(1)ogre中,坐标变换是相对于parent节点的,比如节点node1 Position(10,0,0),node1创建一个子节点node2,我们打算设置位置为(10,10,20),由于坐标变换是相对的,所以node2需要setPosition(0,10,20)

(2)相机的clipdistance要设置好,比如前面遇到的看不到天空

(3)我的场景中,所有物体是通过场景文件.scene导入的,要得到场景中所有Entity,给所有物体设置标识可通过如下方法:

1
2
3
4
5
6
Ogre::SceneManager::MovableObjectIterator mIterator = m_pSceneMgr->getMovableObjectIterator("Entity");
while(mIterator.hasMoreElements())
   {
       Ogre::Entity* e = static_cast<Ogre::Entity*>(mIterator.getNext());        
       e->setQueryFlags(MY_MASK);
   }//遍历所有物体设置标识

(4)使用粒子系统要记得载入Plugin_ParticleFX.dll插件,在plugins.cfg中要添加该插件路径,如果不添加插件,运行时程序会抛出异常:Cannot find requested emitter type

This article is licensed with Creative Commons Attribution-NonCommercial-No Derivatives 4.0 International License
Tag: OGRE
Last updated:2014年4月7日

Jeff

管理员——代码为剑,如痴如醉

Tip the author Like
< Last article
Next article >

Comments

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
Cancel

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts
  • Ogre中阴影设置问题
  • Ogre中的场景文件
  • Ogre中加入声音
  • Ogre中的粒子系统(Particle System)
  • Ogre中简单的AABB碰撞检测
Categories

COPYRIGHT © 2026 jianchihu.net. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang