Ogre::ManualObject* pManualObject=mSceneMgr->createManualObject("TestManualObject");
if(NULL==pManualObject)
return;
pManualObject-> begin( "BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_LIST);
{
//x
pManualObject-> position(0,0,0);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(20,0,0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(20,0,0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(17,3,0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(20,0,0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(17,-3,0);
pManualObject-> colour(Ogre::ColourValue::Red);
//y
pManualObject-> position(0,0,0);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(0,20,0);
pManualObject-> colour(Ogre::ColourValue::Green);
pManualObject-> position(0,20,0);
pManualObject-> colour(Ogre::ColourValue::Green);
pManualObject-> position(3,17,0);
pManualObject-> colour(Ogre::ColourValue::Green);
pManualObject-> position(0,20,0);
pManualObject-> colour(Ogre::ColourValue::Green);
pManualObject-> position(-3,17,0);
pManualObject-> colour(Ogre::ColourValue::Green);
//z
pManualObject-> position(0,0,0);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(0,0,20);
pManualObject-> colour(Ogre::ColourValue::Red);
pManualObject-> position(0,0,20);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(0,3,17);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(0,0,20);
pManualObject-> colour(Ogre::ColourValue::Blue);
pManualObject-> position(0,-3,17);
pManualObject-> colour(Ogre::ColourValue::Blue);
}
pManualObject-> end();
Ogre::SceneNode* pSceneNode=mSceneMgr->getRootSceneNode()->createChildSceneNode( "TestSceneNode ");
if (NULL == pSceneNode)
return ;
pSceneNode-> attachObject(pManualObject);