OmegaEngine API  1.0.3
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
OmegaEngine.Graphics.XMaterial Struct Reference

A combination of textures and lighting parameters. More...

Public Member Functions

 XMaterial (Color color)
 
 XMaterial (ITextureProvider diffuse)
 
void HoldReference ()
 Calls Asset.HoldReference for all contained XTextures. More...
 
void ReleaseReference ()
 Calls Asset.ReleaseReference for all contained XTextures. More...
 

Public Attributes

readonly ITextureProvider [] DiffuseMaps
 The diffuse textures maps More...
 

Static Public Attributes

static XMaterial DefaultMaterial => new XMaterial(Color.White)
 A plain white untextured material More...
 

Properties

Material D3DMaterial [get]
 A DirectX material with the color information form this XMaterial More...
 
Color Ambient [get, set]
 The color of the material when lit by ambient/background light (always active) More...
 
Color Diffuse [get, set]
 The color of the material when hit by diffuse light (normal lighting) More...
 
Color Specular [get, set]
 The color of specular (shiny) highlights on the material surface More...
 
float SpecularPower [get, set]
 The sharpness of specular highlights (lower value = sharper) More...
 
Color Emissive [get, set]
 The color of the light this material emits by itself - doubles as glow color More...
 
ITextureProvider NormalMap [get, set]
 The normal map (i.e. bump map) More...
 
ITextureProvider HeightMap [get, set]
 The height map (an optional addition to the normal map) More...
 
ITextureProvider SpecularMap [get, set]
 The specular map (which spots are "shiny") More...
 
ITextureProvider EmissiveMap [get, set]
 The emissive (self-shining, without light source) - doubles as the glow map More...
 

Detailed Description

A combination of textures and lighting parameters.

XMaterial instances are auto-generated when XMeshes are loaded.

Member Function Documentation

◆ HoldReference()

void OmegaEngine.Graphics.XMaterial.HoldReference ( )
inline

Calls Asset.HoldReference for all contained XTextures.

◆ ReleaseReference()

void OmegaEngine.Graphics.XMaterial.ReleaseReference ( )
inline

Calls Asset.ReleaseReference for all contained XTextures.

Member Data Documentation

◆ DefaultMaterial

XMaterial OmegaEngine.Graphics.XMaterial.DefaultMaterial => new XMaterial(Color.White)
static

A plain white untextured material

◆ DiffuseMaps

readonly ITextureProvider [] OmegaEngine.Graphics.XMaterial.DiffuseMaps

The diffuse textures maps

Property Documentation

◆ Ambient

Color OmegaEngine.Graphics.XMaterial.Ambient
getset

The color of the material when lit by ambient/background light (always active)

◆ D3DMaterial

Material OmegaEngine.Graphics.XMaterial.D3DMaterial
get

A DirectX material with the color information form this XMaterial

◆ Diffuse

Color OmegaEngine.Graphics.XMaterial.Diffuse
getset

The color of the material when hit by diffuse light (normal lighting)

◆ Emissive

Color OmegaEngine.Graphics.XMaterial.Emissive
getset

The color of the light this material emits by itself - doubles as glow color

◆ EmissiveMap

ITextureProvider OmegaEngine.Graphics.XMaterial.EmissiveMap
getset

The emissive (self-shining, without light source) - doubles as the glow map

◆ HeightMap

ITextureProvider OmegaEngine.Graphics.XMaterial.HeightMap
getset

The height map (an optional addition to the normal map)

◆ NormalMap

ITextureProvider OmegaEngine.Graphics.XMaterial.NormalMap
getset

The normal map (i.e. bump map)

◆ Specular

Color OmegaEngine.Graphics.XMaterial.Specular
getset

The color of specular (shiny) highlights on the material surface

◆ SpecularMap

ITextureProvider OmegaEngine.Graphics.XMaterial.SpecularMap
getset

The specular map (which spots are "shiny")

◆ SpecularPower

float OmegaEngine.Graphics.XMaterial.SpecularPower
getset

The sharpness of specular highlights (lower value = sharper)


The documentation for this struct was generated from the following file: