Drawing a truncated cone

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cegprakash
Posts: 41
Joined: Thu Feb 27, 2014 10:55 am

Drawing a truncated cone

Post by cegprakash »

Is there any Irrlicht function available to create truncated cones?

Given radius1 , radius2 and height and the position and rotation of the node, I need to draw a truncated cone.
I appreciate any help.

Thanks in advance.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Drawing a truncated cone

Post by smso »

See my code snippet to create a frustrum mesh:

http://irrlicht.sourceforge.net/forum/v ... =9&t=45413

Regards,
smso
cegprakash
Posts: 41
Joined: Thu Feb 27, 2014 10:55 am

Re: Drawing a truncated cone

Post by cegprakash »

Your code works like a charm. I'm really interested to know your tessellation algorithm to find the triangle vertices. The vertices count is a bit high and I'd like to reduce it.
cegprakash
Posts: 41
Joined: Thu Feb 27, 2014 10:55 am

Re: Drawing a truncated cone

Post by cegprakash »

Please add some comments in your code to understand its' working. :oops:
cegprakash
Posts: 41
Joined: Thu Feb 27, 2014 10:55 am

Re: Drawing a truncated cone

Post by cegprakash »

It would have been better with updateRadius, updateHeight functions :| Because I never know how much scale I should set in each direction.
Post Reply