本文整理汇总了C++中ManualObject::setQueryFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ ManualObject::setQueryFlags方法的具体用法?C++ ManualObject::setQueryFlags怎么用?C++ ManualObject::setQueryFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManualObject
的用法示例。
在下文中一共展示了ManualObject::setQueryFlags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildInScene
void GridBuilder::buildInScene(Ogre::SceneManager *_scene, int _units)
{ using namespace Ogre;
SceneNode *gridNode = _scene->getRootSceneNode()->createChildSceneNode("WorldGrid Node");
ManualObject *axes = _scene->createManualObject("AXES");
axes->begin("WorldGrid/Axes", RenderOperation::OT_LINE_LIST);
// X axis
axes->position(-_units, 0.0, 0.0);
axes->colour(0.1, 0.0, 0.0);
axes->position( _units, 0.0, 0.0);
axes->colour(1.0, 0.0, 0.0);
// Y Axis
axes->position(0.0, -_units, 0.0);
axes->colour(0.0, 0.1, 0.0);
axes->position(0.0, _units, 0.0);
axes->colour(0.0, 1.0, 0.0);
// Z axis
axes->position( 0.0, 0.0, -_units);
axes->colour(0.0, 0.0, 0.1);
axes->position( 0.0, 0.0, _units);
axes->colour(0.0, 0.0, 1.0);
axes->end();
gridNode->attachObject(axes);
axes->setQueryFlags(0x00);
ManualObject *grid = _scene->createManualObject("Grid Lines");
grid->begin("WorldGrid/Lines", RenderOperation::OT_LINE_LIST);
float c;
for (int i = 10; i<=_units ; i+=10)
{
c = (i%100) ? 0.6 : 0.7;
grid->position(-_units, 0, i);
grid->colour(c, c, c);
grid->position( _units, 0, i);
grid->colour(c, c, c);
grid->position(-_units, 0, -i);
grid->colour(c, c, c);
grid->position( _units, 0, -i);
grid->colour(c, c, c);
grid->position(i, 0, -_units);
grid->colour(c, c, c);
grid->position(i, 0, _units);
grid->colour(c, c, c);
grid->position(-i, 0, -_units);
grid->colour(c, c, c);
grid->position(-i, 0, _units);
grid->colour(c, c, c);
}
grid->end();
grid->setQueryFlags(0x00);
gridNode->attachObject(grid);
}
示例2: _createGrid
//-----------------------------------------------------------------------------
void OgreApplication::_createGrid(int _units)
{
SceneNode *gridNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("WorldGrid Node");
ManualObject *axes = mSceneMgr->createManualObject("AXES");
axes->begin("WorldGrid/Axes", RenderOperation::OT_LINE_LIST);
// X axis
axes->position(-_units, 0.0, 0.0);
axes->colour(0.1, 0.0, 0.0);
axes->position( _units, 0.0, 0.0);
axes->colour(1.0, 0.0, 0.0);
// Y Axis
axes->position(0.0, -_units, 0.0);
axes->colour(0.0, 0.1, 0.0);
axes->position(0.0, _units, 0.0);
axes->colour(0.0, 1.0, 0.0);
// Z axis
axes->position( 0.0, 0.0, -_units);
axes->colour(0.0, 0.0, 0.1);
axes->position( 0.0, 0.0, _units);
axes->colour(0.0, 0.0, 1.0);
axes->end();
gridNode->attachObject(axes);
axes->setQueryFlags(0x00);
ManualObject *grid = mSceneMgr->createManualObject("Grid Lines");
grid->begin("WorldGrid/Lines", RenderOperation::OT_LINE_LIST);
float c;
for (int i = 10; i<=_units ; i+=10)
{
c = (i%100) ? 0.6 : 0.7;
grid->position(-_units, 0, i);
grid->colour(c, c, c);
grid->position( _units, 0, i);
grid->colour(c, c, c);
grid->position(-_units, 0, -i);
grid->colour(c, c, c);
grid->position( _units, 0, -i);
grid->colour(c, c, c);
grid->position(i, 0, -_units);
grid->colour(c, c, c);
grid->position(i, 0, _units);
grid->colour(c, c, c);
grid->position(-i, 0, -_units);
grid->colour(c, c, c);
grid->position(-i, 0, _units);
grid->colour(c, c, c);
}
grid->end();
grid->setQueryFlags(0x00);
gridNode->attachObject(grid);
}