Illustrates the use of BoundingBoxFromEntity().

# This code example shows how to calculate and display an oriented bounding box 
# that contains all the atoms of an entity.

# remove all objects from scene, just in case

# Load sdh molecule
# Select backbone atoms of residues 99-128, which form a helix.
helix=sdh.Select('rnum=99:128 and cname=A and aname=CA,C,N,O')
# create a graphical representation of the helix and render it with simple 
# lines.
go=gfx.Entity('helix', gfx.SIMPLE, helix)
# add it to the scene

# calculate the bounding box for the helix

# create a graphical representation of the bounding box and add it to the scene
bb=gfx.Cuboid('xxx', bbox)
bb.SetFillColor(gfx.Color(0.5, 0.8, 0.5, 0.2))

# center the camera on the graphical object
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 6 Dec 2017 for OpenStructure by  doxygen 1.6.1