Table of Contents

Class PhongMaterial

Namespace
HelixToolkit.WinUI.SharpDX
Assembly
HelixToolkit.WinUI.SharpDX.dll

Implements a phong-material with its all properties Includes Diffuse, Normal, Displacement, Specular, etc. maps

[DataContract]
public class PhongMaterial : Material, IWinRTObject, IDynamicInterfaceCastable, IEquatable<DependencyObject>
Inheritance
PhongMaterial
Implements
IWinRTObject
Inherited Members
Extension Methods

Constructors

PhongMaterial()

Constructs a Shading Material which correspnds with the Phong and BlinnPhong lighting models.

public PhongMaterial()

PhongMaterial(PhongMaterialCore)

Initializes a new instance of the PhongMaterial class.

public PhongMaterial(PhongMaterialCore core)

Parameters

core PhongMaterialCore

The core.

Fields

AmbientColorProperty

Identifies the System.Windows.Media.Media3D.DiffuseMaterial.AmbientColor�dependency property.

public static readonly DependencyProperty AmbientColorProperty

Field Value

DependencyProperty

DiffuseAlphaMapProperty

Supports alpha channel image, such as PNG. Usage: Load the image file(BMP, PNG, etc) as a TextureModel. It can be used to replace DiffuseMap, or used as a mask and apply onto diffuse map. The color will be cDiffuse*cAlpha.

public static readonly DependencyProperty DiffuseAlphaMapProperty

Field Value

DependencyProperty

DiffuseColorProperty

Identifies the System.Windows.Media.Media3D.DiffuseMaterial.Color�dependency property.

public static readonly DependencyProperty DiffuseColorProperty

Field Value

DependencyProperty

DiffuseMapProperty

public static readonly DependencyProperty DiffuseMapProperty

Field Value

DependencyProperty

DiffuseMapSamplerProperty

public static readonly DependencyProperty DiffuseMapSamplerProperty

Field Value

DependencyProperty

DisplacementMapProperty

public static readonly DependencyProperty DisplacementMapProperty

Field Value

DependencyProperty

DisplacementMapSamplerProperty

public static readonly DependencyProperty DisplacementMapSamplerProperty

Field Value

DependencyProperty

DisplacementMapScaleMaskProperty

public static readonly DependencyProperty DisplacementMapScaleMaskProperty

Field Value

DependencyProperty

EmissiveColorProperty

public static readonly DependencyProperty EmissiveColorProperty

Field Value

DependencyProperty

EmissiveMapProperty

public static readonly DependencyProperty EmissiveMapProperty

Field Value

DependencyProperty

EnableAutoTangentProperty

The enable automatic tangent

public static readonly DependencyProperty EnableAutoTangentProperty

Field Value

DependencyProperty

EnableFlatShadingProperty

public static readonly DependencyProperty EnableFlatShadingProperty

Field Value

DependencyProperty

EnableTessellationProperty

The enable tessellation property

public static readonly DependencyProperty EnableTessellationProperty

Field Value

DependencyProperty

MaxDistanceTessellationFactorProperty

The tessellation factor at MaxTessellationDistance property

public static readonly DependencyProperty MaxDistanceTessellationFactorProperty

Field Value

DependencyProperty

MaxTessellationDistanceProperty

The maximum tessellation distance property

public static readonly DependencyProperty MaxTessellationDistanceProperty

Field Value

DependencyProperty

MinDistanceTessellationFactorProperty

The tessellation factor at MinTessellationDistance property

public static readonly DependencyProperty MinDistanceTessellationFactorProperty

Field Value

DependencyProperty

MinTessellationDistanceProperty

The minimum tessellation distance property

public static readonly DependencyProperty MinTessellationDistanceProperty

Field Value

DependencyProperty

NormalMapProperty

public static readonly DependencyProperty NormalMapProperty

Field Value

DependencyProperty

ReflectiveColorProperty

public static readonly DependencyProperty ReflectiveColorProperty

Field Value

DependencyProperty

RenderDiffuseAlphaMapProperty

public static readonly DependencyProperty RenderDiffuseAlphaMapProperty

Field Value

DependencyProperty

RenderDiffuseMapProperty

public static readonly DependencyProperty RenderDiffuseMapProperty

Field Value

DependencyProperty

RenderDisplacementMapProperty

public static readonly DependencyProperty RenderDisplacementMapProperty

Field Value

DependencyProperty

RenderEmissiveMapProperty

public static readonly DependencyProperty RenderEmissiveMapProperty

Field Value

DependencyProperty

RenderEnvironmentMapProperty

The render environment map property

public static readonly DependencyProperty RenderEnvironmentMapProperty

Field Value

DependencyProperty

RenderNormalMapProperty

public static readonly DependencyProperty RenderNormalMapProperty

Field Value

DependencyProperty

RenderShadowMapProperty

The render shadow map property

public static readonly DependencyProperty RenderShadowMapProperty

Field Value

DependencyProperty

RenderSpecularColorMapProperty

public static readonly DependencyProperty RenderSpecularColorMapProperty

Field Value

DependencyProperty

SpecularColorMapProperty

public static readonly DependencyProperty SpecularColorMapProperty

Field Value

DependencyProperty

SpecularColorProperty

public static readonly DependencyProperty SpecularColorProperty

Field Value

DependencyProperty

SpecularShininessProperty

public static readonly DependencyProperty SpecularShininessProperty

Field Value

DependencyProperty

UVTransformProperty

The uv transform property

public static readonly DependencyProperty UVTransformProperty

Field Value

DependencyProperty

