[helpfile addition] Add details to addSphereSceneNode() doc

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
miko93
Posts: 54
Joined: Sat Nov 12, 2005 5:24 pm
Location: Regensburg, Germany
Contact:

[helpfile addition] Add details to addSphereSceneNode() doc

Post by miko93 »

Hello,

I'd like to propose to add the following text to the docs of addSphereSceneNode() in the helpfile.
It was given to me by vitek here:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25575

Code: Select all

The value polyCount that you are passing to addSphereSceneNode() is not the total number of polys to use to make the sphere, it is the number of polys per row/column of the sphere.
Imagine you had a sphere with 16 rows and 16 columns and unwrapped it into a grid. The total number of cells in the grid would be 16 * 16 = 256. Now imagine that each cell of the grid is made of two triangles [primitives]. The total number of primitives for your sphere would be (16 * 16) * 2 = 512. More generally, it would be (polyCount * polyCount) * 2.
Thanks
"Yessir, I'll be happy to make these unnecessary changes to this irrelevant document." (Dilbert)
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I also think so.
And I think it should be moved to the open discussion forum.

Oh and why did you mentioned "triangles"?
Now imagine that each cell of the grid is made of two triangles [primitives]
Last edited by MasterGod on Mon Jan 07, 2008 4:14 pm, edited 1 time in total.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, this is the correct forum, he means to add some words to the API docs.
BTW: Yes, seems a good addition. The CSphereSceneNode uses polyCountX and polyCountY or something like that, so it's more obvious that it's not the total count. But for the scene manager it's pretty misleading.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Oh and why did you mentioned "triangles"?
Because primitives aren't always triangles.
Post Reply