.. oe:namespace:: OESpicoli


.. meta::
   :keywords: OESurface, Surface


.. _OESpicoli_OESurface:

.. oe:class:: OESurface

   .. oe:api::

      class OESurface : public OESystem::OEBase

   .. oe:method:: Constructors

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

         .. oe:api::

            OESurface()
            OESurface(const OESurface& rhs)
            OESurface(const OESurfaceImpl& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OESurface() -> OESurface
            OESurface(rhs: OESurface) -> OESurface
            OESurface(rhs: OESurfaceImpl) -> OESurface

      Default and copy constructors.

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

      .. oe:api::

         OESurface &operator=(const OESurface &rhs)
         OESurface &operator=(const OESurfaceImpl &rhs)

      Assignment operator for a surface. Will copy all data from rhs to the
      surface.

      Assignment operator.


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

      .. oe:api::

         OESurface &operator+=(const OESurface &rhs)
         OESurface &operator+=(const OESurfaceImpl &rhs)

      In-place addition of one surface to another. The titles are
      concatenated together with an underscore. The vertex indices in
      the triangles array of rhs are increased by
      :oe:meth:`OESpicoli::OESurface::GetNumVertices`. All other data
      is copied from ``rhs`` as well. In the case where one of the
      surfaces does not have data (Potentials, Atoms, etc) and the
      other does, the data array for the surface that does not will be
      zeroed out.


   .. oe:method:: operator bool

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

         .. oe:api::

            operator bool() const

      .. oe:language:: python

         .. oe:api:: python

            IsValid() -> bool

      Whether the surface contains any data (vertices).


   .. oe:method:: Clear

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

         .. oe:api::

            void Clear()

      .. oe:language:: python

         .. oe:api:: python

            Clear() -> None

      Delete and deallocate all data associated with this
      surface. This includes all :ref:`OEBase <OESystem_OEBase>` data as
      well.

   .. oe:method:: ClearVertexClique

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

         .. oe:api::

            bool ClearVertexClique()

      .. oe:language:: python

         .. oe:api:: python

            ClearVertexClique() -> bool

      Sets every vertex clique value to zero. Afterwards,
      :oe:meth:`OESpicoli::OESurface::IsVertexCliqueSet` will return
      ``false``. This will prevent vertex clique values from being
      output by :oe:func:`OESpicoli::OEWriteSurface`.


   .. oe:method:: CreateCopy

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

         .. oe:api::

            OESystem::OEBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OEBase

 
   .. oe:method:: GetAtoms

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

         .. oe:api::

            bool GetAtoms(unsigned int* atoms) const

      .. oe:language:: python

         .. oe:api:: python

            GetAtoms(atoms: int) -> bool

      Fills the memory pointed to by ``atoms`` with the atom index
      associated with every vertex of the surface. The array passed in
      should be large enough to hold ``GetNumVertices()`` unsigned ints. 

   .. oe:method:: GetAtomsElement

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

         .. oe:api::

            unsigned int GetAtomsElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetAtomsElement(n: int) -> int

      Retrieves an element from the internal atoms array. The index
      ``n`` should be less than ``GetNumVertices()``.

   .. oe:method:: GetColor

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

         .. oe:api::

            bool GetColor(float* color) const
            bool GetColor(unsigned char* color) const

      .. oe:language:: python

         .. oe:api:: python

            GetColor(color: OEFloatArray) -> bool
            GetColor(color: str) -> bool

      Fills the memory pointed to by ``color`` with the color associated
      with every vertex of the surface. The array passed in should be
      large enough to hold ``GetNumVertices() * 4`` floats or
      ``GetNumVertices() * 4`` unsigned chars, depending on which
      overload is used.

   .. oe:method:: GetColorElement

      .. oe:language:: c++ java

         .. oe:api:: 

            void GetColorElement(unsigned int n, float& r, float& g, float& b,
                                 float& a) const
            void GetColorElement(unsigned int n, unsigned char& r,
                                 unsigned char& g, unsigned char& b,
                                 unsigned char& a) const

      .. oe:language:: python

         .. oe:api:: python

            GetColorElement(n: int) -> (r: float, g: float, b: float, a: float)

      Retrieves an element from the internal color array. The index
      ``n`` should be less than ``GetNumVertices()``.

   .. oe:method:: GetCurvature

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

         .. oe:api::

            bool GetCurvature(float* curvature) const

      .. oe:language:: python

         .. oe:api:: python

            GetCurvature(curvature: OEFloatArray) -> bool

      Fills the memory pointed to by ``curvature`` with the curvature
      associated with every vertex of the surface. The array passed in
      should be large enough to hold ``GetNumVertices()`` floats.

   .. oe:method:: GetCurvatureElement

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

         .. oe:api::

            float GetCurvatureElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetCurvatureElement(n: int) -> float

      Retrieves an element from the internal curvature array. The
      index ``n`` should be less than ``GetNumVertices()``.

   .. oe:method:: GetDataType

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

         .. oe:api::

            const void* GetDataType() const

      .. oe:language:: python

         .. oe:api:: python

            GetDataType() -> void

   .. oe:method:: GetDistance

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

         .. oe:api::

            bool GetDistance(float* distance) const

      .. oe:language:: python

         .. oe:api:: python

            GetDistance(distance: OEFloatArray) -> bool

      Fills the memory pointed to by ``distance`` with the distance each
      vertex is from another object. The array passed in should be
      large enough to hold ``GetNumVertices()`` floats.

   .. oe:method:: GetDistanceElement

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

         .. oe:api::

            float GetDistanceElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetDistanceElement(n: int) -> float

      Retrieves an element from the internal distance array. The index
      ``n`` should be less than ``GetNumVertices()``.

   .. oe:method:: GetFaceNormals

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

         .. oe:api::

            bool GetFaceNormals(float* faceNormals) const

      .. oe:language:: python

         .. oe:api:: python

            GetFaceNormals(faceNormals: OEFloatArray) -> bool

      Fills the memory pointed to by ``faceNormals`` with a normal
      vector associated with every triangle of the surface. The array
      passed in should be large enough to hold ``GetNumTriangles() *
      3`` floats.

   .. oe:method:: GetFaceNormal

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

         .. oe:api::

            bool GetFaceNormal(unsigned int n, float* normal) const

      .. oe:language:: python

         .. oe:api:: python

            GetFaceNormal(n: int, normal: OEFloatArray) -> bool

      Retrieves a 3-component face normal vector for the specified triangle
      and stores it in the ``normal`` array.
      The index ``n`` must be less than ``GetNumTriangles()``. 
      Returns ``true`` upon success.

   .. oe:method:: GetFaceNormalsElement

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

         .. oe:api::

            float GetFaceNormalsElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetFaceNormalsElement(n: int) -> float

      This method has been deprecated.  Use 
      :oe:meth:`OESpicoli::OESurface::GetFaceNormal` instead.

   .. oe:method:: GetNormals

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

         .. oe:api::

            bool GetNormals(float* normals) const

      .. oe:language:: python

         .. oe:api:: python

            GetNormals(normals: OEFloatArray) -> bool

      Fills the memory pointed to by ``normals`` with a normal vector
      associated with every vertex of the surface. The array passed in
      should be large enough to hold ``GetNumVertices() * 3``
      floats. A vertex normal is calculated by averaging the face
      normals of all the triangles in which the vertex resides.

   .. oe:method:: GetNormal

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

         .. oe:api::

            bool GetNormal(unsigned int n, float* normal) const

      .. oe:language:: python

         .. oe:api:: python

            GetNormal(n: int, normal: OEFloatArray) -> bool

      Retrieves an 3-component vertex normal for the specified vertex and
      stores it in the ``normal`` array.  The index ``n`` must be less 
      than ``GetNumVertices()``. This method returns ``true`` upon success.

   .. oe:method:: GetNormalsElement

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

         .. oe:api::

            float GetNormalsElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetNormalsElement(n: int) -> float

      This method has been deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::GetNormal` instead.

   .. oe:method:: GetNumTriangles

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

         .. oe:api::

            unsigned int GetNumTriangles() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumTriangles() -> int

      Returns the number of triangles in the surface. 

   .. oe:method:: GetNumVertices

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

         .. oe:api::

            unsigned int GetNumVertices() const

      .. oe:language:: python

         .. oe:api:: python

            GetNumVertices() -> int

      Returns the number of vertices in the surface. 

   .. oe:method:: GetPotential

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

         .. oe:api::

            bool GetPotential(float* potential) const

      .. oe:language:: python

         .. oe:api:: python

            GetPotential(potential: OEFloatArray) -> bool

      Fills the memory pointed to by ``potential`` with the potential
      associated with every vertex of the surface. The array passed in
      should be large enough to hold ``GetNumVertices()`` floats.

   .. oe:method:: GetPotentialElement

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

         .. oe:api::

            float GetPotentialElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetPotentialElement(n: int) -> float

      Retrieves an element from the internal potentials array. The index ``n``
      should be less than ``GetNumVertices()``.

   .. oe:method:: GetPotentialName

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

         .. oe:api::

            const char* GetPotentialName() const

      .. oe:language:: python

         .. oe:api:: python

            GetPotentialName() -> str

      Returns name of the potentials stored in the surface's potential
      array.

   .. oe:method:: GetProbeRadius

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

         .. oe:api::

            float GetProbeRadius() const

      .. oe:language:: python

         .. oe:api:: python

            GetProbeRadius() -> float

      Returns the probe radius used in the construction of the surface.

   .. oe:method:: GetResolution

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

         .. oe:api::

            float GetResolution() const

      .. oe:language:: python

         .. oe:api:: python

            GetResolution() -> float

      Returns the grid spacing used in the surface construction.

   .. oe:method:: GetTitle

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

         .. oe:api::

            const char* GetTitle() const

      .. oe:language:: python

         .. oe:api:: python

            GetTitle() -> str

      Returns the title of the surface.

   .. oe:method:: GetTriangles

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

         .. oe:api::

            bool GetTriangles(unsigned int* triangles) const

      .. oe:language:: python

         .. oe:api:: python

            GetTriangles(triangles: int) -> bool

      Fills the memory pointed to by ``triangles`` with the vertex indices
      that compose every triangle in the surface. The vertex indices
      will obey the clockwise ordering rule described in the
      :ref:`surfaces_triangles` section. The array passed in should be
      large enough to hold ``GetNumTriangles() * 3`` unsigned ints.

   .. oe:method:: GetTriangle

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

         .. oe:api::

            bool GetTriangle(unsigned int n, unsigned int* triangle) const

      .. oe:language:: python

         .. oe:api:: python

            GetTriangle(n: int, triangle: int) -> bool

      Retrieves the three vertex indices for the specified triangle and 
      stores them in the ``triangle`` array.
      The triangle index ``n`` must be less than ``GetNumTriangles()``.

   .. oe:method:: GetTrianglesElement

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

         .. oe:api::

            unsigned int GetTrianglesElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetTrianglesElement(n: int) -> int

      This method has been deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::GetTriangle` instead.

   .. oe:method:: GetVertex

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

         .. oe:api::

            bool GetVertex(unsigned int n, float* vertex) const

      .. oe:language:: python

         .. oe:api:: python

            GetVertex(n: int, vertex: OEFloatArray) -> bool

      Retrieves coordinates for the specified vertex and stores them in the
      ``vertex`` array. The vertex index ``n`` must be less than 
      ``GetNumVertices()``.

   .. oe:method:: GetVertexClique

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

         .. oe:api::

            bool GetVertexClique(unsigned int* vertexClique) const

      .. oe:language:: python

         .. oe:api:: python

            GetVertexClique(vertexClique: int) -> bool

      Fills the memory pointed to by ``vertexClique`` with the clique
      values associated with every vertex of the surface. The array
      passed in should be large enough to hold ``GetNumVertices()``
      unsigned ints.

   .. oe:method:: GetVertexCliqueElement

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

         .. oe:api::

            unsigned int GetVertexCliqueElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetVertexCliqueElement(n: int) -> int

      Retrieves an element from the internal cliques array. The index
      ``n`` should be less than ``GetNumVertices()``.

   .. oe:method:: GetVertices

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

         .. oe:api::

            bool GetVertices(float* vertices) const

      .. oe:language:: python

         .. oe:api:: python

            GetVertices(vertices: OEFloatArray) -> bool

      Fills the memory pointed to by ``vertices`` with the vertex
      coordinates of the surface. Vertices are aligned every three
      places in the array as described in the :ref:`surfaces_vertices`
      section. The array passed in should be large enough to hold
      ``GetNumVertices() * 3`` floats.

   .. oe:method:: GetVerticesElement

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

         .. oe:api::

            float GetVerticesElement(unsigned int n) const

      .. oe:language:: python

         .. oe:api:: python

            GetVerticesElement(n: int) -> float

      This method has been deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::GetVertex` instead.

   .. oe:method:: IsAtomsSet

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

         .. oe:api::

            bool IsAtomsSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsAtomsSet() -> bool

      Determine whether the surface has atom indices associated with each
      vertex. Surfaces generated from
      :oe:func:`OESpicoli::OEMakeAccessibleSurface` and
      :oe:func:`OESpicoli::OEMakeAccessibleSurface`
      automatically set this data.


   .. oe:method:: IsColorSet

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

         .. oe:api::

            bool IsColorSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsColorSet() -> bool

      Determine whether the surface has color values associated with each
      vertex.

   .. oe:method:: IsCurvatureSet

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

         .. oe:api::

            bool IsCurvatureSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsCurvatureSet() -> bool

      Determine whether the surface has curvature value calculated for each
      vertex.

   .. oe:method:: IsDataType

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

         .. oe:api::

            bool IsDataType(const void* type) const

      .. oe:language:: python

         .. oe:api:: python

            IsDataType(type: void) -> bool

   .. oe:method:: IsDistanceSet

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

         .. oe:api::

            bool IsDistanceSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsDistanceSet() -> bool

      Determine whether the surface has a distance value associated with
      each vertex.

   .. oe:method:: IsFaceNormalsSet

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

         .. oe:api::

            bool IsFaceNormalsSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsFaceNormalsSet() -> bool

      Determine whether the surface has face normals calculated for each
      triangle.

   .. oe:method:: IsNormalsSet

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

         .. oe:api::

            bool IsNormalsSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsNormalsSet() -> bool

      Determine whether the surface has vertex normals calculated for
      each vertex. Surfaces generated from
      :oe:func:`OESpicoli::OEMakeAccessibleSurface` and
      :oe:func:`OESpicoli::OEMakeAccessibleSurface` automatically set this
      data.


   .. oe:method:: IsPotentialSet

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

         .. oe:api::

            bool IsPotentialSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsPotentialSet() -> bool

      Determine whether the surface has a potential value associated with
      each vertex.

   .. oe:method:: IsVertexCliqueSet

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

         .. oe:api::

            bool IsVertexCliqueSet() const

      .. oe:language:: python

         .. oe:api:: python

            IsVertexCliqueSet() -> bool

      Determine whether the surface has a clique value associated with
      each vertex.

   .. oe:method:: SetAtoms

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

         .. oe:api::

            bool SetAtoms(const unsigned int* atoms)

      .. oe:language:: python

         .. oe:api:: python

            SetAtoms(atoms: int) -> bool

      Sets the internal atoms array data to the values pointed to by
      ``atoms``. This should be a pointer to an array of unsigned ints
      of length ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetAtomsElement

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

         .. oe:api::

            bool SetAtomsElement(unsigned int n, unsigned int value)

      .. oe:language:: python

         .. oe:api:: python

            SetAtomsElement(n: int, value: int) -> bool

      Sets an element in the internal atoms array. The index ``n`` should be
      less than ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetColor

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

         .. oe:api::

            bool SetColor(const float* color)
            bool SetColor(const unsigned char* color)

      .. oe:language:: python

         .. oe:api:: python

            SetColor(color: OEFloatArray) -> bool
            SetColor(color: str) -> bool

      Sets the internal color array data to the values pointed to by
      ``color``. This should be a pointer to an array of floats or
      unsigned chars of length ``GetNumVertices() * 4`` or
      ``GetNumVertices() * 4`` respectively. Returns ``true`` upon
      success.

   .. oe:method:: SetColorElement

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

         .. oe:api::

            bool SetColorElement(unsigned int n, float r, float g, float b,
                                 float a = 1.0f)
            bool SetColorElement(unsigned int n, unsigned char r,
                                 unsigned char g, unsigned char b,
                                 unsigned char a = 255)

      .. oe:language:: python

         .. oe:api:: python

            SetColorElement(n: int, r: float, g: float, b: float,
                            a: float = 1.0) -> bool
            SetColorElement(n: int, r: str, g: str, b: str, a: str = 255) -> bool

      Sets an element in the internal color array. The index ``n``
      should be less than ``GetNumVertices()``. The alpha value,
      ``a``, defaults to be opaque. Returns ``true`` upon success.

   .. oe:method:: SetCurvature

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

         .. oe:api::

            bool SetCurvature(const float* curvature)

      .. oe:language:: python

         .. oe:api:: python

            SetCurvature(curvature: OEFloatArray) -> bool

      Sets the internal curvature array data to the values pointed to by
      ``curvature``. This should be a pointer to an array of floats of length
      ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetCurvatureElement

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

         .. oe:api::

            bool SetCurvatureElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetCurvatureElement(n: int, value: float) -> bool

      Sets an element in the internal curvature array. The index ``n`` should be
      less than ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetDistance

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

         .. oe:api::

            bool SetDistance(const float* distance)

      .. oe:language:: python

         .. oe:api:: python

            SetDistance(distance: OEFloatArray) -> bool

      Sets the internal distance array data to the values pointed to
      by ``distance``. This should be a pointer to an array of floats
      of length ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetDistanceElement

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

         .. oe:api::

            bool SetDistanceElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetDistanceElement(n: int, value: float) -> bool

      Sets an element in the internal distance array. The index ``n`` should be
      less than ``GetNumVertices``. Returns ``true`` upon success.

   .. oe:method:: SetFaceNormal

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

         .. oe:api::

            bool SetFaceNormal(unsigned int n, const float* normal)

      .. oe:language:: python

         .. oe:api:: python

            SetFaceNormal(n: int, normal: OEFloatArray) -> bool

      Sets the face normal for the specified triangle index.  The triangle
      index ``n`` must be less than ``GetNumTriangles()``, and ``normal``
      must contain three elements. Returns ``true`` upon success.

   .. oe:method:: SetFaceNormals

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

         .. oe:api::

            bool SetFaceNormals(const float* faceNormals)

      .. oe:language:: python

         .. oe:api:: python

            SetFaceNormals(faceNormals: OEFloatArray) -> bool

      Sets the internal face normals array data to the values pointed
      to by ``faceNormals``. This should be a pointer to an array of
      floats of length ``GetNumTriangles() * 3``. Face normals are
      associated with triangles by their location in the
      array. Returns ``true`` upon success.

   .. oe:method:: SetFaceNormalsElement

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

         .. oe:api::

            bool SetFaceNormalsElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetFaceNormalsElement(n: int, value: float) -> bool

      This method has been deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::SetFaceNormal` instead.

   .. oe:method:: SetNormal

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

         .. oe:api::

            bool SetNormal(unsigned int n, const float* normal)

      .. oe:language:: python

         .. oe:api:: python

            SetNormal(n: int, normal: OEFloatArray) -> bool

      Sets the vertex normal for the specified vertex.  The vertex
      index ``n`` must be less than ``GetNumVertices()``, and
      ``normal`` must contain three elements. Returns ``true``
      upon success.

   .. oe:method:: SetNormals

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

         .. oe:api::

            bool SetNormals(const float* normals)

      .. oe:language:: python

         .. oe:api:: python

            SetNormals(normals: OEFloatArray) -> bool

      Sets the internal vertex normals array data to the values
      pointed to by ``normals``. This should be a pointer to an array
      of floats of length ``GetNumVertices() * 3``. Vertex normals are
      associated with vertices by their location in the array. Returns
      ``true`` upon success.

   .. oe:method:: SetNormalsElement

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

         .. oe:api::

            bool SetNormalsElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetNormalsElement(n: int, value: float) -> bool

      This method has been deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::SetNormal` instead.

   .. oe:method:: SetNumTriangles

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

         .. oe:api::

            bool SetNumTriangles(unsigned int n)

      .. oe:language:: python

         .. oe:api:: python

            SetNumTriangles(n: int) -> bool

      .. warning:: 

         Expert use only.

      Set the number of triangles in this surface. Setting this to a
      value lower than :oe:meth:`OESpicoli::OESurface::GetNumTriangles`
      effectively erases triangles from the surface. The memory for
      the ``OESurface`` is not freed immediately, but cached for
      reuse. The Clear method should be used if deallocation is
      desired. Deallocation is also handled automatically by the
      class destructor.

      If the user wants to add more triangles to the surface,
      SetNumTriangles should be called first to resize the internal
      triangles array. Note that the methods for accessing
      individual triangles should not be
      used after a call to SetNumTriangles. Any data reliant on the
      number of triangles should first be set using the array based
      methods. This includes 
      :oe:meth:`OESpicoli::OESurface::SetTriangles` and
      :oe:meth:`OESpicoli::OESurface::SetFaceNormals`.



   .. oe:method:: SetNumVertices

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

         .. oe:api::

            bool SetNumVertices(unsigned int n)

      .. oe:language:: python

         .. oe:api:: python

            SetNumVertices(n: int) -> bool

      .. warning::

          Expert use only.

      Set the number of vertices in this surface. Setting this to a
      value lower than ``GetNumVertices`` effectively erases vertices
      from the surface. The memory for the ``OESurface`` is not freed
      immediately, but cached for reuse. The
      :oe:meth:`OESpicoli::OESurface::Clear` method should be used if
      deallocation is desired. Deallocation is also handled
      automatically by the class destructor.

      If the user wants to add more vertices to the surface,
      :oe:meth:`OESpicoli::OESurface::SetNumVertices` should be called first
      to resize the internal vertices array. Note that the methods for 
      accessing individual vertices should not be used after a call to 
      SetNumVertices. Any data
      reliant on the number of vertices should first be set using the
      array based methods. These include the following:

      * :oe:meth:`OESpicoli::OESurface::SetVertices`
      * :oe:meth:`OESpicoli::OESurface::SetNormals`
      * :oe:meth:`OESpicoli::OESurface::SetCurvature`
      * :oe:meth:`OESpicoli::OESurface::SetDistance`
      * :oe:meth:`OESpicoli::OESurface::SetAtoms`
      * :oe:meth:`OESpicoli::OESurface::SetColor`
      * :oe:meth:`OESpicoli::OESurface::SetPotential`
      * :oe:meth:`OESpicoli::OESurface::SetVertexClique`

   .. oe:method:: SetPotential

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

         .. oe:api::

            bool SetPotential(const float* potential)

      .. oe:language:: python

         .. oe:api:: python

            SetPotential(potential: OEFloatArray) -> bool

      Sets the internal potential array data to the values pointed to by
      ``potential``. This should be a pointer to an array of floats of length
      ``GetNumVertices() * sizeof(float)``. Returns true upon success.

   .. oe:method:: SetPotentialElement

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

         .. oe:api::

            bool SetPotentialElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetPotentialElement(n: int, value: float) -> bool

      Sets an element in the internal potential array. The index ``n`` should be
      less than ``GetNumVertices()``. Returns true upon success.

   .. oe:method:: SetPotentialName

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

         .. oe:api::

            void SetPotentialName(const char* name)

      .. oe:language:: python

         .. oe:api:: python

            SetPotentialName(name: str) -> None

      Set the name of the potentials that are set on the surface. 

   .. oe:method:: SetTitle

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

         .. oe:api::

            bool SetTitle(const char* title)
            bool SetTitle(const std::string& title)

      .. oe:language:: python

         .. oe:api:: python

            SetTitle(title: str) -> bool

      Set the title of the surface.
  
   .. oe:method:: SetTriangle

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

         .. oe:api::

            bool SetTriangle(unsigned int n, const unsigned int* triangle)

      .. oe:language:: python

         .. oe:api:: python

            SetTriangle(n: int, triangle: int) -> bool

      Sets the vertex indices for the specified triangle. The triangle index 
      ``n`` must be less than ``GetNumTriangles()``, and ``triangle`` must
      contain three elements. Returns ``true`` upon success.

   .. oe:method:: SetTriangles

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

         .. oe:api::

            bool SetTriangles(const unsigned int* triangles)

      .. oe:language:: python

         .. oe:api:: python

            SetTriangles(triangles: int) -> bool

      Sets the internal triangles array data to the values pointed to
      by ``triangles``. This should be a pointer to an array of unsigned
      ints of length ``GetNumTriangles() * 3``. Returns ``true`` upon
      success.

   .. oe:method:: SetTrianglesElement

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

         .. oe:api::

            bool SetTrianglesElement(unsigned int n, unsigned int value)

      .. oe:language:: python

         .. oe:api:: python

            SetTrianglesElement(n: int, value: int) -> bool

      This method is deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::SetTriangle` instead.

   .. oe:method:: SetVertex

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

         .. oe:api::

            bool SetVertex(unsigned int n, const float* vertex)

      .. oe:language:: python

         .. oe:api:: python

            SetVertex(n: int, vertex: OEFloatArray) -> bool

      Sets the coordinates for the specified vertex.  The vertex index 
      ``n`` must be less than ``GetNumVertices()``, and ``vertex`` must 
      contain three elements. Returns ``true`` upon success.

   .. oe:method:: SetVertexClique

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

         .. oe:api::

            bool SetVertexClique(const unsigned int* vertexClique)

      .. oe:language:: python

         .. oe:api:: python

            SetVertexClique(vertexClique: int) -> bool

      Sets the internal vertex clique array data to the values pointed
      to by ``vertexClique``. This should be a pointer to an array of
      unsigned ints of length ``GetNumVertices()``. Returns ``true``
      upon success.

   .. oe:method:: SetVertexCliqueElement

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

         .. oe:api::

            bool SetVertexCliqueElement(unsigned int n, unsigned int value)

      .. oe:language:: python

         .. oe:api:: python

            SetVertexCliqueElement(n: int, value: int) -> bool

      Sets an element in the internal vertex clique array. The index ``n`` should be
      less than ``GetNumVertices()``. Returns ``true`` upon success.

   .. oe:method:: SetVertices

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

         .. oe:api::

            bool SetVertices(const float* vertices)

      .. oe:language:: python

         .. oe:api:: python

            SetVertices(vertices: OEFloatArray) -> bool

      Sets the internal vertices array data to the values pointed to
      by ``vertices``. This should be a pointer to an array of floats of
      length ``GetNumVertices() * 3``. Returns ``true`` upon success.

   .. oe:method:: SetVerticesElement

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

         .. oe:api::

            bool SetVerticesElement(unsigned int n, float value)

      .. oe:language:: python

         .. oe:api:: python

            SetVerticesElement(n: int, value: float) -> bool

      This method is deprecated.  Use
      :oe:meth:`OESpicoli::OESurface::SetVertex` instead.

