DisplayMaterial
ReferencesConstructors
public DisplayMaterial(Color diffuse, Color specular, Color ambient, Color emission, double shine, double transparency)
Constructs a material with custom properties.
Parameters:
| 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) |
Constructs a default material with a specific diffuse color and transparency.
Constructs a default material with a specific diffuse color.
Parameters:
| diffuse (Color) | Diffuse color of material. The alpha component of the Diffuse color is ignored. |
public DisplayMaterial(DisplayMaterial other)
Duplicate another material.
Parameters:
| other (DisplayMaterial) |
Finalizer
~DisplayMaterial
#~DisplayMaterial()
Properties
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.
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.
Gets or sets the Diffuse color of the back side of the Material. The alpha component of the color will be ignored.
Gets or sets the Emissive color of the back side of the Material. The alpha component of the color will be ignored.
Gets or sets the shine factor of the back side of the material (0.0 to 1.0)
Gets or sets the Specular color of the back side of the Material. The alpha component of the color will be ignored.
Gets or sets the transparency of the back side material (0.0 = opaque to 1.0 = transparent)
Gets or sets the Diffuse color of the Material. The alpha component of the color will be ignored.
Gets or sets the Emissive color of the Material. The alpha component of the color will be ignored.
Gets or sets the shine factor of the material (0.0 to 1.0)
Gets or sets the Specular color of the Material. The alpha component of the color will be ignored.
Methods
public void Dispose()
Gets the bump texture for this display material.
Parameters:
| front (bool) |
Returns: The texture, or null if no bump texture has been added to this material.
Parameters:
| front (bool) |
Parameters:
| front (bool) |
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.
Parameters:
| 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. |
Returns: true on success.