vector_2d_to_3d


Description:


public void vector_2d_to_3d (int sx, int sy, int w, int h, int x, int y, Vector3 vp, Vector3 p)

\"Compute screen (sx, sy) - (sx + w, sy + h) to 3D unit square mapping.

The plane to map to is given in the z field of p. The observer is located at position vp (vp->z != 0.0).\"

In other words, this computes the projection of the point (x, y) to the plane z = p->z ( parallel to XY), from the vp point of view through the screen (sx, sy)->(sx + w, sy + h)

Parameters:

sx

the abscissa of the upper-left screen rectangle.

sy

the ordinate of the upper-left screen rectangle.

w

the width of the screen rectangle.

h

the height of the screen rectangle.

x

the abscissa of the point in the screen rectangle to map.

y

the ordinate of the point in the screen rectangle to map.

vp

the position of the observer.

p

the resulting point.


Namespace: Gimp
Package: gimp-3.0