<?xml version="1.0"?>
<page id="Gimp.vector_3d_to_2d"
      type="topic"
      style="function"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="index" group="function" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>void</api:type>
      </api:returns>
      <api:name>gimp_vector_3d_to_2d</api:name>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>sx</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>sy</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>w</api:name>
      </api:arg>
      <api:arg>
        <api:type>Number(gint)</api:type>
        <api:name>h</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.Vector3</api:type>
        <api:name>vp</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.Vector3</api:type>
        <api:name>p</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.vector_3d_to_2d</title>
  <synopsis><code mime="text/x-gjs">
function vector_3d_to_2d(sx: Number(gint), sy: Number(gint), w: Number(gint), h: Number(gint), vp: <link xref="Gimp.Vector3">Gimp.Vector3</link>, p: <link xref="Gimp.Vector3">Gimp.Vector3</link>): [x: Number(gdouble), y: Number(gdouble)] {
    // Gjs wrapper for gimp_vector_3d_to_2d()
}
  </code></synopsis>
  <p>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.</p>  <p>This is basically the opposite of <link xref="Gimp.vector_2d_to_3d"/>.</p>

<terms>
<item>
<title><code>sx</code></title>
  <p>the abscissa of the upper-left screen rectangle.</p>
</item>
<item>
<title><code>sy</code></title>
  <p>the ordinate of the upper-left screen rectangle.</p>
</item>
<item>
<title><code>w</code></title>
  <p>the width of the screen rectangle.</p>
</item>
<item>
<title><code>h</code></title>
  <p>the height of the screen rectangle.</p>
</item>
<item>
<title><code>vp</code></title>
  <p>position of the observer.</p>
</item>
<item>
<title><code>p</code></title>
  <p>the 3D point to project to the plane.</p>
</item>
<item>
<title><code>x</code></title>
  <p>the abscissa of the point in the screen rectangle to map.</p>
</item>
<item>
<title><code>y</code></title>
  <p>the ordinate of the point in the screen rectangle to map.</p>
</item>
</terms>

</page>
