def convertRootToLocal(self, point): tm = self.localFromRootTransformMatrix() v = point.vector() v.transform(tm) return core.Point(v) def convertLocalToPixel(self, value): """ convert local-space coordinates to pixel-space. :param value: value to convert :type value: Point or Size or Rect :return: pixel-space coordinates :rtype: Point or Size or Rect (same as input) """ return super().convertLocalToPixel(value) def convertPixelToLocal(self, value): """ convert pixel-space coordinates to local-space. :param value: value to convert :type value: Point or Size or Rect :return: local-space coordinates :rtype: Point or Size or Rect (same as input) """ return super().convertPixelToLocal(value) core.setDefaultClass(core.Frame, Frame)
def contextForColored3DLineStrip(self, transform, blend=blendstate.defaultOpaque): return _colored3d.RenderColored3DLineStrip(self, transform, blend) def contextForColored3DPoints(self, transform, blend=blendstate.defaultOpaque): return _colored3d.RenderColored3DPoints(self, transform, blend) def contextForTextured3DTriangles(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DTriangles(self, transform, texture, sampler, color, blend) def contextForTextured3DTriangleStrip(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DTriangleStrip(self, transform, texture, sampler, color, blend) def contextForTextured3DTriangleFan(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DTriangleFan(self, transform, texture, sampler, color, blend) def contextForTextured3DLines(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DLines(self, transform, texture, sampler, color, blend) def contextForTextured3DLineStrip(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DLineStrip(self, transform, texture, sampler, color, blend) def contextForTextured3DPoints(self, transform, texture, sampler=None, color=color.white, blend=blendstate.defaultOpaque): return _textured3d.RenderTextured3DPoints(self, transform, texture, sampler, color, blend) def contextForCollisionShape(self, camera, mode=_shape.SHAPE_FACES): return _shape.RenderCollisionShape(self, camera, mode) core.setDefaultClass(core.Renderer, Renderer)