本文整理汇总了C++中Octree::DrawOutlines方法的典型用法代码示例。如果您正苦于以下问题:C++ Octree::DrawOutlines方法的具体用法?C++ Octree::DrawOutlines怎么用?C++ Octree::DrawOutlines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Octree
的用法示例。
在下文中一共展示了Octree::DrawOutlines方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KeyboardEvent
void GameEngine::KeyboardEvent(System::Event &event)
{
_camera->KeyboardEvent(event);
if (event.type == System::Event::KeyPressed)
{
if (event.key.code == System::Key::Space)
{
Octree *oct = _entity->data->As<Octree>();
if (oct->DrawOutlines() == false)
oct->DrawOutlines(true);
else
oct->DrawOutlines(false);
}
}
}
示例2: Generate
void GameEngine::Generate(Entity *node, Graphic::Object *obj)
{
Vector2f size(40, 40);
Octree *oct = new Octree(Box3f(Vector3f(0,0,0),Vector3f(50,50,50)));
Box3f box;
node->data = oct;
std::list<std::pair<Box3f,ISceneNode*> > listToInsert;
for (unsigned int i = 0; i < size[0]; ++i)
{
for (unsigned int j = 0; j < size[1]; ++j)
{
Graphic::Object *newObj = obj->Clone()->As<Graphic::Object>();
newObj->Matrix.Translation(i,j,0);
newObj->GetReelBox(box);
listToInsert.push_front(std::pair<Box3f,ISceneNode*>(box, newObj));
}
}
obj->Matrix.Translation(42,42,42);
obj->GetReelBox(box);
listToInsert.push_front(std::pair<Box3f,ISceneNode*>(box, obj));
oct->Insert(listToInsert, 16);
oct->DrawOutlines(true);
}