[fixed] [patch] - EDS_NORMALS debug
[fixed] [patch] - EDS_NORMALS debug
Patch: 2838269 - Fix for EDS_NORMALS debug
This patch fixes EDS_NORMALS debug visual for CMeshSceneNode & CAnimatedMeshSceneNode.cpp. It replaces the arrow mesh with a 3D line. It also allows setting the debug normal Length & Color through ISceneNode.
Before:
After: (with default normal color)
This patch fixes EDS_NORMALS debug visual for CMeshSceneNode & CAnimatedMeshSceneNode.cpp. It replaces the arrow mesh with a 3D line. It also allows setting the debug normal Length & Color through ISceneNode.
Before:
After: (with default normal color)
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
-
- Posts: 362
- Joined: Sun Dec 16, 2007 9:25 pm
Looks much better!
Post this userbar I made on other websites to show your support for Irrlicht!
http://img147.imageshack.us/img147/1261 ... wernq4.png
http://img147.imageshack.us/img147/1261 ... wernq4.png
The ability to set/get the color isn't all that important to me personally, but I think having the ability to set the length has some merit. The default length of 1 looks a bit small in "09.MeshViewer.exe":hybrid wrote:...but the two additional parameters with members and getters/setters seem to be overkill.
Normals aren't all necessarily normalized so the length would be determined by the normal itself. You can have a "length mutiplier" though to adjust the length if you desire.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 168
- Joined: Sun Feb 04, 2007 3:30 pm
- Location: France
I like this better - saves having to update each node to a length other than the default.bitplane wrote:Maybe it could be a scene parameter instead?
Yes, forgot about that:BlindSide wrote:Normals aren't all necessarily normalized so the length would be determined by the normal itself
Code: Select all
driver->draw3DLine(v->Pos, v->Pos + (v->Normal * DebugNormalLength), DebugNormalColor);
// replaced with:
normalizedNormal = v->Normal;
normalizedNormal.normalize();
driver->draw3DLine(v->Pos, v->Pos + (normalizedNormal * DebugNormalLength), DebugNormalColor);
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact: