Hello!
So I'm trying to work out how to draw a 3D line in a circle. I cannot figure out how to work the line3d(http://irrlicht.sourceforge.net/docu/cl ... ine3d.html).
Kinda newish to C++.
Thanks for any help
3D Lines?
Re: 3D Lines?
Can you show what you tried so far?
Basically it's:
1. Get a videodriver (see any examples, they all use one). 2. Set the material used for linedrawing (typically a video::SMaterial with lighting disabled)
3. Reset the draw transformation before starting to draw lines (that is unless you want to have a transformation). Usually you call: videodriver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
4. Draw the line with videodriver->draw3DLine and give it the start and end-points as parameter. Optionally a color.
Basically it's:
1. Get a videodriver (see any examples, they all use one). 2. Set the material used for linedrawing (typically a video::SMaterial with lighting disabled)
3. Reset the draw transformation before starting to draw lines (that is unless you want to have a transformation). Usually you call: videodriver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
4. Draw the line with videodriver->draw3DLine and give it the start and end-points as parameter. Optionally a color.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: 3D Lines?
Thanks for the reply. I can manage to draw a 3D line now(although it's always black). But how can I draw a circle when the parameters are a start and end point?CuteAlien wrote:Can you show what you tried so far?
Basically it's:
1. Get a videodriver (see any examples, they all use one). 2. Set the material used for linedrawing (typically a video::SMaterial with lighting disabled)
3. Reset the draw transformation before starting to draw lines (that is unless you want to have a transformation). Usually you call: videodriver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
4. Draw the line with videodriver->draw3DLine and give it the start and end-points as parameter. Optionally a color.
Re: 3D Lines?
There is no 3D circle support in Irrlicht (there is one for 2d with draw2DPolygon). But I found 2 posts in the forum which might help you with that:
http://irrlicht.sourceforge.net/forum/v ... =9&t=46059
http://irrlicht.sourceforge.net/forum/v ... =1&t=48744
http://irrlicht.sourceforge.net/forum/v ... =9&t=46059
http://irrlicht.sourceforge.net/forum/v ... =1&t=48744
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm