Package schrodinger :: Package graphics3d :: Module polyhedron :: Class MaestroPolyhedronCore
[hide private]
[frames] | no frames]

Class MaestroPolyhedronCore

      object --+        
               |        
common.Primitive --+    
                   |    
          Polyhedron --+
                       |
                      MaestroPolyhedronCore
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, center, mode, length=None, radius=None, volume=None, color='red', opacity=1.0, style=1)
Create a polyhedron centered at center.
 
_checkSizeArgs(self, length, radius, volume)
A private method to make sure the size options are correcly set.
 
getVertices(self)
Abstract method, defined by convention only
 
getIndices(self)
Abstract method, defined by convention only
 
getFaces(self, vertices)
 
updateVertices(self, center, length=None, radius=None, volume=None)
Update the vertices given a new center and size parameter.
 
_handleOpenGLLevelChange(self)
When the OpenGL version changes we need to rebuild the Maestro-based objects.

Inherited from Polyhedron: setStyle, update

Inherited from Polyhedron (private): _calculateBoundingBox, _draw, _setNormals

Inherited from common.Primitive: __del__, groupHidden, groupShown, hide, isGroupShown, isShown, setEntryID, setGlowColor, setIsGlowing, setRightClickOnGObject, show

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from Polyhedron (private): _glReset, _glSetup

Class Variables [hide private]
Instance Variables [hide private]

Inherited from Polyhedron: faces, normals, vertices

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, center, mode, length=None, radius=None, volume=None, color='red', opacity=1.0, style=1)
(Constructor)

 

Create a polyhedron centered at center. Note that one of length, radius, volume is needed to create the shape.

Parameters:
  • center (list) - List of 3 Angstrom values indicating the center coordinate of the tetrahedron.
  • length (float) - Length in Angstroms of each of the edges of the tetrahedron.
  • radius (float) - Circumsphere radius in Angstroms from center of tetrahedron.
  • volume (float) - Volume in cubed Angstroms of the object.
  • color (mixed) - One of - Color object, Color name (string), or Tuple of (R, G, B) (each 0.0-1.0)
  • opacity (float) - 0.0 (invisible) through 1.0 (opaque). Defaults to 1.0
  • style (Int) - LINE or FILL. Default is FILL.
Raises:
  • RuntimeError - If a single option from length, radius, and volume does not have a value.
  • ValueError - If the size parameter (length, radius, or volume) is not a float.
  • NotImplementedError - If the initiating subclass does not have a getVertices or getFaces method.
Overrides: object.__init__

getFaces(self, vertices)

 
Parameters:
  • vertices (list of lists) - List of vertices. Each member of list should be a list of 3 coords, [x,y,z]

updateVertices(self, center, length=None, radius=None, volume=None)

 

Update the vertices given a new center and size parameter. The changes will be seen the next time the object is drawn.

Parameters:
  • center (list) - List of 3 Angstrom values indicating the center coordinate of the tetrahedron.
  • length (float) - Length in Angstroms of each of the edges of the tetrahedron.
  • radius (float) - Circumsphere radius in Angstroms from center of tetrahedron.
  • volume (float) - Volume in cubed Angstroms of the object.
Raises:
  • RuntimeError - If a single option from length, radius, and volume does not have a value.
  • ValueError - If the size parameter (length, radius, or volume) is not a float.

See Also: Polyhedron.update

_handleOpenGLLevelChange(self)

 

When the OpenGL version changes we need to rebuild the Maestro-based objects. But we want to retain the instance of the python object that contains it. So we just recreate the object on the Maestro side.

Note: This is a private function and should not be called by users.

@return nothing