Re: Calculating normalized patch coords from pixel coords?
Status: Alpha
Brought to you by:
cwalther
|
From: James C. W. <jfc...@ya...> - 2010-03-31 19:27:08
|
I think I understand. Thanks, Christian!
-James
--- On Sat, 3/27/10, Christian Walther <cwa...@gm...> wrote:
From: Christian Walther <cwa...@gm...>
Subject: Re: Calculating normalized patch coords from pixel coords?
To: "Content creation for the Pipmak Game Engine" <pip...@li...>
Date: Saturday, March 27, 2010, 12:21 PM
> In order to have a patch work across 3d space, and not be hindered
> by the seperate cube faces, I wondered if there was a way to
> calculate, with the 2D coords(e.g. face 1, 342, 567) the equivilent
> in 3D coords?
Sure, you have everything you need. You can get the pixel dimensions
of the background face from 'w, h =
pipmak.getimage("myface.jpeg"):size()', and the geometrical
arrangement of the face images in 3D space is shown in figures 2 and 3
in the manual. An edge of the cube is two units in normalized units
and (w-1) or (h-1) in pixels, which gets you the scale factor, and as
a fixed point you know that (w/2, h/2) in pixels is (0, 0, -1) in
normalized coordinates (the center of the face), for face 1, and so on
for the other faces as shown in figure 2.
-Christian
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Pipmak-Users mailing list
Pip...@li...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users
|