PhongMaterial

PhongMaterial class

Blinn-Phong 着色模型的材质。

方法

constructor

名称描述
constructor()初始化 PhongMaterial 类的新实例。

Result:


constructor_overload

名称描述
constructor_overload(name)初始化 PhongMaterial 类的新实例。

Parameters:

名称类型描述
name字符串名称

Result:


getSpecularColor

名称描述
getSpecularColor()获取或设置高光颜色。

Result:


setSpecularColor

名称描述
setSpecularColor(value)获取或设置高光颜色。

Result:


getSpecularFactor

名称描述
getSpecularFactor()获取或设置高光因子。高光公式:SpecularColor SpecularFactor (N dot H) ^ Shininess

Result:


setSpecularFactor

名称描述
setSpecularFactor(value)获取或设置高光因子。高光公式:SpecularColor SpecularFactor (N dot H) ^ Shininess

Result:


getShininess

名称描述
getShininess()获取或设置光泽度,这决定高光的大小。高光公式:SpecularColor SpecularFactor (N dot H) ^ Shininess 光泽度。

Result:


setShininess

名称描述
setShininess(value)获取或设置光泽度,这决定高光的大小。高光公式:SpecularColor SpecularFactor (N dot H) ^ Shininess 光泽度。

Result:


getReflectionColor

名称描述
getReflectionColor()获取或设置反射颜色。反射。

Result:


setReflectionColor

名称描述
setReflectionColor(value)获取或设置反射颜色。反射。

Result:


getReflectionFactor

名称描述
getReflectionFactor()获取或设置反射颜色的衰减。反射因子。

Result:


setReflectionFactor

名称描述
setReflectionFactor(value)获取或设置反射颜色的衰减。反射因子。

Result:


getEmissiveColor

名称描述
getEmissiveColor()获取或设置自发光颜色

Result:


setEmissiveColor

名称描述
setEmissiveColor(value)获取或设置自发光颜色

Result:


getAmbientColor

名称描述
getAmbientColor()获取或设置环境光颜色 示例:var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient.

Result:


setAmbientColor

名称描述
setAmbientColor(value)获取或设置环境光颜色 示例:var mat = new LambertMaterial(); mat.AmbientColor = new Vector3(1, 1, 1); ambient.

Result:


getDiffuseColor

名称描述
getDiffuseColor()获取或设置漫反射颜色 示例:var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); 漫反射。

Result:


setDiffuseColor

名称描述
setDiffuseColor(value)获取或设置漫反射颜色 示例:var mat = new LambertMaterial(); mat.DiffuseColor = new Vector3(1, 0, 0); 漫反射。

Result:


getTransparentColor

名称描述
getTransparentColor()获取或设置透明颜色。 示例:var mat = new LambertMaterial(); mat.TransparentColor = new Vector3(0.3, 0.5, 0.2); 透明颜色。

Result:


setTransparentColor

名称描述
setTransparentColor(value)获取或设置透明颜色。 示例:var mat = new LambertMaterial(); mat.TransparentColor = new Vector3(0.3, 0.5, 0.2); 透明颜色。

Result:


getTransparency

名称描述
getTransparency()获取或设置透明度因子。 该因子应在 0(0%,完全不透明) 与 1(100%,完全透明) 之间取值,任何无效的因子值将被限制。 示例:var mat = new LambertMaterial(); mat.Transparency = 0.3; 透明度因子。

Result:


setTransparency

名称描述
setTransparency(value)获取或设置透明度因子。 该因子应在 0(0%,完全不透明) 与 1(100%,完全透明) 之间取值,任何无效的因子值将被限制。 示例:var mat = new LambertMaterial(); mat.Transparency = 0.3; 透明度因子。

Result:


getName

名称描述
getName()获取或设置名称。名称。

Result:


setName

名称描述
setName(value)获取或设置名称。名称。

Result:


getProperties

名称描述
getProperties()获取所有属性的集合。

Result:


getTexture

名称描述
getTexture(slotName)获取指定槽位的纹理,它可以是材质的属性名称或着色器的参数名称

Parameters:

名称类型描述
slotName字符串槽位名称。

Result: TextureBase


setTexture

名称描述
setTexture(slotName, texture)将纹理设置到指定槽位

Parameters:

名称类型描述
slotName字符串槽位名称。
textureTextureBase纹理。

Result: TextureBase


toString

名称描述
toString()将对象格式化为字符串

Result: 字符串


removeProperty

名称描述
removeProperty(property)移除动态属性。

Parameters:

名称类型描述
propertyProperty要移除哪个属性

Result: boolean


removeProperty

名称描述
removeProperty(property)移除按名称标识的指定属性

Parameters:

名称类型描述
propert字符串null

Result: boolean


getProperty

名称描述
getProperty(property)获取指定属性的值

Parameters:

名称类型描述
property字符串属性名称

Result: 对象


setProperty

名称描述
setProperty(property, value)设置指定属性的值

Parameters:

名称类型描述
property字符串属性名称
对象属性的值

Result: 对象


findProperty

名称描述
findProperty(propertyName)查找属性。它可以是动态属性(由 CreateDynamicProperty/SetProperty 创建)或本机属性(通过其名称标识)

Parameters:

名称类型描述
propertyName字符串属性名称。

Result: Property


iterator

名称描述
iterator()保留供内部使用。

Result: Property