本文整理汇总了Python中suit.cf.BaseEditMode._onMouseMoved方法的典型用法代码示例。如果您正苦于以下问题:Python BaseEditMode._onMouseMoved方法的具体用法?Python BaseEditMode._onMouseMoved怎么用?Python BaseEditMode._onMouseMoved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类suit.cf.BaseEditMode
的用法示例。
在下文中一共展示了BaseEditMode._onMouseMoved方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _onMouseMoved
# 需要导入模块: from suit.cf import BaseEditMode [as 别名]
# 或者: from suit.cf.BaseEditMode import _onMouseMoved [as 别名]
def _onMouseMoved(self, _evt):
"""Mouse moved notification event
"""
if BaseEditMode._onMouseMoved(self, _evt): return True
mstate = _evt.get_state()
mpos = self._getMousePos(mstate)
self.mouse_pos = (mstate.X.abs, mstate.Y.abs)
if self.state is GeometryEditMode.ES_Move:
self.active_object.setPosition(render_engine.pos2dTo3dIsoPos(mpos))
return True
elif self.state is GeometryEditMode.ES_LineCreate:
self.__pointSpirit.setPosition(render_engine.pos2dTo3dIsoPos(mpos))
self._updateLineSpirits()
self._highlight()
return True
elif self.state is GeometryEditMode.ES_CircleCreate:
radius = self.active_object.getPosition().distance(render_engine.pos2dTo3dIsoPos(mpos))
self.active_object.setRadius(radius)
self._highlight()
return False
示例2: _onMouseMoved
# 需要导入模块: from suit.cf import BaseEditMode [as 别名]
# 或者: from suit.cf.BaseEditMode import _onMouseMoved [as 别名]
def _onMouseMoved(self, _evt):
"""Mouse moved event
"""
if BaseEditMode._onMouseMoved(self, _evt): return True
mstate = _evt.get_state()
self.mouse_pos = (mstate.X.abs, mstate.Y.abs)
self._highlight()
if self.navigation:
self.rotX = ogre.Degree(-mstate.X.rel * 0.13)
self.rotY = ogre.Degree(-mstate.Y.rel * 0.13)
return False