Closed GoogleCodeExporter closed 9 years ago
I'm not sure of the granularity of the function is something I'd like to add the
core, but I will at least promote the addSpan to the API, as it will be useful
for
custom promitives such as analytically rasterizing a sphere or regular
heighfield. I
can add return code too.
Original comment by memono...@gmail.com
on 6 Feb 2010 at 3:16
The function would be useful, if only to hide how things work internally. I'd
prefer
to avoid external functionality that requires me to know how things work
internally
in order to use. Alternately maybe you could return that code from the
rasterizetriangles, and I could just pass in the same point as each vertex of a
triangle.
Original comment by jswig...@gmail.com
on 8 Feb 2010 at 2:55
I added rcAddSpan to the API, not the full rasterize vertex. I also decided
against
the return value. I do not want to add functions which the code does not need
and
which I don't know how to maintain. The return values falls into the second
category.
I also want to encourage to keep Recast process as transparent as possible to
allow
people to hack the in between data if they needs to do that.
You can use following code to check if the span exits before you call addSpan
(not
100% if I got the logic right):
// new span is already handled?
bool spanAdded = true;
for (rcSpan* s = solid.spans[x0 + y0*solid.width]; s; s = s->next)
{
if (ismin >= s->smin && ismax <= s->smax)
spanAdded = false;
}
rcAddSpan is added in R127.
Original comment by memono...@gmail.com
on 12 Feb 2010 at 1:27
Original issue reported on code.google.com by
jswig...@gmail.com
on 6 Feb 2010 at 8:05Attachments: