DisplayMaterial

References

Constructors

DisplayMaterial

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

DisplayMaterial

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

DisplayMaterial

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

DisplayMaterial

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

DisplayMaterial

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

DisplayMaterial

#Since v5.0
public DisplayMaterial(
Material
material
)

Finalizer

~DisplayMaterial

#
~DisplayMaterial()

Properties

Ambient

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

BackAmbient

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

BackDiffuse

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

BackEmission

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

BackShine

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

BackSpecular

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

BackTransparency

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

Diffuse

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

Emission

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

IsTwoSided

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

Shine

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

Specular

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

Transparency

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

Methods

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(
disposing
)

GetBitmapTexture

#Since v5.0
public Texture GetBitmapTexture(
front
)

GetBumpTexture

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

GetEnvironmentTexture

#Since v5.0
public Texture GetEnvironmentTexture(
front
)

GetTransparencyTexture

#Since v5.0
public Texture GetTransparencyTexture(
front
)

SetBitmapTexture

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

SetBitmapTexture

#Since v9.0
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.

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

SetBitmapTexture

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

SetBumpTexture

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

SetBumpTexture

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

SetEnvironmentTexture

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

SetEnvironmentTexture

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

SetTransparencyTexture

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

SetTransparencyTexture

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