Page 1 of 1

Geometric Primitives

Posted: Mon Jun 19, 2006 8:55 pm
by lingwitt
This topic came up in the Beginners Forum

It would be nice if the engine provided basic primitives like boxes, spheres, toruses, cylinders, hemispheres, capsules (cylinders with hemispherical ends), and perhaps even a method for generating random rocks inscribed within a sphere.

This could help immensely for testing, proof of concepts, and actual content.

I was somewhat depressed when I found I needed either to model my own or subdivide an icosahedron, which brings me to another point:

Perhaps a generic API for subdivision could be useful.
This could of course be implemented as Subdivider, whose subclasses specify different methods of subdivision.

These are just ideas from someone who knows neither 3D concepts, nor this engine well, so please be kind.

Thanks!

hyrid wrote:

There is a box node which was called CTestSceneNode up to version 1.0, and will be henceforth named CCubeSceneNode. Maybe the renaming is a hint that good implementations of other geometric primitives can make it into the engine core as well. I'd need spheres and cylinders for the anim8or loader!
BTW: I'd prefer to have a mesh buffer generator instead of a scene node based API for these primitives. This would simplify the integration of these structures into larger objects.

bitplane wrote:
http://www.irrforge.org/index.php?title ... r_Irrlicht

[Perhaps that is a good starting point for incorporating this in the Engine.]

Posted: Sun Jul 02, 2006 9:01 am
by niko
I also thought about writing primitive mesh generators for Irrlicht, but I had no time for it until now. But if it helps a bit: I just wrote a sphere scene node (just like the cube scene node) with adjustable poly count (low polys make it look like rocks a bit) and will check it in soon.

Posted: Sun Jul 02, 2006 12:02 pm
by hybrid
What about the mesh buffer generator? This could be used for a sphere scene node, but also to simplify the sky dome etc. And I could integrate it into the anim8or loader. Otherwise one would need to create the scene node and copy the mesh into a new mesh buffer.

Posted: Tue Jul 11, 2006 2:24 pm
by omarb
HI,
is there a way to get a .net version of this new code?
and if yes from where i can get it?
thanks