DisplayMaterial

References

Constructors

DisplayMaterial

#Since v5.0
public DisplayMaterial()
Constructs a default material.

DisplayMaterial

#Since v5.0
public DisplayMaterial(Color diffuse, Color specular, Color ambient, Color emission, double shine, double transparency)
Constructs a material with custom properties.
diffuse (Color)Diffuse color of material. The alpha component of the Diffuse color is ignored.
specular (Color)Specular color of material. The alpha component of the Specular color is ignored.
ambient (Color)Ambient color of material. The alpha component of the Ambient color is ignored.
emission (Color)Emission color of material. The alpha component of the Emission color is ignored.
shine (double)Shine (highlight size) of material.
transparency (double)Transparency of material (0.0 = opaque, 1.0 = transparent)

DisplayMaterial

#Since v5.0
public DisplayMaterial(Color diffuse, double transparency)
Constructs a default material with a specific diffuse color and transparency.
diffuse (Color)Diffuse color of material. The alpha component of the Diffuse color is ignored.
transparency (double)Transparency factor (0.0 = opaque, 1.0 = transparent)

DisplayMaterial

#Since v5.0
public DisplayMaterial(Color diffuse)
Constructs a default material with a specific diffuse color.
diffuse (Color)Diffuse color of material. The alpha component of the Diffuse color is ignored.

DisplayMaterial

#Since v5.0
public DisplayMaterial(DisplayMaterial other)
Duplicate another material.
other (DisplayMaterial)

DisplayMaterial

#Since v5.0
public DisplayMaterial(Material material)
material (Material)

Finalizer

~DisplayMaterial

#
~DisplayMaterial()

Properties

Ambient

#Since v5.0
[EditorBrowsable(EditorBrowsableState.Never)] public Color Ambient { get; set; }
obsoleteThis property is obsolete: ambient is no longer supported
Gets or sets the Ambient color of the Material. The alpha component of the color will be ignored.

BackAmbient

#Since v5.0
[EditorBrowsable(EditorBrowsableState.Never)] public Color BackAmbient { get; set; }
obsoleteThis property is obsolete: ambient is no longer supported
Gets or sets the Ambient color of the back side of the Material. The alpha component of the color will be ignored.

BackDiffuse

#Since v5.0
public Color BackDiffuse { get; set; }
Gets or sets the Diffuse color of the back side of the Material. The alpha component of the color will be ignored.

BackEmission

#Since v5.0
public Color BackEmission { get; set; }
Gets or sets the Emissive color of the back side of the Material. The alpha component of the color will be ignored.

BackShine

#Since v5.0
public double BackShine { get; set; }
Gets or sets the shine factor of the back side of the material (0.0 to 1.0)

BackSpecular

#Since v5.0
public Color BackSpecular { get; set; }
Gets or sets the Specular color of the back side of the Material. The alpha component of the color will be ignored.

BackTransparency

#Since v5.0
public double BackTransparency { get; set; }
Gets or sets the transparency of the back side material (0.0 = opaque to 1.0 = transparent)

Diffuse

#Since v5.0
public Color Diffuse { get; set; }
Gets or sets the Diffuse color of the Material. The alpha component of the color will be ignored.

Emission

#Since v5.0
public Color Emission { get; set; }
Gets or sets the Emissive color of the Material. The alpha component of the color will be ignored.

IsTwoSided

#Since v5.0
public bool IsTwoSided { get; set; }

Shine

#Since v5.0
public double Shine { get; set; }
Gets or sets the shine factor of the material (0.0 to 1.0)

Specular

#Since v5.0
public Color Specular { get; set; }
Gets or sets the Specular color of the Material. The alpha component of the color will be ignored.

Transparency

#Since v5.0
public double Transparency { get; set; }
Gets or sets the transparency of the material (0.0 = opaque to 1.0 = transparent)

Methods

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(bool disposing)
disposing (bool)

GetBitmapTexture

#Since v5.0
public Texture GetBitmapTexture(bool front)
front (bool)

GetBumpTexture

#Since v5.0
public Texture GetBumpTexture(bool front)
Gets the bump texture for this display material.
front (bool)
The texture, or null if no bump texture has been added to this material.

GetEnvironmentTexture

#Since v5.0
public Texture GetEnvironmentTexture(bool front)
front (bool)

GetTransparencyTexture

#Since v5.0
public Texture GetTransparencyTexture(bool front)
front (bool)

SetBitmapTexture

#Since v5.0
public bool SetBitmapTexture(string filename, bool front)
filename (string)
front (bool)

SetBitmapTexture

#Since v9.0
public bool SetBitmapTexture(string name, Bitmap bitmap, bool front)
Uses the pixels of an in-memory bitmap as this material's bitmap texture, without writing an image file.

The pixels are copied into TextureCache under name. Calling this again with the same name replaces them in place, and the change shows up on the next redraw.

name (string)The name to cache the pixels under. See TextureCache.Set(string, Bitmap).
bitmap (Bitmap)The pixels to use.
front (bool)true for the front material, false for the back material.
true on success.

SetBitmapTexture

#Since v5.0
public bool SetBitmapTexture(Texture texture, bool front)
texture (Texture)
front (bool)

SetBumpTexture

#Since v5.0
public bool SetBumpTexture(string filename, bool front)
filename (string)
front (bool)

SetBumpTexture

#Since v5.0
public bool SetBumpTexture(Texture texture, bool front)
texture (Texture)
front (bool)

SetEnvironmentTexture

#Since v5.0
public bool SetEnvironmentTexture(string filename, bool front)
filename (string)
front (bool)

SetEnvironmentTexture

#Since v5.0
public bool SetEnvironmentTexture(Texture texture, bool front)
texture (Texture)
front (bool)

SetTransparencyTexture

#Since v5.0
public bool SetTransparencyTexture(string filename, bool front)
filename (string)
front (bool)

SetTransparencyTexture

#Since v5.0
public bool SetTransparencyTexture(Texture texture, bool front)
texture (Texture)
front (bool)