Aligning a texture with a polygon
i am tryin开发者_JS百科g to write a mini 3d engine for a lightweight game. In the engine i already have it forming a wireframe polygon in 3d from x,y,z coorinates. What i cant figure out how to do is to shear an image correctly so it will align correctly to a polygon such as this one:
Polygon p = new Polygon(new int[]{100, 160, 220, 180}, new int[]{100, 100, 150, 160}, 4);
精彩评论