Click or drag to resize
AB4D logo

WpfMaterial Methods

The WpfMaterial type exposes the following members.

Methods
 NameDescription
Public methodStatic memberClearUsedDXMaterial Clears a cached DXEngine's Material that is used for the WPF material. This means that next time the WPF material will be used a new instance of DXEngine's Material will be created.
Public methodClone Clones the current material with creating a shallow copy of this Material (properties are copied but referenced objects are preserved).
(Overrides MaterialClone)
Public methodCreateLineMaterial(Material, Color4, Single) CreateLineMaterial converts WPF's material into DXEngine's LineMaterial. Line's color is get from DiffuseMaterial or EmissiveMaterial if present (else default color is used).
Public methodCreateLineMaterial(Material, Color, Double) CreateLineMaterial converts WPF's material into DXEngine's LineMaterial. Line's color is get from DiffuseMaterial or EmissiveMaterial if present (else default color is used).
Public methodStatic memberCreateTexture2D(DXDevice, BitmapSource) CreateTexture2D creates a 2D Texture from the specified WPF BitmapSource and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak.
Public methodStatic memberCreateTexture2D(DXDevice, BitmapSource, TextureInfo) CreateTexture2D creates a 2D Texture from the specified WPF BitmapSource and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak.
Public methodGetDefaultRenderingQueue Returns the RenderingQueue that should be used to render this material. The method returns TransparentRenderingQueue or StandardGeometryRenderingQueue based on the HasTransparency value.
(Overrides MaterialGetDefaultRenderingQueue(DXScene))
Public methodStatic memberGetUsedDXMaterial GetUsedDXMaterial method returns a DXEngine's Material that was created from the WPF material (or null if no DXMaterial was created for the WPF material) parentDXDevice is requireed to check if the created DXMeshGeometry3D was created for the same device.
Public methodStatic memberLoadTexture2D(DXDevice, String) LoadTexture2D loads a 2D Texture from the specified fileName and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak. This method uses WPF's image loader - to load the image directly into DirectX use the LoadShaderResourceView(Device, String, TextureInfo) or LoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, TextureInfo) methods instead.
Public methodStatic memberLoadTexture2D(DXDevice, String, TextureInfo) LoadTexture2D loads a 2D Texture from the specified fileName and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak. This method uses WPF's image loader - to load the image directly into DirectX use the LoadShaderResourceView(Device, String, TextureInfo) or LoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, TextureInfo) methods instead.
Public methodRefresh Refresh method updates the values of the properties used by Ab3d.DXEngine with reading the values from the used WPF Material. The method also recreates any textures that were created from WPF Material.
(Overrides MaterialRefresh)
Public methodStatic memberSetUsedDXMaterial(Material, Material) Sets the specified DXEngine's Material (dxMaterial) to be used when rendering the specified WPF material (wpfMaterial). It will be used when the WPF material will be shown in DXEngine (must be set before the objects are initialized in DXEngine).
Public methodStatic memberSetUsedDXMaterial(Material, Material, DXDevice)Obsolete.
Sets the specified DXEngine's Material (dxMaterial) to be used when rendering the specified WPF material (wpfMaterial). It will be used when the WPF material will be shown in DXEngine (must be set before the objects are initialized in DXEngine).
Public methodToString Provides a formated text of this WpfMaterial
(Overrides MaterialToString)
Top
See Also