Extensions Class |
public static class Extensions
The Extensions type exposes the following members.
Name | Description | |
---|---|---|
ClearDXAttribute(Geometry3D, DXAttributeType) | Clears the value from DXAttributeType so that IsDXAttributeSet(Geometry3D, DXAttributeType) method returns false for that DXAttributeType. | |
ClearDXAttribute(Material, DXAttributeType) | Clears the value from DXAttributeType so that IsDXAttributeSet(Material, DXAttributeType) method returns false for that DXAttributeType. | |
ClearDXAttribute(Model3D, DXAttributeType) | Clears the value from DXAttributeType so that IsDXAttributeSet(Model3D, DXAttributeType) method returns false for that DXAttributeType. | |
ClearDXAttribute(Visual3D, DXAttributeType) | Clears the value from DXAttributeType so that IsDXAttributeSet(Visual3D, DXAttributeType) method returns false for that DXAttributeType. | |
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. | |
FastEquals | FastEquals compares two 4x4 matrices and returns true if they are exactly equal. To find results faster the FastEquals checks the fields that are usually different first (Offset, then scale, the others). | |
GetDXAttribute(Geometry3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Geometry3D. If the attributeType does not exists then an exception is thrown. Use GetDXAttributeOrDefaultT(Geometry3D, DXAttributeType) or GetDXAttributeOrDefaultT(Geometry3D, DXAttributeType, T) to prevent throwing exception when the value is not set. | |
GetDXAttribute(Material, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified System.Windows.Media.Media3D.Material. If the attributeType does not exists then an exception is thrown. Use GetDXAttributeOrDefaultT(Material, DXAttributeType) or GetDXAttributeOrDefaultT(Material, DXAttributeType, T) to prevent throwing exception when the value is not set. | |
GetDXAttribute(Model3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Model3D. If the attributeType does not exists then an exception is thrown. Use GetDXAttributeOrDefaultT(Model3D, DXAttributeType) or GetDXAttributeOrDefaultT(Model3D, DXAttributeType, T) to prevent throwing exception when the value is not set. | |
GetDXAttribute(Visual3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then an exception is thrown. Use GetDXAttributeOrDefaultT(Visual3D, DXAttributeType) or GetDXAttributeOrDefaultT(Visual3D, DXAttributeType, T) to prevent throwing exception when the value is not set. | |
GetDXAttributeCollection(Geometry3D) | Gets a DXAttributeCollection will a collection of all DXEngine's attributes set to the specified WPF's object. Returns null when no DXAttributeCollection was attached to the WPF object. | |
GetDXAttributeCollection(Material) | Gets a DXAttributeCollection will a collection of all DXEngine's attributes set to the specified WPF's object. Returns null when no DXAttributeCollection was attached to the WPF object. | |
GetDXAttributeCollection(Model3D) | Gets a DXAttributeCollection will a collection of all DXEngine's attributes set to the specified WPF's object. Returns null when no DXAttributeCollection was attached to the WPF object. | |
GetDXAttributeCollection(Visual3D) | Gets a DXAttributeCollection will a collection of all DXEngine's attributes set to the specified WPF's object. Returns null when no DXAttributeCollection was attached to the WPF object. | |
GetDXAttributeOrDefaultT(Geometry3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Geometry3D. If the attributeType does not exists then a default value for the type T is returned. | |
GetDXAttributeOrDefaultT(Material, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified System.Windows.Media.Media3D.Material. If the attributeType does not exists then a default value for the type T is returned. | |
GetDXAttributeOrDefaultT(Model3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Model3D. If the attributeType does not exists then a default value for the type T is returned. | |
GetDXAttributeOrDefaultT(Visual3D, DXAttributeType) | Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then a default value for the type T is returned. | |
GetDXAttributeOrDefaultT(Geometry3D, DXAttributeType, T) | Gets the value of the specified DXAttributeType from the specified Geometry3D. If the attributeType does not exists then the specified defaultValue is returned. | |
GetDXAttributeOrDefaultT(Material, DXAttributeType, T) | Gets the value of the specified DXAttributeType from the specified System.Windows.Media.Media3D.Material. If the attributeType does not exists then the specified defaultValue is returned. | |
GetDXAttributeOrDefaultT(Model3D, DXAttributeType, T) | Gets the value of the specified DXAttributeType from the specified Model3D. If the attributeType does not exists then the specified defaultValue is returned. | |
GetDXAttributeOrDefaultT(Visual3D, DXAttributeType, T) | Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then the specified defaultValue is returned. | |
GetGeometryModel3D | Returns a WPF's GeometryModel3D that was used to create the specified sceneNode. If the sceneNode does not define a GeometryModel3D object, then null is returned. | |
GetModel3D | Returns a WPF's Model3D that was used to create the specified sceneNode. If the sceneNode does not define a Model3D object, then null is returned. | |
GetModelVisual3D | Returns a WPF's ModelVisual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a ModelVisual3D is not found, then null is returned. | |
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. | |
GetUsedDXMeshGeometry3D | GetUsedDXMeshGeometry3D method checks if DXMeshGeometry3D object was already created for the specified meshGeometry and returns it in that case. Else null is returned. parentDXDevice is requireed to check if the created DXMeshGeometry3D was created for the same device. | |
GetVisual3D | Returns a WPF's Visual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a Visual3D is not found, then null is returned. | |
IsDXAttributeSet(Geometry3D, DXAttributeType) | Returns true if the specified attributeType was set (result is true even if the value is null). | |
IsDXAttributeSet(Material, DXAttributeType) | Returns true if the specified attributeType was set (result is true even if the value is null). | |
IsDXAttributeSet(Model3D, DXAttributeType) | Returns true if the specified attributeType was set (result is true even if the value is null). | |
IsDXAttributeSet(Visual3D, DXAttributeType) | Returns true if the specified attributeType was set (result is true even if the value is null). | |
Saturate(Color3) | Ensures that the color components are within 0 and 1 - if smaller than 0 than the value is set to 0; if bigger than 1 the value is set to 1. This is the same as saturate function in HLSL. | |
Saturate(Color4) | Ensures that the color components are within 0 and 1 - if smaller than 0 than the value is set to 0; if bigger than 1 the value is set to 1. This is the same as saturate function in HLSL. | |
SetDXAttribute(Geometry3D, DXAttributeType, Object) | Annotates the specified wpfObject with adding or updating a DXEngine's attribute to it. The attribute is specified with attributeType and its value. This can be used to annotate WPF's objects with DXEngine's attributes. | |
SetDXAttribute(Material, DXAttributeType, Object) | Annotates the specified wpfObject with adding or updating a DXEngine's attribute to it. The attribute is specified with attributeType and its value. This can be used to annotate WPF's objects with DXEngine's attributes. | |
SetDXAttribute(Model3D, DXAttributeType, Object) | Annotates the specified wpfObject with adding or updating a DXEngine's attribute to it. The attribute is specified with attributeType and its value. This can be used to annotate WPF's objects with DXEngine's attributes. | |
SetDXAttribute(Visual3D, DXAttributeType, Object) | Annotates the specified wpfObject with adding or updating a DXEngine's attribute to it. The attribute is specified with attributeType and its value. This can be used to annotate WPF's objects with DXEngine's attributes. | |
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). | |
SetUsedDXMeshGeometry3D | Sets a DXMeshGeometry3D that will be used when showing WPF MeshGeometry3D in DXEngine. | |
ToBoundingBox | Converts WPF Rect3D to SharpDX BoundingBox | |
ToColor3(Color) | Converts WPF Color to SharpDX Color3 | |
ToColor3(Color4) | Converts Color4 to Color3 | |
ToColor4(Color) | Converts WPF Color to SharpDX Color4 | |
ToColor4(Color3) | Converts Color3 to Color4 | |
ToColor4(Color3, Single) | Converts Color3 with alpha to Color4 | |
ToDXEngineBounds | Converts SharpDX BoundingBox to DXEngine's Bounds object | |
ToDXTransform | Converts WPF Transform to DXEngine Transformation | |
ToMatrix | Converts WPF Matrix3D to SharpDX Matrix | |
ToPremultipliedColor3(Color) | Converts WPF Color to premultipled SharpDX Color3 (premultipled color is color where R, G and B color values are multiplied with alpha value) | |
ToPremultipliedColor3(Color, Single) | Converts WPF Color to premultipled SharpDX Color3 (premultipled color is color where R, G and B color values are multiplied with alpha value) | |
ToPremultipliedColor4 | Converts WPF Color to premultipled SharpDX Color4 (premultipled color is color where R, G and B color values are multiplied with alpha value) | |
ToRect3D(BoundingBox) | Converts SharpDX BoundingBox to WPF Rect3D | |
ToRect3D(Bounds) | Converts DXEngine's Bounds object to WPF Rect3D | |
ToVector2 | Converts WPF Point to SharpDX Vector2 | |
ToVector3(Point3D) | Converts WPF Point3D to SharpDX Vector3 | |
ToVector3(Vector3D) | Converts WPF Vector3D to SharpDX Vector3 | |
ToWpfColor(Color) | Converts SharpDX Color to WPF Color | |
ToWpfColor(Color3) | Converts SharpDX Color3 to WPF color | |
ToWpfColor(Color4) | Converts SharpDX Color4 to WPF color | |
ToWpfMatrix3D | Converts SharpDX Matrix to WPF Matrix3D | |
ToWpfPoint3D | Converts SharpDX Vector3 to WPF Point3D | |
ToWpfVector3D | Converts SharpDX Vector3 to WPF Vector3D | |
Update | Updates the DXEngine's Transformation to the value of WPF Transform3D | |
UpdateDXBounds(Bounds, Rect3D) | Checks if wpfBounds is not the same as dxBounds and in this case updates the values in dxBounds | |
UpdateDXBounds(Bounds, Rect3D) | Checks if wpfBounds is not the same as dxBounds and in this case updates the values in dxBounds |