Could you please tell me how to draw very simple picture.
I have coordinates of two 3d points.
I just want to draw line between that points?
Could you please tell me which functions I should use.
irr::core::line3df line; // put your values in here
irr::video::IVideoDriver* driver = SceneManager->getVideoDriver();
driver->setTransform(irr::video::ETS_WORLD, irr::core::IdentityMatrix);
irr::video::SMaterial material;
material.Lighting = false;
material.BackfaceCulling = false;
material.ZBuffer = irr::video::ECFN_ALWAYS;
driver->setMaterial(material);
driver->draw3DLine( line.start, line.end, irr::video::SColor(255, 200, 50, 50) );
irr::IrrlichtDevice *device = irr::createDevice(irr::video::EDT_OPENGL, irr::core::dimension2d< u32 >(640,480) ,16, false);
irr::video::IVideoDriver* driver = device->getVideoDriver();
irr::scene::ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
irr::core::line3df line(10, 50, 10, 300, 100, 400); // put your values in here
irr::video::SMaterial material;
material.Lighting = false;
material.BackfaceCulling = false;
material.ZBuffer = irr::video::ECFN_ALWAYS;
driver->setMaterial(material);
device->setWindowCaption(L"test");
while(device->run())
{
driver->setTransform(irr::video::ETS_WORLD, irr::core::IdentityMatrix);
driver->beginScene(true,true, video::SColor(255,200,200,200));
driver->draw3DLine( line.start, line.end, irr::video::SColor(255, 20, 20, 100) );
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();Users browsing this forum: Google [Bot], jrlago and 1 guest