PhongMaterial

PhongMaterial class

Material for blinn-phong shading model.

public class PhongMaterial : LambertMaterial

Constructors

NameDescription
PhongMaterial()Initializes a new instance of the PhongMaterial class.
PhongMaterial(string)Initializes a new instance of the PhongMaterial class.

Properties

NameDescription
AmbientColor { get; set; }Gets or sets the ambient color
DiffuseColor { get; set; }Gets or sets the diffuse color
EmissiveColor { get; set; }Gets or sets the emissive color
virtual Name { get; set; }Gets or sets the name.
Properties { get; }Gets the collection of all properties.
ReflectionColor { get; set; }Gets or sets the reflection color.
ReflectionFactor { get; set; }Gets or sets the attenuation of the reflection color.
Shininess { get; set; }Gets or sets the shininess, this controls the specular highlight’s size. The formula of specular: SpecularColor * SpecularFactor * (N dot H) ^ Shininess
SpecularColor { get; set; }Gets or sets the specular color.
SpecularFactor { get; set; }Gets or sets the specular factor. The formula of specular: SpecularColor * SpecularFactor * (N dot H) ^ Shininess
Transparency { get; set; }Gets or sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped.
TransparentColor { get; set; }Gets or sets the transparent color.

Methods

NameDescription
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)
GetEnumerator()Gets the enumerator to enumerate internal texture slots.
GetProperty(string)Get the value of specified property
GetTexture(string)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name
RemoveProperty(Property)Removes a dynamic property.
RemoveProperty(string)Remove the specified property identified by name
SetProperty(string, object)Sets the value of specified property
SetTexture(string, TextureBase)Sets the texture to specified slot
override ToString()Formats object to string

See Also