LDCad 1.6 Alpha 2 (win+linux)


RE: LDCad 1.6 Alpha 2 (win+linux)
#7
(2016-05-10, 17:43)Travis Cobbs Wrote: Given that many Lego blocks are rectangular, I think adding a bounding box check for all parts that pass the bounding sphere check would be relatively fast, and improve things a lot. You can always add tighter checks later for parts that pass the bounding box check.

Another alternative is to do pixel-accurate tests, but this will only work if you are using old enough OpenGL for picking mode to be supported. I'm pretty sure that as long as you don't enable Z buffer, then picking mode can be used to find everything in the rectangle, even parts that are hidden by closer parts. But if picking mode isn't present, the pixel-color-based alternatives won't work, since they'll only tell you about the objects that aren't hidden by closer objects.

Yes, I was looking at this
http://www.lighthouse3d.com/tutorials/vi...ing-boxes/

But it could still give false positives. That wouldn't be a big problem when doing rendering culling but in the this usage case it is unwanted.

Final stage would be to test all the part's vertices to see if at least one of them is inside the region, but again it might be overlapping without any of them actually inside.

Fun stuff Smile

edit: edit: never mind.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: LDCad 1.6 Alpha 2 (win+linux) - by Roland Melkert - 2016-05-10, 19:17

Forum Jump:


Users browsing this thread: 2 Guest(s)