示例#1
0
 def _actor_type_changed(self, value):
     if value == 'cone':
         a = actors.cone_actor()
         self.actor_map = {'cone': a}
     elif value == 'sphere':
         a = actors.sphere_actor()
         self.actor_map = {'sphere': a}
     elif value == 'plane_widget':
         w = tvtk.PlaneWidget()
         self.actor_map = {'plane_widget': w}
     elif value == 'box_widget':
         w = tvtk.BoxWidget()
         self.actor_map = {'box_widget': w}
示例#2
0
 def _actor_type_changed(self, value):
     if value == 'cone':
         a = actors.cone_actor()
         self.actor_map = {'cone': a}
     elif value == 'sphere':
         a = actors.sphere_actor()
         self.actor_map = {'sphere': a}
     elif value == 'plane_widget':
         w = tvtk.PlaneWidget()
         self.actor_map = {'plane_widget': w}
     elif value == 'box_widget':
         w = tvtk.BoxWidget()
         self.actor_map = {'box_widget': w}
示例#3
0
 def _actor_type_changed(self, value):
     scene = self.scene
     if self._current_actor is not None:
         scene.remove_actors(self._current_actor)
     if value == 'cone':
         a = actors.cone_actor()
         scene.add_actors(a)
     elif value == 'sphere':
         a = actors.sphere_actor()
         scene.add_actors(a)
     elif value == 'plane_widget':
         a = tvtk.PlaneWidget()
         scene.add_actors(a)
     elif value == 'box_widget':
         a = tvtk.BoxWidget()
         scene.add_actors(a)
     self._current_actor = a
示例#4
0
 def __init__(self):
     earth = actors.earth_actor()
     earth.property.color = actors.colors.green
     sphere = actors.sphere_actor(color=actors.colors.blue, opacity=0.65)
     self.earth, self.sphere = earth, sphere
示例#5
0
 def __init__(self):
     earth = actors.earth_actor()
     earth.property.color = actors.colors.green
     sphere = actors.sphere_actor(color=actors.colors.blue, opacity=0.65)
     self.earth, self.sphere = earth, sphere