[Tutor] Point in polygon intro please~!
János Juhász
janos.juhasz at VELUX.com
Mon Oct 9 10:54:41 CEST 2006
Hi Michael,
> Subject: Re: [Tutor] Point in polygon intro please~!
> To: Michael Shulman <contact at endarion.com>
> Cc: tutor at python.org
> Message-ID: <4527AA35.4030000 at tds.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Michael Shulman wrote:
> > Hello, I'm very new to both python and OpenGL, but I'm catching on
> > pretty quick,
> > and trying to make a little game. I'm stuck on being able to do this
> > point-in-polygon test though.
> > Everyone seems to say that I should create a ray and see how many
sides
> > of a polygon it intersects, (even vs odd)
> > but I have no idea how to go about setting this up.
If you would like to get the 3D object, that belongs to the given pixel,
OpenGL gives a simpler way for it with glRenderMode(GL_SELECT);
Converting the 3D objects to poligons, seems to be too difficult,
and not needed.
Take a look after the GL_SELECT mode
http://www.google.hu/search?hl=hu&q=glRenderMode%28GL_SELECT%29&meta=
Yours sincerely,
______________________________
János Juhász
More information about the Tutor
mailing list