OESurface

class OESurface : public OESystem::OEBase

Constructors

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

Default and copy constructors.

operator bool

IsValid() -> bool

Whether the surface contains any data (vertices).

Clear

Clear() -> None

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

ClearVertexClique

ClearVertexClique() -> bool

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

CreateCopy

CreateCopy() -> OEBase

GetAtoms

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.

GetAtomsElement

GetAtomsElement(n: int) -> int

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

GetColor

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.

GetColorElement

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

GetCurvature

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.

GetCurvatureElement

GetCurvatureElement(n: int) -> float

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

GetDataType

GetDataType() -> void

GetDistance

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.

GetDistanceElement

GetDistanceElement(n: int) -> float

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

GetFaceNormals

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.

GetFaceNormal

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.

GetFaceNormalsElement

GetFaceNormalsElement(n: int) -> float

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

GetNormals

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.

GetNormal

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.

GetNormalsElement

GetNormalsElement(n: int) -> float

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

GetNumTriangles

GetNumTriangles() -> int

Returns the number of triangles in the surface.

GetNumVertices

GetNumVertices() -> int

Returns the number of vertices in the surface.

GetPotential

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.

GetPotentialElement

GetPotentialElement(n: int) -> float

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

GetPotentialName

GetPotentialName() -> str

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

GetProbeRadius

GetProbeRadius() -> float

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

GetResolution

GetResolution() -> float

Returns the grid spacing used in the surface construction.

GetTitle

GetTitle() -> str

Returns the title of the surface.

GetTriangles

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

GetTriangle

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

GetTrianglesElement

GetTrianglesElement(n: int) -> int

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

GetVertex

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

GetVertexClique

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.

GetVertexCliqueElement

GetVertexCliqueElement(n: int) -> int

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

GetVertices

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

GetVerticesElement

GetVerticesElement(n: int) -> float

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

IsAtomsSet

IsAtomsSet() -> bool

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

IsColorSet

IsColorSet() -> bool

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

IsCurvatureSet

IsCurvatureSet() -> bool

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

IsDataType

IsDataType(type: void) -> bool

IsDistanceSet

IsDistanceSet() -> bool

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

IsFaceNormalsSet

IsFaceNormalsSet() -> bool

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

IsNormalsSet

IsNormalsSet() -> bool

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

IsPotentialSet

IsPotentialSet() -> bool

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

IsVertexCliqueSet

IsVertexCliqueSet() -> bool

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

SetAtoms

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.

SetAtomsElement

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.

SetColor

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.

SetColorElement

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.

SetCurvature

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.

SetCurvatureElement

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.

SetDistance

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.

SetDistanceElement

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.

SetFaceNormal

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.

SetFaceNormals

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.

SetFaceNormalsElement

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

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

SetNormal

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.

SetNormals

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.

SetNormalsElement

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

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

SetNumTriangles

SetNumTriangles(n: int) -> bool

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.

SetNumVertices

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

SetPotential

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.

SetPotentialElement

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.

SetPotentialName

SetPotentialName(name: str) -> None

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

SetTitle

SetTitle(title: str) -> bool

Set the title of the surface.

SetTriangle

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.

SetTriangles

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.

SetTrianglesElement

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

This method is deprecated. Use OESurface.SetTriangle instead.

SetVertex

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.

SetVertexClique

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.

SetVertexCliqueElement

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.

SetVertices

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.

SetVerticesElement

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

This method is deprecated. Use OESurface.SetVertex instead.