```
class OESurface : public OESystem::OEBase
```

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

Default and copy constructors.

```
void Clear()
```

Delete and deallocate all data associated with this
surface. This includes all `OEBase` data as
well.

```
bool ClearVertexClique()
```

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

```
OESystem::OEBase *CreateCopy() const
```

```
bool GetAtoms(unsigned int *atoms) const
```

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.

```
unsigned int GetAtomsElement(unsigned int n) const
```

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

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

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.

```
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
```

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

```
bool GetCurvature(float *curvature) const
```

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.

```
float GetCurvatureElement(unsigned int n) const
```

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

```
const void *GetDataType() const
```

```
bool GetDistance(float *distance) const
```

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.

```
float GetDistanceElement(unsigned int n) const
```

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

```
bool GetFaceNormals(float *faceNormals) const
```

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.

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

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.

```
float GetFaceNormalsElement(unsigned int n) const
```

This method has been deprecated. Use
`OESurface.GetFaceNormal` instead.

```
bool GetNormals(float *normals) const
```

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.

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

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.

```
float GetNormalsElement(unsigned int n) const
```

This method has been deprecated. Use
`OESurface.GetNormal` instead.

```
unsigned int GetNumTriangles() const
```

Returns the number of triangles in the surface.

```
bool GetPotential(float *potential) const
```

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.

```
float GetPotentialElement(unsigned int n) const
```

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

```
const char *GetPotentialName() const
```

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

```
float GetProbeRadius() const
```

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

```
float GetResolution() const
```

Returns the grid spacing used in the surface construction.

```
bool GetTriangles(unsigned int *triangles) const
```

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
*Triangles* section. The array passed in should be
large enough to hold `GetNumTriangles() * 3` unsigned ints.

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

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()`.

```
unsigned int GetTrianglesElement(unsigned int n) const
```

This method has been deprecated. Use
`OESurface.GetTriangle` instead.

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

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

```
bool GetVertexClique(unsigned int *vertexClique) const
```

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.

```
unsigned int GetVertexCliqueElement(unsigned int n) const
```

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

```
bool GetVertices(float *vertices) const
```

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 *Vertices*
section. The array passed in should be large enough to hold
`GetNumVertices() * 3` floats.

```
float GetVerticesElement(unsigned int n) const
```

This method has been deprecated. Use
`OESurface.GetVertex` instead.

```
bool IsAtomsSet() const
```

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

```
bool IsColorSet() const
```

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

```
bool IsCurvatureSet() const
```

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

```
bool IsDataType(const void *type) const
```

```
bool IsDistanceSet() const
```

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

```
bool IsFaceNormalsSet() const
```

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

```
bool IsNormalsSet() const
```

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

```
bool IsPotentialSet() const
```

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

```
bool IsVertexCliqueSet() const
```

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

```
bool SetAtoms(const unsigned int *atoms)
```

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.

```
bool SetAtomsElement(unsigned int n, unsigned int value)
```

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

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

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.

```
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)
```

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.

```
bool SetCurvature(const float *curvature)
```

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.

```
bool SetCurvatureElement(unsigned int n, float value)
```

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

```
bool SetDistance(const float *distance)
```

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.

```
bool SetDistanceElement(unsigned int n, float value)
```

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

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

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.

```
bool SetFaceNormals(const float *faceNormals)
```

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.

```
bool SetFaceNormalsElement(unsigned int n, float value)
```

This method has been deprecated. Use
`OESurface.SetFaceNormal` instead.

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

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.

```
bool SetNormals(const float *normals)
```

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.

```
bool SetNormalsElement(unsigned int n, float value)
```

This method has been deprecated. Use
`OESurface.SetNormal` instead.

```
bool SetNumTriangles(unsigned int n)
```

Warning

Expert use only.

Set the number of triangles in this surface. Setting this to a
value lower than `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
`OESurface.SetTriangles` and
`OESurface.SetFaceNormals`.

```
bool SetNumVertices(unsigned int n)
```

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
`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,
`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:

```
bool SetPotential(const float *potential)
```

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.

```
bool SetPotentialElement(unsigned int n, float value)
```

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

```
void SetPotentialName(const char *name)
```

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

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

Set the title of the surface.

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

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.

```
bool SetTriangles(const unsigned int *triangles)
```

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.

```
bool SetTrianglesElement(unsigned int n, unsigned int value)
```

This method is deprecated. Use
`OESurface.SetTriangle` instead.

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

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.

```
bool SetVertexClique(const unsigned int *vertexClique)
```

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.

```
bool SetVertexCliqueElement(unsigned int n, unsigned int value)
```

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

```
bool SetVertices(const float *vertices)
```

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.

```
bool SetVerticesElement(unsigned int n, float value)
```

This method is deprecated. Use
`OESurface.SetVertex` instead.