Table of Contents

Struct Byte4

Namespace
Microsoft.Xna.Framework.Graphics.PackedVector
Assembly
MonoGame.Framework.dll

Packed vector type containing four 8-bit unsigned integer values, ranging from 0 to 255.

[TypeConverter(typeof(Byte4TypeConverter))]
public struct Byte4 : IPackedVector<uint>, IPackedVector, IEquatable<Byte4>
Implements
Inherited Members

Constructors

Byte4()

Initializes a new instance of this structure.

public Byte4()

Byte4(Vector4)

Initializes a new instance of this structure.

public Byte4(Vector4 vector)

Parameters

vector Vector4

A Vector4 value who's components contain the initial values for this structure.

Byte4(float, float, float, float)

Initializes a new instance of this structure.

public Byte4(float x, float y, float z, float w)

Parameters

x float

The initial x-component value for this structure.

y float

The initial y-component value for this structure.

z float

The initial z-component value for this structure.

w float

The initial 2-component value for this structure.

Properties

PackedValue

Directly gets or sets the packed representation of the value.

public uint PackedValue { get; set; }

Property Value

uint

Methods

Equals(Byte4)

public bool Equals(Byte4 other)

Parameters

other Byte4

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

ToVector4()

Expands the packed representation into a Vector4.

public Vector4 ToVector4()

Returns

Vector4

The expanded Vector4.

Operators

operator ==(Byte4, Byte4)

Returns a value that indicates whether the two values are equal.

public static bool operator ==(Byte4 a, Byte4 b)

Parameters

a Byte4

The value on the left of the equality operator.

b Byte4

The value on the right of the equality operator.

Returns

bool

true if the two values are equal; otherwise, false.

operator !=(Byte4, Byte4)

Returns a value that indicates whether the two value are not equal.

public static bool operator !=(Byte4 a, Byte4 b)

Parameters

a Byte4

The value on the left of the inequality operator.

b Byte4

The value on the right of the inequality operator.

Returns

bool

true if the two value are not equal; otherwise, false.