.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEShape

.. meta::
   :keywords: OEShapeGridOptions, ShapeGridOptions


.. _OEShape_OEShapeGridOptions:

.. oe:class:: OEShapeGridOptions

   .. oe:api::

      class OEShapeGridOptions : public OESystem::OEOptions

   This class provides an interface to setup options required for calculations
   using the *Grid* method.
   
   The :ref:`OEShapeGridOptions <OEShape_OEShapeGridOptions>` class defines the following public methods:
    * :oe:meth:`GetDerivativeType<OEShape::OEShapeGridOptions::GetDerivativeType>`
    * :oe:meth:`GetGridSpacing<OEShape::OEShapeGridOptions::GetGridSpacing>`
    * :oe:meth:`SetDerivativeType<OEShape::OEShapeGridOptions::SetDerivativeType>`
    * :oe:meth:`SetGridSpacing<OEShape::OEShapeGridOptions::SetGridSpacing>` 
   
   .. oe:method:: Constructors

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

         .. oe:api::

            OEShapeGridOptions()
            OEShapeGridOptions(const OEShapeGridOptions&)

      .. oe:language:: python

         .. oe:api:: python

            OEShapeGridOptions() -> OEShapeGridOptions
            OEShapeGridOptions(arg2: OEShapeGridOptions) -> OEShapeGridOptions

      Default and copy constructors.

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

      .. oe:api::

         OEShapeGridOptions &operator=(const OEShapeGridOptions &)

      Assignment operator.


   .. oe:method:: GetDerivativeType

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

         .. oe:api::

            unsigned int GetDerivativeType() const

      .. oe:language:: python

         .. oe:api:: python

            GetDerivativeType() -> int

      Gets the current value of the derivative type to be used on *Grid* method.

   .. oe:method:: GetGridSpacing

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

         .. oe:api::

            double GetGridSpacing() const

      .. oe:language:: python

         .. oe:api:: python

            GetGridSpacing() -> float

      Gets the grid spacing to be used on *Grid* method.

   .. oe:method:: SetDerivativeType

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

         .. oe:api::

            bool SetDerivativeType(const unsigned int)

      .. oe:language:: python

         .. oe:api:: python

            SetDerivativeType(value: int) -> bool

      Set the derivative type to be used on *Grid* method. The default is
      :oe:const:`OEShape::OEDerivativeType::NearestValue` for shape overlap
      and :oe:const:`OEShape::OEDerivativeType::Interpolated` for color overlap. 
      Alternatives are defined in the :oe:constns:`OEShape::OEDerivativeType` namespace.

   .. oe:method:: SetGridSpacing

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

         .. oe:api::

            bool SetGridSpacing(const double)

      .. oe:language:: python

         .. oe:api:: python

            SetGridSpacing(value: float) -> bool

      Set the grid spacing to be used on *Grid* method. 
      By default this is set to 0.25 |A|.


