def keyboard(*args): global gCurrent, gFocus, gValues import sys (key, x, y) = args if key == 27 or key == 'x': sys.exit(0) elif key == 'm': VisusXMLInterface().write("restart.xml", gRoot) elif key == '+': if gFocus is not None: iso_value = VisusIsoValue() gFocus.getValue(iso_value) iso_value.data(iso_value.data() * 1.1) gFocus.setValue(iso_value) updateIso(iso_value) glutPostRedisplay() elif key == '-': if gFocus is not None: iso_value = VisusIsoValue() gFocus.getValue(iso_value) iso_value.data(iso_value.data() / 1.1) gFocus.setValue(iso_value) updateIso(iso_value) glutPostRedisplay() return
def keyboard(*args): global gCurrent, gFocus, gValues import sys (key, x, y) = args if key == 27 or key == "x": sys.exit(0) elif key == "m": VisusXMLInterface().write("restart.xml", gRoot) elif key == "+": if gFocus is not None: iso_value = VisusIsoValue() gFocus.getValue(iso_value) iso_value.data(iso_value.data() * 1.1) gFocus.setValue(iso_value) updateIso(iso_value) glutPostRedisplay() elif key == "-": if gFocus is not None: iso_value = VisusIsoValue() gFocus.getValue(iso_value) iso_value.data(iso_value.data() / 1.1) gFocus.setValue(iso_value) updateIso(iso_value) glutPostRedisplay() return
def keyboard(*args): global gColorMap, gColorMaps, gFocus, gRoot import sys (key, x, y) = args if key == 27: sys.exit(0) elif key == 'x': sys.exit(0) elif key == 'm': VisusXMLInterface().write("restart.xml", gRoot) elif key == 'n': if gFocus.nrOfChildren() > 0: gFocus = gFocus.child(0) print "Switching to first child of focus type(", gFocus.nodeType( ), ")" else: print "Switching to root of scene graph" gFocus = gRoot elif key == '+': value = VisusIsoValue() gFocus.getValue(value) value.data(value.data() * 1.1) gFocus.setValue(value) print "Iso-Value updated to ", value.data( ), " you won't see update in label since generic interface does not know of label" elif key == '-': value = VisusIsoValue() gFocus.getValue(value) value.data(value.data() / 1.1) gFocus.setValue(value) print "Iso-Value updated to ", value.data( ), " you won't see update in label since generic interface does not know of label" glutPostRedisplay() return
def keyboard( *args ): global gColorMap,gColorMaps,gFocus,gRoot import sys (key, x, y) = args if key == 27: sys.exit(0) elif key == 'x': sys.exit(0) elif key == 'm': VisusXMLInterface().write("restart.xml", gRoot) elif key == 'n': if gFocus.nrOfChildren() > 0: gFocus = gFocus.child(0) print "Switching to first child of focus type(", gFocus.nodeType(), ")" else: print "Switching to root of scene graph" gFocus = gRoot elif key == '+': value = VisusIsoValue() gFocus.getValue(value) value.data(value.data() * 1.1) gFocus.setValue(value) print "Iso-Value updated to ", value.data(), " you won't see update in label since generic interface does not know of label" elif key == '-': value = VisusIsoValue() gFocus.getValue(value) value.data(value.data() / 1.1) gFocus.setValue(value) print "Iso-Value updated to ", value.data(), " you won't see update in label since generic interface does not know of label" glutPostRedisplay() return