| Trees | Indices | Help |
|
|---|
|
|
object --+
|
common.Primitive --+
|
SphereCore --+
|
MaestroSphere
Class to create a 3D sphere in Maestro. This sphere will be drawn
at the appropriate time in Maestro to interact properly with transparent
objects.
See doc string for __init__ for details on instantiation.
Spheres should be added to a Group and drawing done via the Group.
See Group documentation.
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.MaestroSphere(
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)
# Unlike Sphere MaestroSphere simply needs to be shown to be drawn.
# No special callback like there is for Spheres is needed.
sphere_grp.show()
# 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 |
|||
|
|||
|
|||
|
|||
|
|||
x = property(_getX, _setX, doc= "X coordinate")
|
|||
y = property(_getY, _setY, doc= "Y coordinate")
|
|||
z = property(_getZ, _setZ, doc= "Z coordinate")
|
|||
r = property(_getR, _setR, doc= "Red value in RGB triplet")
|
|||
g = property(_getG, _setG, doc= "Green value in RGB triplet")
|
|||
b = property(_getB, _setB, doc= "Blue value in RGB triplet")
|
|||
radius = property(_getRadius, _setRadius, doc= "Sphere's radius")
|
|||
opacity = property(_getOpacity, _setOpacity, doc= "Sphere's op
|
|||
material = property(_getMaterial, _setMaterial, doc= "Sphere's
|
|||
pick_id = property(_getPickID, _setPickID, doc= "Sphere object
|
|||
pick_category = property(_getPickCategory, _setPickCategory, d
|
|||
|
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
|
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 |
|
|||
opacity
|
material
|
pick_id
|
pick_category
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 6 04:50:43 2015 | http://epydoc.sourceforge.net |