.. oe:namespace:: OEDepict



.. meta::
   :keywords: OE2DPoint, 2DPoint


.. _OEDepict_OE2DPoint:

.. oe:class:: OE2DPoint

   .. oe:api::

      class OE2DPoint

   This class represents :ref:`OE2DPoint <OEDepict_OE2DPoint>` that stores
   an x (horizontal), y (vertical) coordinate pair.

   The coordinate system used in **OEDepict TK** has the origin (x=0.0,
   y=0.0) at the top/left with the x-axis pointing to the right and
   the y-axis pointing down.
   See :ref:`Figure: 2D coordinate system<figure_OE2DPoint_CoordinateXY>`.

   .. _figure_OE2DPoint_CoordinateXY:

   .. figure:: ../images/CoordinateXY.*
      :align:  center

      **2D coordinate system (X = horizontal, Y = vertical)**

   .. ################################################################
      # Constructors
      ################################################################

   .. oe:method:: Constructors

      .. oe:language:: c++ java csharp

         .. oe:api::

            OE2DPoint()

      .. oe:language:: python

         .. oe:api:: python

            OE2DPoint() -> OE2DPoint

      Default constructor that initializes an :ref:`OE2DPoint <OEDepict_OE2DPoint>`
      object with x = 0.0, y = 0.0 coordinates.

      .. oe:language:: c++ java csharp

         .. oe:api::

            OE2DPoint(double x, double y)

      .. oe:language:: python

         .. oe:api:: python

            OE2DPoint(x: float, y: float) -> OE2DPoint

      Constructor that initializes an :ref:`OE2DPoint <OEDepict_OE2DPoint>` object
      with the give x, y coordinates. 

      .. oe:language:: c++ java csharp

         .. oe:api::

            OE2DPoint(const OE2DPoint& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OE2DPoint(arg2: OE2DPoint) -> OE2DPoint

      Copy constructor.


   .. ################################################################
      # operator=
      ################################################################

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OE2DPoint &operator=(const OE2DPoint &rhs)

      Assignment operator.


   .. oe:method:: operator+
      :language: c++

      .. oe:api::

         OE2DPoint operator+(const OE2DPoint &rhs) const

      Addition operator: :math:`(a_x, a_y) + (b_x, b_y) = (a_x + b_x, a_y + b_y)`

   .. oe:method:: operator-
      :language: c++

      .. oe:api::

         OE2DPoint operator-(const OE2DPoint &rhs) const

      Subtraction operator: :math:`(a_x, a_y) - (b_x, b_y) = (a_x - b_x, a_y - b_y)`

   .. oe:method:: operator/
      :language: c++

      .. oe:api::

         OE2DPoint operator/(double) const

      Division operator: :math:`(a_x, a_y) / D = (a_x / D, a_y / D)`

   .. oe:method:: operator *
      :language: c++

      .. oe:api::

         OE2DPoint operator *(double) const

      Multiplication operator: :math:`(a_x, a_y) * D = (a_x * D, a_y * D)`

   .. oe:method:: operator+=
      :language: c++ java csharp

      .. oe:api::

         OE2DPoint &operator+=(const OE2DPoint &p)

      Addition assignment operator.

   .. oe:method:: operator-=
      :language: c++

      .. oe:api::

         OE2DPoint &operator-=(const OE2DPoint &p)

      Subtraction assignment operator.

   .. oe:method:: operator/=
      :language: c++

      .. oe:api::

         OE2DPoint &operator/=(double)

      Division assignment operator.

   .. oe:method:: operator*=
      :language: c++

      .. oe:api::

         OE2DPoint &operator *=(double)

      Multiplication assignment operator.


   .. ################################################################
      # GetX
      ################################################################

   .. oe:method:: GetX

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetX() const

      .. oe:language:: python

         .. oe:api:: python

            GetX() -> float

      Returns the x (horizontal) coordinate of the :ref:`OE2DPoint <OEDepict_OE2DPoint>`
      object.

      .. seealso::

         * :oe:meth:`OEDepict::OE2DPoint::SetY` method


   .. oe:method:: GetY

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetY() const

      .. oe:language:: python

         .. oe:api:: python

            GetY() -> float

      Returns the y (vertical) coordinate of the :ref:`OE2DPoint <OEDepict_OE2DPoint>`
      object.

      .. seealso::

         * :oe:meth:`OEDepict::OE2DPoint::SetY` method

   .. ################################################################
      # SetX
      ################################################################

   .. oe:method:: SetX

      .. oe:language:: c++ java csharp

         .. oe:api::

            void SetX(double x)

      .. oe:language:: python

         .. oe:api:: python

            SetX(x: float) -> None

      Sets the x (horizontal) coordinate of the :ref:`OE2DPoint <OEDepict_OE2DPoint>`
      object.

      .. seealso::

         * :oe:meth:`OEDepict::OE2DPoint::GetX` method


   .. ################################################################
      # SetY
      ################################################################

   .. oe:method:: SetY

      .. oe:language:: c++ java csharp

         .. oe:api::

            void SetY(double y)

      .. oe:language:: python

         .. oe:api:: python

            SetY(y: float) -> None

      Sets the y (vertical) coordinate of the :ref:`OE2DPoint <OEDepict_OE2DPoint>`
      object.

      .. seealso::

         * :oe:meth:`OEDepict::OE2DPoint::GetY` method

