Click or drag to resize
Ab4d.SharpEngine logo

Extensions Class

Extensions class provides extension methods to convert WPF types to SharpEngine types and vice versa.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.WpfExtensions

Namespace: Ab4d.SharpEngine.Wpf
Assembly: Ab4d.SharpEngine.Wpf (in Ab4d.SharpEngine.Wpf.dll) Version: 1.0.8740+dd919213ce98c470a123b140574ba91ba31d337e
Syntax
C#
public static class Extensions

The Extensions type exposes the following members.

Methods
 NameDescription
Public Extension MethodSaturate(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.
Public Extension MethodSaturate(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.
Public Extension MethodToBoundingBox Converts WPF Rect3D to BoundingBox
Public Extension MethodToColor3 Converts WPF Color to SharpEngine's Color3
Public Extension MethodToColor4 Converts WPF Color to SharpEngine's Color4
Public Extension MethodToMatrix Converts WPF Matrix3D to System.Numerics.Matrix4x4 that is used in SharpEngine
Public Extension MethodToPremultipliedColor3(Color) Converts WPF Color to premultipled SharpEngine's Color3 (premultipled color is color where R, G and B color values are multiplied with alpha value)
Public Extension MethodToPremultipliedColor3(Color, Single) Converts WPF Color to premultipled SharpEngine's Color3 (premultipled color is color where R, G and B color values are multiplied with alpha value)
Public Extension MethodToPremultipliedColor4 Converts WPF Color to premultipled SharpEngine's Color4 (premultipled color is color where R, G and B color values are multiplied with alpha value)
Public Extension MethodToRect3D Converts BoundingBox to WPF Rect3D
Public Extension MethodToVector3(Point3D) Converts WPF Point3D to SharpEngine's Vector3
Public Extension MethodToVector3(Vector3D) Converts WPF Vector3D to SharpEngine's Vector3
Public Extension MethodToWpfColor(Color3) Converts SharpEngine's Color3 to WPF color
Public Extension MethodToWpfColor(Color4) Converts SharpEngine's Color4 to WPF color
Public Extension MethodToWpfMatrix3D Converts System.Numerics.Matrix4x4 that is used in SharpEngine to WPF Matrix3D
Public Extension MethodToWpfPoint3D Converts SharpEngine's Vector3 to WPF Point3D
Public Extension MethodToWpfVector3D Converts SharpEngine's Vector3 to WPF Vector3D
Top
See Also