Table of Contents

Struct Float3

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

A 3-component vector of 32-bit floats.

public struct Float3
Inherited Members

Constructors

Float3(F32)

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

public Float3(F32 value)

Parameters

value F32

Float3(F32, F32, F32)

Initializes a new instance of the Float3 struct.

public Float3(F32 x, F32 y, F32 z)

Parameters

x F32
y F32
z F32

Fields

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 Float3 One { get; }

Property Value

Float3

XY

Gets the XY swizzle (X, Y).

public readonly Float2 XY { get; }

Property Value

Float2

XYZ

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

public readonly Float3 XYZ { get; }

Property Value

Float3

XZ

Gets the XZ swizzle (X, Z).

public readonly Float2 XZ { get; }

Property Value

Float2

XZY

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

public readonly Float3 XZY { get; }

Property Value

Float3

YX

Gets the YX swizzle (Y, X).

public readonly Float2 YX { get; }

Property Value

Float2

YXZ

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

public readonly Float3 YXZ { get; }

Property Value

Float3

YZ

Gets the YZ swizzle (Y, Z).

public readonly Float2 YZ { get; }

Property Value

Float2

YZX

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

public readonly Float3 YZX { get; }

Property Value

Float3

ZX

Gets the ZX swizzle (Z, X).

public readonly Float2 ZX { get; }

Property Value

Float2

ZXY

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

public readonly Float3 ZXY { get; }

Property Value

Float3

ZY

Gets the ZY swizzle (Z, Y).

public readonly Float2 ZY { get; }

Property Value

Float2

ZYX

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

public readonly Float3 ZYX { get; }

Property Value

Float3

Zero

Gets the zero vector.

public static Float3 Zero { get; }

Property Value

Float3

Methods

Cross(Float3, Float3)

Computes the cross product of two vectors.

public static Float3 Cross(Float3 a, Float3 b)

Parameters

a Float3
b Float3

Returns

Float3

Normalize(Float3)

Normalizes the vector to unit length.

public static Float3 Normalize(Float3 v)

Parameters

v Float3

Returns

Float3

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator +(Float3, Float3)

Adds two vectors.

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

Parameters

left Float3
right Float3

Returns

Float3

operator /(Float3, F32)

Divides a vector by a scalar.

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

Parameters

left Float3
right F32

Returns

Float3

operator /(Float3, Float3)

Divides two vectors component-wise.

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

Parameters

left Float3
right Float3

Returns

Float3

operator *(F32, Float3)

Multiplies a scalar by a vector.

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

Parameters

left F32
right Float3

Returns

Float3

operator *(Float3, F32)

Multiplies a vector by a scalar.

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

Parameters

left Float3
right F32

Returns

Float3

operator *(Float3, Float3)

Multiplies two vectors component-wise.

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

Parameters

left Float3
right Float3

Returns

Float3

operator -(Float3, Float3)

Subtracts two vectors.

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

Parameters

left Float3
right Float3

Returns

Float3

operator -(Float3)

Negates a vector.

public static Float3 operator -(Float3 value)

Parameters

value Float3

Returns

Float3