### Function

# Gimp vector_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` | `gint`
| The abscissa of the upper-left screen rectangle.
`sy` | `gint`
| The ordinate of the upper-left screen rectangle.
`w` | `gint`
| The width of the screen rectangle.
`h` | `gint`
| The height of the screen rectangle.
`x` | `gint`
| The abscissa of the point in the screen rectangle to map.
`y` | `gint`
| The ordinate of the point in the screen rectangle to map.
`vp` | `GimpVector3`
| The position of the observer.
| The data is owned by the caller of the function.
`p` | `GimpVector3`
| The resulting point.
| The data is owned by the caller of the function.