Wpf |
The WpfMaterial type exposes the following members.
Name | Description | |
---|---|---|
ClearUsedDXMaterial | 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. | |
Clone |
Clones the current material with creating a shallow copy of this Material (properties are copied but referenced objects are preserved).
(Overrides MaterialClone) | |
CreateLineMaterial(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). | |
CreateLineMaterial(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). | |
CreateTexture2D(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. | |
CreateTexture2D(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. | |
GetDefaultRenderingQueue |
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)) | |
GetUsedDXMaterial | 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. | |
LoadTexture2D(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. | |
LoadTexture2D(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. | |
Refresh |
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) | |
SetUsedDXMaterial(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). | |
SetUsedDXMaterial(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). | |
ToString |
Provides a formated text of this WpfMaterial
(Overrides MaterialToString) |