28 Commits

Author SHA1 Message Date
Piotr Piastucki
3901c5854c
Fix incorrect rasterization at tile borders (#476)
* Fix incorrect rasterization at tile borders

Clip the polygon at the tile border and disregard coordinates outside of
the tile before clamping.

* Added unit test with minimal repro case for the rasterization issue fixed in PR #476

Co-authored-by: Graham Pentheny <graham.pentheny@gmail.com>
2022-11-23 02:42:03 -05:00
Rafael Stahl
15025e8519 handle the case when allocSpan fails to allocate memory. adds bool return types to rcAddSpan, rcRasterizeTriangle and rcRasterizeTriangles 2015-12-18 16:41:02 +01:00
Rafael Stahl
6d3c9b38ba add rcScopedTimer to fix timers not being stopped on all paths and to prevent it in the future. 2015-12-18 14:48:31 +01:00
Kromster80
a94ecdc079 Removed unneeded assignment 2014-12-13 10:55:04 +03:00
axelrodR
adcd4f472e bugfix: divPoly could produce an 8th point after several calls because some of the old clipPoly code on which it was based
can add the same point twice consecutively (interpolation+adding the point).
Rather than raising the buffer I rewrote divPoly to avoid adding the same point twice.
2014-01-21 22:05:40 +02:00
axelrodR
f60468abcb Merge branch 'master' of https://github.com/memononen/recastnavigation
thrown away the fix I made to Recast/Source/RecastMeshDetail.cpp in favor of the upstream code.
2014-01-20 01:28:33 +02:00
axelrodR
b4204ba9a2 bugfix: minor typo caused stack overrun when several vertices happen to fall exactly on cell boundaries 2014-01-20 00:12:53 +02:00
Mikko Mononen
ad7a13cbf3 Small formatting change to dividePoly() 2014-01-19 16:47:26 +02:00
axelrodR
e063ba6f5a Rasterization optimization: replaced clipping for each individual cell. the clipping line/plane between two adjacent cells is common so data from former cell can be reused if we keep track of the "remaining polygon". 2014-01-15 14:14:08 +02:00
axelrodR
8e4633c64b Performance optimizations:
1. Triangle rasterization: replaced loops over all the grid cells of the AABB with looping over the area of the triangle itself (i.e. bounds are set per row).
2. Region expansion: instead of sweeping through all the cells at each expandRegion() and finding the right level - sweep once per few levels and divide among several stacks. Left over are appended.
2014-01-08 12:02:00 +02:00
Stephen Pratt
6f5c9f9b82 Recast: Detail API documentation for the members declared in Recast.h. (Complete)
Recast.h: Completed rcPolyMeshDetail through end, plus updates to existing documentation.
Configuration: Removed DebugUtils directory from the document build.
Configuration: Fixed issue 179. (Backslashes)
2011-08-29 23:03:16 +00:00
Mikko Mononen
5abddbf0cd Refactored rcBuildContext to be more customization friendly, changed name to rcContext. 2010-08-24 17:53:38 +00:00
Mikko Mononen
8215cd48d1 - win32 compile fixes
- update vc project
2010-08-19 10:23:58 +00:00
Mikko Mononen
613d61f453 Removed Recast timer and log, added rcBuildContext, improved build time printout, fixed issue 67, issue 77, issue 87 2010-08-19 09:26:55 +00:00
Mikko Mononen
5ebcb453fb Issue 45:Input triangle based area creation (another try) 2010-07-13 07:19:10 +00:00
Mikko Mononen
cd3a351f40 Custom allocator for Recast. 2010-07-09 12:55:14 +00:00
Mikko Mononen
87800abc28 Fix for Issue 73, Handle zero-height spans. 2010-05-05 13:15:40 +00:00
Mikko Mononen
10b330ffb4 Moved common functions behind name decoration. 2010-04-14 18:45:46 +00:00
Mikko Mononen
193f44a388 Issue 61: take 2, missing files. 2010-04-13 10:58:18 +00:00
Mikko Mononen
5119b5cb16 API CHANGE! Better serialization support. 2010-03-25 12:24:40 +00:00
Mikko Mononen
dd5377a503 Moved rcAddSpan to public API. 2010-02-12 13:19:47 +00:00
Mikko Mononen
9bf68216a3 Better handling of low obstacles. 2010-01-29 11:37:14 +00:00
Mikko Mononen
ecb01d3441 Added functions to rasterize index mesh based in ushort indices and function which is equivalent to ogl drawArrays. 2009-10-23 13:41:48 +00:00
Mikko Mononen
404491901a Fixed Issue 10: clipping during rasterization. 2009-09-04 06:47:42 +00:00
Mikko Mononen
d71740036d Demo: Changed demo "Builders" to "Samples".
Detour: Prefixed static nav with 'dtStat', this includes polys and poly refs too.
imgui: Made imgui code not to use id:s anymore, since there were way too many id clashes.
imgui: Separated the rendering code into its' own file, changed prebaked font to use stb_truetype instead, removed glfont.
imgui: Added 'disabled' property to widgets.
Recast: exposed single triangle rasterization into the recast api.
Demo: Changed the debug draw validation to be "soft", easier to demo now.
2009-07-13 10:30:37 +00:00
Mikko Mononen
e638624828 Version 1.2
Removed paris demo code.
Cleaned up the API and added missing comments.
2009-06-16 09:57:55 +00:00
Mikko Mononen
c56ebb7e77 - (too) large refactoring of the generation and demo code to support tiled preprocessing
- added rcFixupAdjacentContours which adjust adjacent contour sets so that that they share all vertices (still buggy!)
- changed the demo stucture to handle tiled navmesh generation process (still ugly)
- the performance results are put into a struct instead of logged immediatelly
- added ChunkyTriMesh class which allows to partiotion a trimesh to smaller pieces using AABB tree
2009-05-17 13:31:09 +00:00
Mikko Mononen
06832c885e Initial commit. 2009-03-29 10:30:52 +00:00