MCPcopy Create free account
hub / github.com/Kitware/VeloView / getFrameFromAnimationTime

Function getFrameFromAnimationTime

Application/Ui/python/lidarview/applogic.py:916–925  ·  view source on GitHub ↗
(time)

Source from the content-addressed store, hash-verified

914
915
916def getFrameFromAnimationTime(time):
917 if not getReader():
918 return -1
919
920 index = bisect.bisect_right(getAnimationScene().TimeKeeper.TimestepValues, time)
921 if index > 0:
922 previousTime = getAnimationScene().TimeKeeper.TimestepValues[index - 1]
923 nextTime = getAnimationScene().TimeKeeper.TimestepValues[index]
924 index = index - 1 if (abs(previousTime - time) < abs(nextTime - time)) else index
925 return index
926
927
928def onSaveScreenshot():

Callers 3

onSaveCSVFunction · 0.85
onSavePCAPFunction · 0.85
onSaveScreenshotFunction · 0.85

Calls 2

getReaderFunction · 0.85
getAnimationSceneFunction · 0.85

Tested by

no test coverage detected