PolyMesh triangulation

102 views
Skip to first unread message

Sebastian Graf

unread,
Oct 26, 2012, 1:07:09 PM10/26/12
to recastna...@googlegroups.com
Hi,

I'm having issues with poly mesh triangulation. Sometimes, a complex (simplified) contour is not fully polygonized. Maybe it's me indexing the poly mesh indices the wrong way, but I highly doubt that. Strange enough, there are not indexed vertices in a poly mesh, so I conclude that there are just are no indices.
I changed the recast code to support more height bits and exchanged all unsigned char 's in area flag declarations with a typedef, but those doesn't touch triangulation in the slightest... 

PolyMesh: http://dl.dropbox.com/u/19872237/polymesh.jpg (the light part is due to another polygon under the layer of interest)

Interfacing code to C#:

Thanks, and let me know if you need more info.

Mikko Mononen

unread,
Oct 27, 2012, 5:36:14 AM10/27/12
to recastna...@googlegroups.com
Hi,

There's no reason why simple case like yours would not work.

Something in your explanation does not sounds right, the polygons are
index polys. See the debug draw functions for an example how to use
the data structures:

http://code.google.com/p/recastnavigation/source/browse/trunk/DebugUtils/Source/RecastDebugDraw.cpp#855


--mikko

Sebastian Graf

unread,
Oct 27, 2012, 12:21:50 PM10/27/12
to recastna...@googlegroups.com
Hey,

Actually I'm enumerating exactly like duDebugDrawPolyMesh. See my paste in the first post: It's pretty much a c&p of duDebugDrawPolyMesh.

Sebastian Graf

unread,
Oct 29, 2012, 12:42:11 PM10/29/12
to recastna...@googlegroups.com
Nah, forget about it. It was me failing to replace the last typedef for my area type (unsigned short). The walkable flag wasn't copied then and those polygons didn't show up in my viewer.
I wish you would provide simple structs or typedefs instead of using the raw types. It would make replace tasks trivial with the aid of the compiler.
Reply all
Reply to author
Forward
0 new messages