Table of Contents

Struct Bgra5551

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

Packed vector type containing unsigned normalized values ranging from 0 to 1. The x , y and z components use 5 bits, and the w component uses 1 bit.

public struct Bgra5551 : IPackedVector<ushort>, IEquatable<Bgra5551>, IPackedVector
Implements
Inherited Members

Constructors

Bgra5551(Vector4)

Initializes a new instance of this structure.

public Bgra5551(Vector4 vector)

Parameters

vector Vector4

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

Bgra5551(float, float, float, float)

Initializes a new instance of this structure.

public Bgra5551(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 ushort PackedValue { get; set; }

Property Value

ushort

Methods

Equals(Bgra5551)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Bgra5551 other)

Parameters

other Bgra5551

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToVector4()

Expands the packed representation into a Vector4.

public Vector4 ToVector4()

Returns

Vector4

The expanded Vector4.

Operators

operator ==(Bgra5551, Bgra5551)

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

public static bool operator ==(Bgra5551 lhs, Bgra5551 rhs)

Parameters

lhs Bgra5551

The value on the left of the equality operator.

rhs Bgra5551

The value on the right of the equality operator.

Returns

bool

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

operator !=(Bgra5551, Bgra5551)

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

public static bool operator !=(Bgra5551 lhs, Bgra5551 rhs)

Parameters

lhs Bgra5551

The value on the left of the inequality operator.

rhs Bgra5551

The value on the right of the inequality operator.

Returns

bool

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