Table of Contents

Class TypeAdapterExtensions

Namespace
Icy.Stride
Assembly
IcyUI.Stride.dll

Provides extension methods for conversion between most common structures of the target engine and system library ones.

public static class TypeAdapterExtensions
Inheritance
TypeAdapterExtensions
Inherited Members

Remarks

Mirrors Icy.MonoGame.TypeAdapterExtensions - same method names/shapes, targeting Stride's Stride.Core.Mathematics types instead of MonoGame's.

Methods

AsEngineColor(Color)

Converts a specified instance of Color to an instance of Color.

public static Color AsEngineColor(this Color value)

Parameters

value Color

The Color instance to convert.

Returns

Color

An instance of Color with field values mapped from value.

AsEngineMatrix(Matrix3x2)

Converts a specified instance of Matrix3x2 to an instance of Matrix.

public static Matrix AsEngineMatrix(this Matrix3x2 value)

Parameters

value Matrix3x2

The Matrix3x2 instance to convert.

Returns

Matrix

An instance of Matrix with field values mapped from value. The last row is set to represent a homogeneous coordinate system.

AsEngineMatrix(Matrix4x4)

Converts a specified instance of Matrix4x4 to an instance of Matrix.

public static Matrix AsEngineMatrix(this Matrix4x4 value)

Parameters

value Matrix4x4

The Matrix4x4 instance to convert.

Returns

Matrix

An instance of Matrix with field values mapped from value.

AsEnginePoint(Point)

Converts a specified instance of Point to an instance of Point.

public static Point AsEnginePoint(this Point value)

Parameters

value Point

The Point instance to convert.

Returns

Point

An instance of Point with field values mapped from value.

AsEngineRectangle(Rectangle)

Converts a specified instance of Rectangle to an instance of Rectangle.

public static Rectangle AsEngineRectangle(this Rectangle value)

Parameters

value Rectangle

The Rectangle instance to convert.

Returns

Rectangle

An instance of Rectangle with field values mapped from value.

AsEngineVector(Point)

Converts a specified instance of Point to an instance of Vector2.

public static Vector2 AsEngineVector(this Point value)

Parameters

value Point

The Point instance to convert.

Returns

Vector2

An instance of Vector2 with field values mapped from value.

AsEngineVector(Vector2)

Converts a specified instance of Vector2 to an instance of Vector2.

public static Vector2 AsEngineVector(this Vector2 value)

Parameters

value Vector2

The Vector2 instance to convert.

Returns

Vector2

An instance of Vector2 with field values mapped from value.

AsEngineVector(Vector3)

Converts a specified instance of Vector3 to an instance of Vector3.

public static Vector3 AsEngineVector(this Vector3 value)

Parameters

value Vector3

The Vector3 instance to convert.

Returns

Vector3

An instance of Vector3 with field values mapped from value.

AsEngineVector(Vector4)

Converts a specified instance of Vector4 to an instance of Vector4.

public static Vector4 AsEngineVector(this Vector4 value)

Parameters

value Vector4

The Vector4 instance to convert.

Returns

Vector4

An instance of Vector4 with field values mapped from value.

AsSystemColor(Color)

Converts a specified instance of Color to an instance of Color.

public static Color AsSystemColor(this Color value)

Parameters

value Color

The Color instance to convert.

Returns

Color

An instance of Color created from the ARGB values of value.

AsSystemMatrix3x2(Matrix)

Converts a specified instance of Matrix to an instance of Matrix3x2.

public static Matrix3x2 AsSystemMatrix3x2(this Matrix value)

Parameters

value Matrix

The Matrix instance to convert.

Returns

Matrix3x2

An instance of Matrix3x2 with field values mapped from value.

AsSystemMatrix4x4(Matrix)

Converts a specified instance of Matrix to an instance of Matrix4x4.

public static Matrix4x4 AsSystemMatrix4x4(this Matrix value)

Parameters

value Matrix

The Matrix instance to convert.

Returns

Matrix4x4

An instance of Matrix4x4 with field values mapped from value.

AsSystemPoint(Point)

Converts a specified instance of Point to an instance of Point.

public static Point AsSystemPoint(this Point value)

Parameters

value Point

The Point instance to convert.

Returns

Point

An instance of Point with field values mapped from value.

AsSystemPoint(Vector2)

Converts a specified instance of Vector2 to an instance of Point.

public static Point AsSystemPoint(this Vector2 value)

Parameters

value Vector2

The Vector2 instance to convert.

Returns

Point

An instance of Point with field values mapped from value, with the X and Y values cast to integers.

AsSystemRectangle(Rectangle)

Converts a specified instance of Rectangle to an instance of Rectangle.

public static Rectangle AsSystemRectangle(this Rectangle value)

Parameters

value Rectangle

The Rectangle instance to convert.

Returns

Rectangle

An instance of Rectangle with field values mapped from value.

AsSystemVector(Vector2)

Converts a specified instance of Vector2 to an instance of Vector2.

public static Vector2 AsSystemVector(this Vector2 value)

Parameters

value Vector2

The Vector2 instance to convert.

Returns

Vector2

An instance of Vector2 with field values mapped from value.

AsSystemVector(Vector3)

Converts a specified instance of Vector3 to an instance of Vector3.

public static Vector3 AsSystemVector(this Vector3 value)

Parameters

value Vector3

The Vector3 instance to convert.

Returns

Vector3

An instance of Vector3 with field values mapped from value.

AsSystemVector(Vector4)

Converts a specified instance of Vector4 to an instance of Vector4.

public static Vector4 AsSystemVector(this Vector4 value)

Parameters

value Vector4

The Vector4 instance to convert.

Returns

Vector4

An instance of Vector4 with field values mapped from value.