[gameprogrammer] Re: poly fill
- From: "Alan Wolfe" <alan.wolfe@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sat, 31 Mar 2007 16:22:28 -0700
Thanks guys, i'll check out both and post what method worked for me if
i can get it working :P
On 3/31/07, Scott Harper <lareon@xxxxxxxxxxx> wrote:
> I read up a way to do this with scan lines but unfortunately I have to
> use 3d graphics primitives (qauds, triangle fans etc) to fill in this
> polygon, so I can't do it that way :P
I don't remember EXACTLY how, but you can still do it with 3D
primitives using scanlines. What you have to do is some projection.
You need to have a projection matrix and used that to project the 3D
vertices onto points along the 2D viewing plane (basically your
monitor). That will give you 2D coordinates and you use scanlines to
fill the polygon that way.
Unfortunatelky it's been an awfully long time since I did that by
hand in class, so I can't tell you more specifically right now, but
maybe that will give you a better starting point?
-- Scott
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] poly fill
- From: Alan Wolfe
- [gameprogrammer] Re: poly fill
- From: Scott Harper
Other related posts:
- » [gameprogrammer] poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
- » [gameprogrammer] Re: poly fill
> I read up a way to do this with scan lines but unfortunately I have to > use 3d graphics primitives (qauds, triangle fans etc) to fill in this > polygon, so I can't do it that way :P I don't remember EXACTLY how, but you can still do it with 3D primitives using scanlines. What you have to do is some projection. You need to have a projection matrix and used that to project the 3D vertices onto points along the 2D viewing plane (basically your monitor). That will give you 2D coordinates and you use scanlines to fill the polygon that way. Unfortunatelky it's been an awfully long time since I did that by hand in class, so I can't tell you more specifically right now, but maybe that will give you a better starting point? -- Scott --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] poly fill
- From: Alan Wolfe
- [gameprogrammer] Re: poly fill
- From: Scott Harper