YuanCheng's Blog

C++博客 联系 聚合 管理
  1 Posts :: 5 Stories :: 0 Comments :: 0 Trackbacks
    Ogre::Entity* ent=this->sceneMgr->createEntity("wall_ent","box_1_1.mesh");
    ent
->setMaterialName("Examples/MazeWallTexture");

    Ogre::StaticGeometry
* sg=this->sceneMgr->createStaticGeometry("Walls");
    
for(int i=0;i<length;i++)
    
{
        
for(int j=0;j<length;j++)
        
{
            
if(mMazeData[i][j]==1)
            
{
                Ogre::Vector3 pos
=PhKit::getSingletonPtr()->NxToOgreVec(this->GetCoordinate(i,j));
                sg
->addEntity(ent,pos,Ogre::Quaternion::IDENTITY,this->WallSize);

                NxActor
* actor=PhKit::getSingletonPtr()->CreateStaticBoxActor((NxVec3(WallSize.x/2,WallSize.y/2,WallSize.z/2)),NULL);
                actor
->setGlobalPosition(NxVec3(pos.x,pos.y,pos.z));
            }

        }

    }

    sg
->build();
posted on 2007-12-12 20:47 YuanCheng 阅读(953) 评论(0)  编辑 收藏 引用 所属分类: Computer

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理