本文整理汇总了Python中pandac.PandaModules.SmoothMover.setMaxPositionAge方法的典型用法代码示例。如果您正苦于以下问题:Python SmoothMover.setMaxPositionAge方法的具体用法?Python SmoothMover.setMaxPositionAge怎么用?Python SmoothMover.setMaxPositionAge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandac.PandaModules.SmoothMover
的用法示例。
在下文中一共展示了SmoothMover.setMaxPositionAge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ProgressiveLoader
# 需要导入模块: from pandac.PandaModules import SmoothMover [as 别名]
# 或者: from pandac.PandaModules.SmoothMover import setMaxPositionAge [as 别名]
#.........这里部分代码省略.........
self.camLens.setFar(sys.maxint)
self.camLens.setNear(8.0)
self.render.setAntialias(p3d.AntialiasAttrib.MAuto)
self.showstats = showstats
if showstats:
self.num_metadata_loaded = 0
self.num_models_loaded = 0
self.num_texture_updates = 0
self.num_mesh_refinements = 0
self.total_texture_updates = 0
self.total_mesh_refinements = 0
self.txtMetadataLoaded = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.05),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtUniqueLoaded = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.11),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtTextureUpdates = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.17),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtMeshRefinements = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.23),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.update_stats()
self.globalClock = p3d.ClockObject.getGlobalClock()
self.smooth_mover = SmoothMover()
self.smooth_mover.setPredictionMode(SmoothMover.PMOn)
self.smooth_mover.setSmoothMode(SmoothMover.SMOn)
self.smooth_mover.setMaxPositionAge(10.0)
self.smooth_mover.setAcceptClockSkew(False)
self.smooth_mover.setDelay(0)
self.pandastate = katasked.panda.PandaState(self.cam,
self.unique_nodepaths,
self.nodepaths,
self.smooth_mover,
self.globalClock,
self.obj_bounds)
if self.capturefile is not None:
self.capturedata = json.load(self.capturefile)
self.duration = self.capturedata['duration']
self.positions = self.capturedata['positions']
self.rotations = self.capturedata['rotations']
self.curve_creator = motioncap.CreateNurbsCurve()
for pos, rot in zip(self.positions, self.rotations):
self.curve_creator.addPoint(pos, rot)
self.mopath = self.curve_creator.getMotionPath()
self.interval = MopathInterval.MopathInterval(self.mopath, self.cam, duration=self.duration, name="Camera Replay")
else:
controls.KeyboardMovement()
controls.MouseCamera()
self.update_camera_predictor_task = self.taskMgr.doMethodLater(0.1, self.update_camera_predictor, 'update_camera_predictor')
self.update_priority_task = self.taskMgr.doMethodLater(0.5, self.check_pool, 'check_pool')
self.load_waiting_task = self.taskMgr.doMethodLater(0.1, self.load_waiting, 'load_waiting')
def run(self):
if self.screenshot_dir is not None: