def update(): try: import inviwoqt as qt qt.update() except: pass
import inviwoqt import math import time import ivw.regression import ivw.camera steps = 50 m = ivw.regression.Measurements() with ivw.camera.Camera("EntryExitPoints.camera", lookfrom=[0, 4, 0], lookto=[0, 0, 0], lookup=[0, 0, 1]) as c: for size in [256, 512, 768, 1024]: inviwo.resizecanvas("CanvasGL", size, size) ivw.regression.saveCanvas("CanvasGL", "CanvasGL-" + str(size) + "x" + str(size)) start = time.clock() for step in c.rotate(math.pi / steps, steps, [0, 1, 0]): inviwoqt.update() end = time.clock() frametime = (end - start) / steps fps = 1.0 / frametime m.addFrequency('FPS-' + str(size) + 'x' + str(size), fps) m.save()
import inviwo import inviwoqt nTests = 25 print("###" + str(nTests) + "###") print("##PCPRenderer (plain)##") for i in range(0, nTests): inviwo.clickButton("PCP Renderer.invalidate") inviwo.wait() inviwoqt.update() inviwo.setPropertyValue("PCP Renderer._depthTesting", True) inviwo.wait() print("##PCPRenderer (transparency)##") for i in range(0, nTests): inviwo.clickButton("PCP Renderer.invalidate") inviwo.wait() inviwoqt.update() print("##DensityMapGenerator##") for i in range(0, nTests): inviwo.clickButton("Density Map Generator._invalidate") inviwo.wait() inviwoqt.update()
def set(self): inviwo.setPropertyValue(self.id, (self.lookfrom, self.lookto, self.lookup)) inviwoqt.update()
def update(): try: import inviwoqt as qt qt.update(); except: pass