VertexColorBlendingFactorProperty

public static readonly DependencyProperty VertexColorBlendingFactorProperty

Field Value

DependencyProperty

Properties

AmbientColor

Gets or sets a color that represents how the material reflects System.Windows.Media.Media3D.AmbientLight. For details see: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147175(v=vs.85).aspx

public Color4 AmbientColor { get; set; }

Property Value

Color4

DiffuseAlphaMap

public TextureModel? DiffuseAlphaMap { get; set; }

Property Value

TextureModel

DiffuseColor

Gets or sets the diffuse color for the material. For details see: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147175(v=vs.85).aspx

public Color4 DiffuseColor { get; set; }

Property Value

Color4

DiffuseMap

System.Windows.Media.Brush to be applied as a System.Windows.Media.Media3D.Material to a 3-D model.

public TextureModel? DiffuseMap { get; set; }

Property Value

TextureModel

DiffuseMapSampler

public SamplerStateDescription DiffuseMapSampler { get; set; }

Property Value

SamplerStateDescription

DisplacementMap

public TextureModel? DisplacementMap { get; set; }

Property Value

TextureModel

DisplacementMapSampler

public SamplerStateDescription DisplacementMapSampler { get; set; }

Property Value

SamplerStateDescription

DisplacementMapScaleMask

public Vector4 DisplacementMapScaleMask { get; set; }

Property Value

Vector4

EmissiveColor

Gets or sets the emissive color for the material. For details see: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147175(v=vs.85).aspx

public Color4 EmissiveColor { get; set; }

Property Value

Color4

EmissiveMap

public TextureModel? EmissiveMap { get; set; }

Property Value

TextureModel

EnableAutoTangent

Gets or sets a value indicating whether [enable automatic tangent].

public bool EnableAutoTangent { get; set; }

Property Value

bool

true if [enable automatic tangent]; otherwise, false.

EnableFlatShading

Gets or sets a value indicating whether [enable flat shading].

public bool EnableFlatShading { get; set; }

Property Value

bool

true if [enable flat shading]; otherwise, false.

EnableTessellation

Gets or sets a value indicating whether [enable tessellation].

public bool EnableTessellation { get; set; }

Property Value

bool

true if [enable tessellation]; otherwise, false.

MaxDistanceTessellationFactor

Gets or sets the tessellation factor at MaxTessellationDistance.

public double MaxDistanceTessellationFactor { get; set; }

Property Value

double

The maximum tessellation factor.

MaxTessellationDistance

Gets or sets the maximum tessellation distance.

public double MaxTessellationDistance { get; set; }

Property Value

double

The maximum tessellation distance.

MinDistanceTessellationFactor

Gets or sets the tessellation factor at MinTessellationDistance

public double MinDistanceTessellationFactor { get; set; }

Property Value

double

The minimum tessellation factor.

MinTessellationDistance

Gets or sets the minimum tessellation distance.

public double MinTessellationDistance { get; set; }

Property Value

double

The minimum tessellation distance.

NormalMap

public TextureModel? NormalMap { get; set; }

Property Value

TextureModel

ReflectiveColor

A fake parameter for reflectivity of the environment map

public Color4 ReflectiveColor { get; set; }

Property Value

Color4

RenderDiffuseAlphaMap

public bool RenderDiffuseAlphaMap { get; set; }

Property Value

bool

RenderDiffuseMap

public bool RenderDiffuseMap { get; set; }

Property Value

bool

RenderDisplacementMap

public bool RenderDisplacementMap { get; set; }

Property Value

bool

RenderEmissiveMap

public bool RenderEmissiveMap { get; set; }

Property Value

bool

RenderEnvironmentMap

Gets or sets a value indicating whether [render environment map]. Default is false

public bool RenderEnvironmentMap { get; set; }

Property Value

bool

true if [render environment map]; otherwise, false.

RenderNormalMap

public bool RenderNormalMap { get; set; }

Property Value

bool

RenderShadowMap

Gets or sets a value indicating whether [render shadow map]. Default is false

public bool RenderShadowMap { get; set; }

Property Value

bool

true if [render shadow map]; otherwise, false.

RenderSpecularColorMap

public bool RenderSpecularColorMap { get; set; }

Property Value

bool

SpecularColor

Gets or sets the specular color for the material. For details see: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147175(v=vs.85).aspx

public Color4 SpecularColor { get; set; }

Property Value

Color4

SpecularColorMap

public TextureModel? SpecularColorMap { get; set; }

Property Value

TextureModel

SpecularShininess

The power of specular reflections. For details see: http://msdn.microsoft.com/en-us/library/windows/desktop/bb147175(v=vs.85).aspx

public float SpecularShininess { get; set; }

Property Value

float

UVTransform

Gets or sets the texture uv transform.

public UVTransform UVTransform { get; set; }

Property Value

UVTransform

The uv transform.

VertexColorBlendingFactor

Gets or sets the vertex color blending factor. Final Diffuse Color = (1 - VertexColorBlendingFactor) * Diffuse + VertexColorBlendingFactor * Vertex Color

public double VertexColorBlendingFactor { get; set; }

Property Value

double

The vertex color blending factor.

Methods

CloneMaterial()

public virtual PhongMaterial CloneMaterial()

Returns

PhongMaterial

OnCreateCore()

protected override MaterialCore OnCreateCore()

Returns

MaterialCore

Operators

implicit operator PhongMaterial?(PhongMaterialCore?)

public static implicit operator PhongMaterial?(PhongMaterialCore? core)

Parameters

core PhongMaterialCore

Returns

PhongMaterial