本文整理汇总了C++中IAnimatedMeshSceneNode::getEndFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ IAnimatedMeshSceneNode::getEndFrame方法的具体用法?C++ IAnimatedMeshSceneNode::getEndFrame怎么用?C++ IAnimatedMeshSceneNode::getEndFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAnimatedMeshSceneNode
的用法示例。
在下文中一共展示了IAnimatedMeshSceneNode::getEndFrame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: md2Animation
/** At the moment, this just verifies that the last frame of the animation produces the expected bitmap. */
bool md2Animation(void)
{
// Use EDT_BURNINGSVIDEO since it is not dependent on (e.g.) OpenGL driver versions.
IrrlichtDevice *device = createDevice( EDT_BURNINGSVIDEO, dimension2d<u32>(160, 120), 32);
assert(device);
if (!device)
return false;
IVideoDriver* driver = device->getVideoDriver();
ISceneManager * smgr = device->getSceneManager();
IAnimatedMesh* mesh = smgr->getMesh("../media/sydney.md2");
IAnimatedMeshSceneNode* node;
assert(mesh);
if(mesh)
{
node = smgr->addAnimatedMeshSceneNode(mesh);
assert(node);
if(node)
{
node->setPosition(vector3df(20, 0, 30));
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMaterialTexture(0, driver->getTexture("../media/sydney.bmp"));
node->setLoopMode(false);
(void)smgr->addCameraSceneNode();
// Just jump to the last frame since that's all we're interested in.
node->setMD2Animation(EMAT_DEATH_FALLBACK);
node->setCurrentFrame((f32)(node->getEndFrame()));
device->run();
driver->beginScene(true, true, SColor(255, 255, 255, 0));
smgr->drawAll();
driver->endScene();
}
}
bool result = takeScreenshotAndCompareAgainstReference(driver, "-md2Animation.png");
device->drop();
return result;
}