Trees | Indices | Help |
|
---|
|
object --+ | common.Primitive --+ | SphereCore --+ | Sphere
Class to draw a 3D sphere in OpenGL. Will be drawn in the current OpenGL drawable. This includes the ability to draw into Maestro's Workspace. It just needs to be the current drawable. See doc string for __init__ for details on instantiation. Spheres should be added to a SphereGroup and drawing done via SphereGroup. See SphereGroup documentation. This class draws the sphere directly using OpenGL. API Example ----------- import schrodinger.maestro.maestro as maestro import schrodinger.graphics3d.common as common import schrodinger.graphics3d.sphere as sphere sphere_grp = common.Group() st = maestro.workspace_get() for at in st.atom: sph = sphere.Sphere( x=at.x, y=at.y, z=at.z, radius=1.0, resolution=20, opacity=0.8, color='red' ) # Add the primative to the container. sphere_grp.add(sph) # Add the draw callback. maestro.workspace_draw_function_add(sphere_grp.draw) # Hide the markers. sphere_grp.hide() # Remove the markers and the callback. sphere_grp.clear() maestro.workspace_draw_function_remove(sphere_grp.draw)
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
|
|||
|
|
|||
Inherited from |
|
|||
|
Constructor requires: x, y, z: coordinate specifying center of sphere in Angstroms. color: One of: Color object Color name (string) Tuble of (R, G, B) (each 0.0-1.0) radius: radius of the sphere in Angstroms Optional arguments: opacity: 0.0 (transparent) through 1.0 (opaque) Defaults to 1.0 resolution: 4 to 50 Defaults to 16
|
Private method to draw out the sphere with the current settings. This should only be called by SphereGroup. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 2 06:33:24 2017 | http://epydoc.sourceforge.net |