本文整理汇总了Python中Translator.Translator.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Translator.__init__方法的具体用法?Python Translator.__init__怎么用?Python Translator.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Translator.Translator
的用法示例。
在下文中一共展示了Translator.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Translator import Translator [as 别名]
# 或者: from Translator.Translator import __init__ [as 别名]
def __init__(self, filename, compile=True, buffer=None):
VisibleNode.__init__(self)
Translator.__init__(self)
self.rotX = 0.0
self.rotY = 0.0
self.rotZ = 0.0
self.scale = 1.0
if Model.dlcache.has_key(filename):
self._displayList = Model.dlcache[filename]
bb = Model.bbcache[filename]
else:
if buffer is None:
self._dom = dom3ds.read_3ds_file(filename)
else:
self._dom = dom3ds.read_3ds_mem(buffer)
self._model = glmodel.GLModel(self._dom, self._loadTexture)
bb = self._model.bounding_box()
Model.bbcache[filename] = bb
if compile:
self._displayList = self._model.create_dl()
Model.dlcache[filename] = self._displayList
else:
self._displayList = None
self._center = (bb[0] + bb[1]) / 2
self._modelScale = 1.0 / max(abs(bb[0] - bb[1]))
示例2: __init__
# 需要导入模块: from Translator import Translator [as 别名]
# 或者: from Translator.Translator import __init__ [as 别名]
def __init__(self, x=0.0, y=0.0, w=0.0, h=0.0):
Translator.__init__(self)
Node.__init__(self)
self.x = x
self.y = y
self.w = w
self.h = h
示例3: __init__
# 需要导入模块: from Translator import Translator [as 别名]
# 或者: from Translator.Translator import __init__ [as 别名]
def __init__(self):
self.zoom = 1.0
self.rot = 0.0
Translator.__init__(self)
Node.__init__(self)
示例4: __init__
# 需要导入模块: from Translator import Translator [as 别名]
# 或者: from Translator.Translator import __init__ [as 别名]
def __init__(self):
VisibleNode.__init__(self)
Translator.__init__(self)
self.color = (1.0, 1.0, 1.0)
self.opacity = 1.0
self.size = None
示例5: __init__
# 需要导入模块: from Translator import Translator [as 别名]
# 或者: from Translator.Translator import __init__ [as 别名]
def __init__(self):
Translator.__init__(self)
self._diffuse = 0.25
self._ambient = 0.25
self._specular = 0.0