本文整理汇总了Python中collada.E.effect方法的典型用法代码示例。如果您正苦于以下问题:Python E.effect方法的具体用法?Python E.effect怎么用?Python E.effect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collada.E
的用法示例。
在下文中一共展示了E.effect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from collada import E [as 别名]
# 或者: from collada.E import effect [as 别名]
def __init__(self, id, params, shadingtype, bumpmap = None, double_sided = False,
emission = (0.0, 0.0, 0.0, 1.0),
ambient = (0.0, 0.0, 0.0, 1.0),
diffuse = (0.0, 0.0, 0.0, 1.0),
specular = (0.0, 0.0, 0.0, 1.0),
shininess = 0.0,
reflective = (0.0, 0.0, 0.0, 1.0),
reflectivity = 0.0,
transparent = (0.0, 0.0, 0.0, 1.0),
transparency = 0.0,
index_of_refraction = None,
xmlnode = None):
"""Create an effect instance out of properties.
:param str id:
A string identifier for the effect
:param list params:
A list containing elements of type :class:`collada.material.Sampler2D`
and :class:`collada.material.Surface`
:param str shadingtype:
The type of shader to be used for this effect. Right now, we
only supper the shaders listed in :attr:`shaders`
:param `collada.material.Map` bumpmap:
The bump map for this effect, or None if there isn't one
:param bool double_sided:
Whether or not the material should be rendered double sided
:param emission:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param ambient:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param diffuse:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param specular:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param shininess:
Either a single float or an instance of :class:`collada.material.Map`
:param reflective:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param reflectivity:
Either a single float or an instance of :class:`collada.material.Map`
:param tuple transparent:
Either an RGBA-format tuple of four floats or an instance
of :class:`collada.material.Map`
:param transparency:
Either a single float or an instance of :class:`collada.material.Map`
:param float index_of_refraction:
A single float indicating the index of refraction for perfectly
refracted light
:param xmlnode:
If loaded from xml, the xml node
"""
self.id = id
"""The string identifier for the effect"""
self.params = params
"""A list containing elements of type :class:`collada.material.Sampler2D`
and :class:`collada.material.Surface`"""
self.shadingtype = shadingtype
"""String with the type of the shading."""
self.bumpmap = bumpmap
"""Either the bump map of the effect of type :class:`collada.material.Map`
or None if there is none."""
self.double_sided = double_sided
"""A boolean indicating whether or not the material should be rendered double sided"""
self.emission = emission
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.ambient = ambient
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.diffuse = diffuse
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.specular = specular
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.shininess = shininess
"""Either a single float or an instance of :class:`collada.material.Map`"""
self.reflective = reflective
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.reflectivity = reflectivity
"""Either a single float or an instance of :class:`collada.material.Map`"""
self.transparent = transparent
"""Either an RGB-format tuple of three floats or an instance
of :class:`collada.material.Map`"""
self.transparency = transparency
"""Either a single float or an instance of :class:`collada.material.Map`"""
self.index_of_refraction = index_of_refraction
"""A single float indicating the index of refraction for perfectly
refracted light"""
self._fixColorValues()
if xmlnode is not None:
#.........这里部分代码省略.........