 |
StandardMaterial Class |
StandardMaterial is a material that defines the standard properties to show the diffuse, specular and emissive material properties.
It is possible to create a texture by using
CreateDiffuseTexture(RawImageData, CommonSamplerTypes, String, Single) method.
To lazily load a texture use constructor that takes file name, file stream or
RawImageData.
It is also possible to load texture by calling LoadDiffuseTexture method.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.MaterialsAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic class StandardMaterial : StandardMaterialBase,
ISpecularMaterial, IEmissiveMaterial
The StandardMaterial type exposes the following members.
Constructors| | Name | Description |
|---|
 | StandardMaterial(String) |
Constructor
|
 | StandardMaterial(Color3, String) |
StandardMaterial constructor with a diffuse color (Opacity is 1)
|
 | StandardMaterial(Color4, String) |
StandardMaterial constructor with diffuse color and opacity specified in Color4 struct (opacity is set from color's alpha value). The color is not alpha pre-multiplied.
|
 | StandardMaterial(Color3, Single, String) |
StandardMaterial constructor with a diffuse color and an opacity value
|
 | StandardMaterial(GpuImage, CommonSamplerTypes, String) |
StandardMaterial constructor with diffuse texture.
The textureImage is not disposed when disposing this material.
|
 | StandardMaterial(Color3, Single, Single, String) |
StandardMaterial constructor with a diffuse color and an opacity value
|
 | StandardMaterial(Stream, String, IBitmapIO, CommonSamplerTypes, Single, String) |
StandardMaterial constructor with file stream of the diffuse texture.
The texture will be lazily loaded when this material will be initialized.
When the created GpuImage is not cached by the Scene (defined by static UseSceneCacheForTextures) or GpuDevice (defined by static UseGpuDeviceCacheForTextures), then it is disposed when this Material is disposed.
This constructor does not have loadInBackground and initialDiffuseColor (as the one that takes textureFileName) because this would require that the fileStream is not closed until the texture is loaded (but there is no callback to the user to do that).
|
 | StandardMaterial(String, IBitmapIO, CommonSamplerTypes, Single, NullableColor4, Boolean, String) |
StandardMaterial constructor with file name of the diffuse texture.
The texture will be lazily loaded when this material will be initialized.
When the created GpuImage is not cached by the Scene (defined by static UseSceneCacheForTextures) or GpuDevice (defined by static UseGpuDeviceCacheForTextures), then it is disposed when this Material is disposed.
|
Top
Properties| | Name | Description |
|---|
 | EmissiveColor |
Gets or sets a Color3 that that represents the emissive color - the color of the object regardless of the lights.
|
 | HasSpecularColor |
Gets a boolean that specifies if this material is using specular effect.
|
 | SpecularColor |
Gets or sets the Color3 that specifies the color used to draw the specular highlight effect. Default value is Color3.White.
|
 | SpecularPower |
Gets or sets a float that specifies the power of the specular effect. Zero value (by default) means that the specular effect is turned off.
|
Top
Methods
See Also