Function

Gimpvector_2d_to_3d

Declaration [src]

void
gimp_vector_2d_to_3d (
  gint sx,
  gint sy,
  gint w,
  gint h,
  gint x,
  gint y,
  const GimpVector3* vp,
  GimpVector3* p
)

Description [src]

"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

Type: gint

The abscissa of the upper-left screen rectangle.

sy

Type: gint

The ordinate of the upper-left screen rectangle.

w

Type: gint

The width of the screen rectangle.

h

Type: gint

The height of the screen rectangle.

x

Type: gint

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

y

Type: gint

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

vp

Type: GimpVector3

The position of the observer.

The data is owned by the caller of the function.
p

Type: GimpVector3

The resulting point.

The data is owned by the caller of the function.