Usage of Normals in Irrlicht

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Usage of Normals in Irrlicht

Post by Silbermünze »

Hello everyone!

Currently I amtrying to figure out how Irrlicht makes use of normals, meaning how they are stored for example for a mesh. Ideally I do want to implement a small function that visualizes the normals of a given mesh, so I can quickly evaluate whether the normals have been exported and loaded to Irrlicht correctly, or whether they are existent at all.

For that reason I looked at the IMeshBuffer which seems to hold all the vertices data as well indices data. However I was not able to locate whether there is an array that stores the normals for a mesh (if Irrlicht does at all).
So any hint to point me into a direction where to find the normals' data of a mesh would be great.

Secondly, in that context I would like to know if Irrlicht uses such normals, how they are applied to a mesh? On face-basis or on vertex-basis?

Thanks in advance
Silbermünze
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

The normals are stored in each verticle, and are applied per vertex.
Check S3DVertex.h
If you don't have anything nice to say, don't say anything at all.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Try node->setDebugDataVisible(EDS_NORMALS);, I know it works for animated meshes.
Post Reply