Advertisement

Surround Algorithm

Started by July 05, 2000 05:55 PM
0 comments, last by Goodlife 24 years, 5 months ago
Hi all... Ever seen those paint programs where you can pick a tool, draw a wave, irregular circle, and have the program select everything inside the circle (or any other odd shape?) I''m writing a 3d editor, and I want to implement that in order to select vertices. I have no problem drawing the thing-- and I would have no problem selecting the vertices inside it if I could figure out which is the inside and which is the outside! So does anyone know how, if you were to recieve a large array of points, you would determine a point guaranteed to be on the inside? That''s all I really need. The routine I have now sometimes picks points on the outside, so... Thanks! -- Goodlife ----------------------------- Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
If you mean to draw a kind of ''lasso'' around something, then you would have one continuous line with its own vertices in some order... you could therefore divide that into some sort of triangle strip by stepping through the vertices in opposite directions, and everything ''inside'' would have to be within those triangles.

This topic is closed to new replies.

Advertisement