![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Okay, in going nuts, completly insane trying to get this done and i was hoping somone here could help me out. Im building a small 3D world. All the basic components are there, all my shapes are in x,y,z coord format. I rotate them, i translate them, i place em in the world where they need to be, and so on. I also project them, so every 3D shape i have is reduced to X,Y form. Each face (im using all quadrilaterals, maybe i shoulda used triangles but too late now) is stored in arrays Xpix[4], Ypix[4] which holds X,Y values on the screen for each face. Now then, i pass these into gOffscreen.fillPolygon(Xpix,Ypix,4) which paints one quadrilateral at a time nice and neatly on the screen. I have been busting my brain trying to replace this Polygon fill with a simple nice effiecient texture mapping procedure. Ive looked all over the net but i cant for the life of me find a decent example where they show how i can project a 2D texture to my projected 2D polygon. I can read in all the pixel data nicely using pixelGrabber, and i have the onscreen projected X,Y coords for each facet, and what i need is some way of texturing those facets. If anyone can help me in any way at all please please please post here or email me at "le_bob_83@yahoo.com". Thanks in advance -Robert
Replies: |
Sponsored Links
|