Table of Contents

Struct Float4

Namespace
Xui.GPU.Shaders.Types
Assembly
Xui.Core.dll

A 4-component vector of 32-bit floats.

public struct Float4
Inherited Members

Constructors

Float4(F32)

Initializes a new instance with all components set to the same value.

public Float4(F32 value)

Parameters

value F32

Float4(F32, F32, F32, F32)

Initializes a new instance of the Float4 struct.

public Float4(F32 x, F32 y, F32 z, F32 w)

Parameters

x F32
y F32
z F32
w F32

Float4(Float2, F32, F32)

Initializes a new instance from a Float2 and z, w components.

public Float4(Float2 xy, F32 z, F32 w)

Parameters

xy Float2
z F32
w F32

Float4(Float3, F32)

Initializes a new instance from a Float3 and w component.

public Float4(Float3 xyz, F32 w)

Parameters

xyz Float3
w F32

Fields

W

The W component.

public F32 W

Field Value

F32

X

The X component.

public F32 X

Field Value

F32

Y

The Y component.

public F32 Y

Field Value

F32

Z

The Z component.

public F32 Z

Field Value

F32

Properties

One

Gets the one vector.

public static Float4 One { get; }

Property Value

Float4

RGB

Gets the RGB swizzle (X, Y, Z) - color alias for XYZ.

public readonly Float3 RGB { get; }

Property Value

Float3

RGBA

Gets the RGBA swizzle (X, Y, Z, W) - color alias for XYZW.

public readonly Float4 RGBA { get; }

Property Value

Float4

XW

Gets the XW swizzle (X, W).

public readonly Float2 XW { get; }

Property Value

Float2

XY

Gets the XY swizzle (X, Y).

public readonly Float2 XY { get; }

Property Value

Float2

XYW

Gets the XYW swizzle (X, Y, W).

public readonly Float3 XYW { get; }

Property Value

Float3

XYZ

Gets the XYZ swizzle (X, Y, Z).

public readonly Float3 XYZ { get; }

Property Value

Float3

XYZW

Gets the XYZW swizzle (X, Y, Z, W).

public readonly Float4 XYZW { get; }

Property Value

Float4

XZ

Gets the XZ swizzle (X, Z).

public readonly Float2 XZ { get; }

Property Value

Float2

XZW

Gets the XZW swizzle (X, Z, W).

public readonly Float3 XZW { get; }

Property Value

Float3

YW

Gets the YW swizzle (Y, W).

public readonly Float2 YW { get; }

Property Value

Float2

YZ

Gets the YZ swizzle (Y, Z).

public readonly Float2 YZ { get; }

Property Value

Float2

YZW

Gets the YZW swizzle (Y, Z, W).

public readonly Float3 YZW { get; }

Property Value

Float3

ZW

Gets the ZW swizzle (Z, W).

public readonly Float2 ZW { get; }

Property Value

Float2

Zero

Gets the zero vector.

public static Float4 Zero { get; }

Property Value

Float4

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator +(Float4, Float4)

Adds two vectors.

public static Float4 operator +(Float4 left, Float4 right)

Parameters

left Float4
right Float4

Returns

Float4

operator /(Float4, F32)

Divides a vector by a scalar.

public static Float4 operator /(Float4 left, F32 right)

Parameters

left Float4
right F32

Returns

Float4

operator /(Float4, Float4)

Divides two vectors component-wise.

public static Float4 operator /(Float4 left, Float4 right)

Parameters

left Float4
right Float4

Returns

Float4

operator *(F32, Float4)

Multiplies a scalar by a vector.

public static Float4 operator *(F32 left, Float4 right)

Parameters

left F32
right Float4

Returns

Float4

operator *(Float4, F32)

Multiplies a vector by a scalar.

public static Float4 operator *(Float4 left, F32 right)

Parameters

left Float4
right F32

Returns

Float4

operator *(Float4, Float4)

Multiplies two vectors component-wise.

public static Float4 operator *(Float4 left, Float4 right)

Parameters

left Float4
right Float4

Returns

Float4

operator -(Float4, Float4)

Subtracts two vectors.

public static Float4 operator -(Float4 left, Float4 right)

Parameters

left Float4
right Float4

Returns

Float4

operator -(Float4)

Negates a vector.

public static Float4 operator -(Float4 value)

Parameters

value Float4

Returns

Float4