本文整理汇总了C++中ogre::ManualObject::getSection方法的典型用法代码示例。如果您正苦于以下问题:C++ ManualObject::getSection方法的具体用法?C++ ManualObject::getSection怎么用?C++ ManualObject::getSection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::ManualObject
的用法示例。
在下文中一共展示了ManualObject::getSection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createAxes
void MoveDemoApplication::createAxes()
{
Ogre::ManualObject* pManualObject = mSceneMgr-> createManualObject( "ManualGridObj ");
if (pManualObject)
{
int nLength = 160 ;
pManualObject-> begin( "", Ogre::RenderOperation::OT_LINE_LIST);
pManualObject-> position(0, 0, 0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(nLength*4, 0, 0);
pManualObject-> position(0, 0, 0);
pManualObject-> colour(Ogre::ColourValue::Green);
pManualObject-> position(0, nLength, 0);
pManualObject-> position(0, 0, 0);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(0, 0, nLength);
pManualObject-> end();
pManualObject->getSection(0)->getTechnique()->getPass(0)->setLightingEnabled(false);
Ogre::SceneNode*pSceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "ManualGridNode ");
if(pSceneNode)
pSceneNode-> attachObject(pManualObject);
}
}
示例2: createPath
void MoveDemoApplication::createPath()
{
Ogre::ManualObject* pManualObject = mSceneMgr-> createManualObject( "PathObj");
if (pManualObject)
{
pManualObject-> begin( "", Ogre::RenderOperation::OT_LINE_LIST);
pManualObject-> colour(Ogre::ColourValue(1.0 , 1.0 , 0 ));
pManualObject-> position(Vector3( 0.0f, 1.0f, 25.0f ));
pManualObject-> position(Vector3( 550.0f, 1.0f, 50.0f ));
pManualObject-> position(Vector3( 550.0f, 1.0f, 50.0f ));
pManualObject-> position(Vector3(-100.0f, 1.0f, -200.0f ) );
pManualObject-> position(Vector3(-100.0f, 1.0f, -200.0f ) );
pManualObject-> position(Vector3( 0.0f, 1.0f, 25.0f ));
pManualObject-> end();
pManualObject->getSection(0)->getTechnique()->getPass(0)->setLightingEnabled(false);
Ogre::SceneNode*pSceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "PathNode ");
if(pSceneNode)
pSceneNode-> attachObject(pManualObject);
}
}
示例3: createGrid
void MoveDemoApplication::createGrid()
{
Ogre::ManualObject* pManualObject = mSceneMgr-> createManualObject( "TestManualObject ");
if (NULL == pManualObject)
return ;
pManualObject-> begin( " ", Ogre::RenderOperation::OT_LINE_LIST);
{
int startX=-1000 ;
int startZ = -1000;
int endX=1000 ;
int endZ = 1000;
int step = 50;
//int nLength = 160 ;
pManualObject-> colour(Ogre::ColourValue(0.5,0.5,0.5) );
for (int idx = 0 ; idx< (endX - startX)/step ; ++idx )
{
pManualObject-> position(startX+step*idx, 0, startZ);
pManualObject-> position(startX+step*idx, 0, endZ);
}
for (int idx = 0 ; idx< (endZ - startZ)/step ; ++idx )
{
pManualObject-> position(startX, 0, startZ+step*idx );
pManualObject-> position(endX, 0, startZ+step*idx);
}
}
pManualObject-> end();
pManualObject->getSection(0)->getTechnique()->getPass(0)->setLightingEnabled(false);
Ogre::SceneNode* pSceneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "TestSceneNode ");
if (NULL == pSceneNode)
return ;
pSceneNode-> attachObject(pManualObject);
}