Drawing3d documented Class Library

Material Members

Material overview

Public Static (Shared) Methods

LoadMaterial

Public Instance Constructors

Material Overloaded. Initializes a new instance of the Material class.

Public Instance Fields

Name For every material a name is given, which describes it. It can be void.
Tag
UpdateCount Th Updating - metod increment this field and th Updated decrement this field. If the field is 0 Update is called.

Public Instance Properties

Ambient Retrieves and sets the ambient part.
Diffuse Retrieves and sets the diffuse part.
Emission Retrieves and sets the emission part.
Shininess Retrieves and sets the Shininessvalue.
Specular Retrieves and sets the specular part.
Translucent Retrieves and sets the translucentvalue. It has to be between 0 ( translucent ) and 1 ( solid)

Public Instance Methods

assign Sets the meterial properties to an other material
Copy
Equals (inherited from Object) 
GetHashCode (inherited from Object) 
GetType (inherited from Object) 
SaveMaterial
ToString Overrides the ToString method. If a matrial has a name, then this name will be returned.
Update This method should be overridden for a real graphic engine. Further a call for the event Changed is done.
Updated Should be called at the end of a change of material properties in combination with Updating
Updating If you want to change properties of the material, please use Updating first and Updated at last. This guarantees that a Update-call is fired only once.
// Sample
Material m = new Material();
m.Updating();
m.Ambient    = Color.Red;
m.Specular    = Color.Blue;
.
.
m.Updated();
// now the virtual method Update will be called.

Public Instance Events

Changed This event is fired every time a property of a material has changed.

Protected Instance Methods

Finalize (inherited from Object) 
getAmbient Getmethod of the property Ambient
getDiffuse Virtual getmethod of Diffuse-property
getEmission Virtual getmethod of Emission-property
getShininess Virtual getmethod of Shininess-property
getSpecular Virtual getmethod of Specular-property
getTranslucent Virtual getmethod of Translucent-property
MemberwiseClone (inherited from Object) 
setAmbient Virtual setmethod of the property Ambient.
setDiffuse Virtual setmethod of Diffuse-property
setEmission Virtual setmethod of Emission-property
setShininess Virtual setmethod of Shininess-property
setSpecular Virtual setmethod of Specular-property
setTranslucent Virtual setmethod of Translucent-property

See Also

Material Class | Drawing3d.Materials Namespace