本文整理汇总了C++中ISceneManager::getSceneNodeFromType方法的典型用法代码示例。如果您正苦于以下问题:C++ ISceneManager::getSceneNodeFromType方法的具体用法?C++ ISceneManager::getSceneNodeFromType怎么用?C++ ISceneManager::getSceneNodeFromType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISceneManager
的用法示例。
在下文中一共展示了ISceneManager::getSceneNodeFromType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
int idCenario = 0;
int quadId;
vector3df p1, p2, p3, p4;
SMatrix mtxCenario;
CArquivoMatrizes *_fileMtx = new CArquivoMatrizes();
CSampleSceneNode *myQuad[2500];
CGerEventos eventos;
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600), 16, false,false,false, &eventos);
device->setWindowCaption(L"Editor de matrizes - Warbugs");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
smgr->addCameraSceneNodeFPS();
//smgr->addCameraSceneNode(0, vector3df(0,100,0), vector3df(0,0,0));
smgr->loadScene(pathCenario[idCenario]);
mtxCenario = _fileMtx->getMatrix(idCenario);
ITerrainSceneNode *sceneTerrain = (ITerrainSceneNode*)smgr->getSceneNodeFromType(ESNT_TERRAIN, 0);
ITriangleSelector *sceneTris = smgr->createTerrainTriangleSelector(sceneTerrain, 0);
sceneTerrain->setTriangleSelector(sceneTris);
for(int i=0; i<50; i++) // z
{
for(int j=0; j<50;j++) // x
{
//if(
//{
p1.X = 10.0;
p1.Y = 1.0;
p1.Z = 0.0;
p2.X = 10.0;
p2.Y = 1.0;
p2.Z = 500.0;
p3.X = 0.0;
p3.Y = 1.0;
p3.Z = 500.0;
p4.X = 0.0;
p4.Y = 1.0;
p4.Z = 0.0;
quadId = j + (i * 10);
myQuad[quadId] = new CSampleSceneNode(smgr->getRootSceneNode(), smgr, quadId, p1, p2, p3, p4);
//}
}
}
while(device->run())
{
driver->beginScene(true, true, SColor(0,100,100,100));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}