本文整理匯總了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