Function

Gimpvector_3d_to_2d

Declaration [src]

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

Description [src]

Convert the given 3D point to 2D (project it onto the viewing plane, (sx, sy, 0) - (sx + w, sy + h, 0). The input is assumed to be in the unit square (0, 0, z) - (1, 1, z). The viewpoint of the observer is passed in vp.

This is basically the opposite of gimp_vector_2d_to_3d().

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: gdouble*

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

The argument will be set by the function.
y

Type: gdouble*

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

The argument will be set by the function.
vp

Type: GimpVector3

Position of the observer.

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

Type: GimpVector3

The 3D point to project to the plane.

The data is owned by the caller of the function.