Struct Vector4b
Represents a 2D boolean vector.
Implements
Inherited Members
Namespace: OpenTK.Mathematics
Assembly: OpenTK.Mathematics.dll
Syntax
[Serializable]
public struct Vector4b : IEquatable<Vector4b>
Remarks
As bools in C# are not blittable this type is not necessarily suitable for interoperation with unmanaged code.
Constructors
Vector4b(Vector2b, bool, bool)
Initializes a new instance of the Vector4b struct.
Declaration
public Vector4b(Vector2b xy, bool z = false, bool w = false)
Parameters
Type | Name | Description |
---|---|---|
Vector2b | xy | The x and y components of the Vector4b. |
bool | z | The z component of the Vector4b. |
bool | w | The w component of the Vector4b. |
Vector4b(Vector3b, bool)
Initializes a new instance of the Vector4b struct.
Declaration
public Vector4b(Vector3b xyz, bool w = false)
Parameters
Type | Name | Description |
---|---|---|
Vector3b | xyz | The x, y, and z components of the Vector4b. |
bool | w | The w component of the Vector4b. |
Vector4b(Vector4b)
Initializes a new instance of the Vector4b struct.
Declaration
public Vector4b(Vector4b xyzw)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | xyzw | The x, y, z, and w components of the Vector4b. |
Vector4b(bool)
Initializes a new instance of the Vector4b struct.
Declaration
public Vector4b(bool value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | The value that will initialize this instance. |
Vector4b(bool, bool, bool, bool)
Initializes a new instance of the Vector4b struct.
Declaration
public Vector4b(bool x, bool y, bool z, bool w)
Parameters
Type | Name | Description |
---|---|---|
bool | x | The x component of the Vector4b. |
bool | y | The y component of the Vector4b. |
bool | z | The z component of the Vector4b. |
bool | w | The w component of the Vector4b. |
Fields
False
Defines an instance with all components set to false.
Declaration
public static readonly Vector4b False
Field Value
Type | Description |
---|---|
Vector4b |
True
Defines an instance with all components set to true.
Declaration
public static readonly Vector4b True
Field Value
Type | Description |
---|---|
Vector4b |
UnitW
Defines an instance with only the _W components set to true.
Declaration
public static readonly Vector4b UnitW
Field Value
Type | Description |
---|---|
Vector4b |
UnitX
Defines an instance with only the X components set to true.
Declaration
public static readonly Vector4b UnitX
Field Value
Type | Description |
---|---|
Vector4b |
UnitY
Defines an instance with only the Y components set to true.
Declaration
public static readonly Vector4b UnitY
Field Value
Type | Description |
---|---|
Vector4b |
UnitZ
Defines an instance with only the Z components set to true.
Declaration
public static readonly Vector4b UnitZ
Field Value
Type | Description |
---|---|
Vector4b |
W
The W component of the vector.
Declaration
public bool W
Field Value
Type | Description |
---|---|
bool |
X
The X component of the vector.
Declaration
public bool X
Field Value
Type | Description |
---|---|
bool |
Y
The Y component of the vector.
Declaration
public bool Y
Field Value
Type | Description |
---|---|
bool |
Z
The Z component of the vector.
Declaration
public bool Z
Field Value
Type | Description |
---|---|
bool |
Properties
this[int]
Gets or sets the value at the index of the vector.
Declaration
public bool this[int index] { readonly get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the component from the vector. |
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if the index is less than 0 or greater than 3. |
Wx
Gets or sets an OpenTK.Vector2b with the W and X components of this instance.
Declaration
public Vector2b Wx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Wxy
Gets or sets an OpenTK.Vector3b with the W, X, and Y components of this instance.
Declaration
public Vector3b Wxy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wxyz
Gets or sets an OpenTK.Vector4b with the W, X, Y, and Z components of this instance.
Declaration
public Vector4b Wxyz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wxz
Gets or sets an OpenTK.Vector3b with the W, X, and Z components of this instance.
Declaration
public Vector3b Wxz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wxzy
Gets or sets an OpenTK.Vector4b with the W, X, Z, and Y components of this instance.
Declaration
public Vector4b Wxzy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wy
Gets or sets an OpenTK.Vector2b with the W and Y components of this instance.
Declaration
public Vector2b Wy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Wyx
Gets or sets an OpenTK.Vector3b with the W, Y, and X components of this instance.
Declaration
public Vector3b Wyx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wyxz
Gets or sets an OpenTK.Vector4b with the W, Y, X, and Z components of this instance.
Declaration
public Vector4b Wyxz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wyz
Gets or sets an OpenTK.Vector3b with the W, Y, and Z components of this instance.
Declaration
public Vector3b Wyz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wyzx
Gets or sets an OpenTK.Vector4b with the W, Y, Z, and X components of this instance.
Declaration
public Vector4b Wyzx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wz
Gets or sets an OpenTK.Vector2b with the W and Z components of this instance.
Declaration
public Vector2b Wz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Wzx
Gets or sets an OpenTK.Vector3b with the W, Z, and X components of this instance.
Declaration
public Vector3b Wzx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wzxy
Gets or sets an OpenTK.Vector4b with the W, Z, X, and Y components of this instance.
Declaration
public Vector4b Wzxy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wzy
Gets or sets an OpenTK.Vector3b with the W, Z, and Y components of this instance.
Declaration
public Vector3b Wzy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Wzyw
Gets or sets an OpenTK.Vector4b with the W, Z, Y, and W components of this instance.
Declaration
public Vector4b Wzyw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Wzyx
Gets or sets an OpenTK.Vector4b with the W, Z, Y, and X components of this instance.
Declaration
public Vector4b Wzyx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Xw
Gets or sets an OpenTK.Vector2b with the X and W components of this instance.
Declaration
public Vector2b Xw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Xwy
Gets or sets an OpenTK.Vector3b with the X, W, and Y components of this instance.
Declaration
public Vector3b Xwy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xwyz
Gets or sets an OpenTK.Vector4b with the X, W, Y, and Z components of this instance.
Declaration
public Vector4b Xwyz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Xwz
Gets or sets an OpenTK.Vector3b with the X, W, and Z components of this instance.
Declaration
public Vector3b Xwz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xwzy
Gets or sets an OpenTK.Vector4b with the X, W, Z, and Y components of this instance.
Declaration
public Vector4b Xwzy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Xy
Gets or sets an OpenTK.Vector2b with the X and Y components of this instance.
Declaration
public Vector2b Xy { get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Xyw
Gets or sets an OpenTK.Vector3b with the X, Y, and Z components of this instance.
Declaration
public Vector3b Xyw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xywz
Gets or sets an OpenTK.Vector4b with the X, Y, W, and Z components of this instance.
Declaration
public Vector4b Xywz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Xyz
Gets or sets an OpenTK.Vector3b with the X, Y, and Z components of this instance.
Declaration
public Vector3b Xyz { get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xz
Gets or sets an OpenTK.Vector2b with the X and Z components of this instance.
Declaration
public Vector2b Xz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Xzw
Gets or sets an OpenTK.Vector3b with the X, Z, and W components of this instance.
Declaration
public Vector3b Xzw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xzwy
Gets or sets an OpenTK.Vector4b with the X, Z, W, and Y components of this instance.
Declaration
public Vector4b Xzwy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Xzy
Gets or sets an OpenTK.Vector3b with the X, Z, and Y components of this instance.
Declaration
public Vector3b Xzy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Xzyw
Gets or sets an OpenTK.Vector4b with the X, Z, Y, and W components of this instance.
Declaration
public Vector4b Xzyw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yw
Gets or sets an OpenTK.Vector2b with the Y and W components of this instance.
Declaration
public Vector2b Yw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Ywx
Gets or sets an OpenTK.Vector3b with the Y, W, and X components of this instance.
Declaration
public Vector3b Ywx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Ywxz
Gets or sets an OpenTK.Vector4b with the Y, W, X, and Z components of this instance.
Declaration
public Vector4b Ywxz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Ywz
Gets or sets an OpenTK.Vector3b with the Y, W, and Z components of this instance.
Declaration
public Vector3b Ywz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Ywzx
Gets or sets an OpenTK.Vector4b with the Y, W, Z, and X components of this instance.
Declaration
public Vector4b Ywzx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yx
Gets or sets an OpenTK.Vector2b with the Y and X components of this instance.
Declaration
public Vector2b Yx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Yxw
Gets or sets an OpenTK.Vector3b with the Y, X, and W components of this instance.
Declaration
public Vector3b Yxw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Yxwz
Gets or sets an OpenTK.Vector4b with the Y, X, W, and Z components of this instance.
Declaration
public Vector4b Yxwz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yxz
Gets or sets an OpenTK.Vector3b with the Y, X, and Z components of this instance.
Declaration
public Vector3b Yxz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Yxzw
Gets or sets an OpenTK.Vector4b with the Y, X, Z, and W components of this instance.
Declaration
public Vector4b Yxzw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yywz
Gets or sets an OpenTK.Vector4b with the Y, Y, W, and Z components of this instance.
Declaration
public Vector4b Yywz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yyzw
Gets or sets an OpenTK.Vector4b with the Y, Y, Z, and W components of this instance.
Declaration
public Vector4b Yyzw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yz
Gets or sets an OpenTK.Vector2b with the Y and Z components of this instance.
Declaration
public Vector2b Yz { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Yzw
Gets or sets an OpenTK.Vector3b with the Y, Z, and W components of this instance.
Declaration
public Vector3b Yzw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Yzwx
Gets or sets an OpenTK.Vector4b with the Y, Z, W, and X components of this instance.
Declaration
public Vector4b Yzwx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Yzx
Gets or sets an OpenTK.Vector3b with the Y, Z, and X components of this instance.
Declaration
public Vector3b Yzx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Yzxw
Gets or sets an OpenTK.Vector4b with the Y, Z, X, and W components of this instance.
Declaration
public Vector4b Yzxw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zw
Gets or sets an OpenTK.Vector2b with the Z and W components of this instance.
Declaration
public Vector2b Zw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Zwx
Gets or sets an OpenTK.Vector3b with the Z, W, and X components of this instance.
Declaration
public Vector3b Zwx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zwxy
Gets or sets an OpenTK.Vector4b with the Z, W, X, and Y components of this instance.
Declaration
public Vector4b Zwxy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zwy
Gets or sets an OpenTK.Vector3b with the Z, W, and Y components of this instance.
Declaration
public Vector3b Zwy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zwyx
Gets or sets an OpenTK.Vector4b with the Z, W, Y, and X components of this instance.
Declaration
public Vector4b Zwyx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zwzy
Gets or sets an OpenTK.Vector4b with the Z, W, Z, and Y components of this instance.
Declaration
public Vector4b Zwzy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zx
Gets or sets an OpenTK.Vector2b with the Z and X components of this instance.
Declaration
public Vector2b Zx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Zxw
Gets or sets an OpenTK.Vector3b with the Z, X, and W components of this instance.
Declaration
public Vector3b Zxw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zxwy
Gets or sets an OpenTK.Vector4b with the Z, X, W, and Y components of this instance.
Declaration
public Vector4b Zxwy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zxy
Gets or sets an OpenTK.Vector3b with the Z, X, and Y components of this instance.
Declaration
public Vector3b Zxy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zxyw
Gets or sets an OpenTK.Vector4b with the Z, X, Y, and Z components of this instance.
Declaration
public Vector4b Zxyw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zy
Gets or sets an OpenTK.Vector2b with the Z and Y components of this instance.
Declaration
public Vector2b Zy { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector2b |
Zyw
Gets or sets an OpenTK.Vector3b with the Z, Y, and W components of this instance.
Declaration
public Vector3b Zyw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zywx
Gets or sets an OpenTK.Vector4b with the Z, Y, W, and X components of this instance.
Declaration
public Vector4b Zywx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Zyx
Gets or sets an OpenTK.Vector3b with the Z, Y, and X components of this instance.
Declaration
public Vector3b Zyx { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector3b |
Zyxw
Gets or sets an OpenTK.Vector4b with the Z, Y, X, and W components of this instance.
Declaration
public Vector4b Zyxw { readonly get; set; }
Property Value
Type | Description |
---|---|
Vector4b |
Methods
All()
Declaration
public readonly bool All()
Returns
Type | Description |
---|---|
bool | If all of the components of the vector were true. |
All(Vector4b)
Declaration
public static bool All(Vector4b vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | vector | The vector to check if all components are true. |
Returns
Type | Description |
---|---|
bool | If all of the components of the vector were true. |
And(Vector4b, Vector4b)
Returns the component-wise logical and of two vectors.
Declaration
public static Vector4b And(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | The first vector to and. |
Vector4b | right | The second vector to and. |
Returns
Type | Description |
---|---|
Vector4b | A vector were each component is the logical and of the input vector components. |
Any()
Declaration
public readonly bool Any()
Returns
Type | Description |
---|---|
bool | If any of the components of the vector were true. |
Any(Vector4b)
Declaration
public static bool Any(Vector4b vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | vector | The vector to check if any components are true. |
Returns
Type | Description |
---|---|
bool | If any of the components of the vector were true. |
Deconstruct(out bool, out bool, out bool, out bool)
Deconstructs the vector into it's individual components.
Declaration
[Pure]
public readonly void Deconstruct(out bool x, out bool y, out bool z, out bool w)
Parameters
Type | Name | Description |
---|---|---|
bool | x | The X component of the vector. |
bool | y | The Y component of the vector. |
bool | z | The Z component of the vector. |
bool | w | The W component of the vector. |
Equals(Vector4b)
Indicates whether the current object is equal to another object of the same type.
Declaration
public readonly bool Equals(Vector4b other)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override readonly bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Not()
Returns the logical negation of this vector.
Declaration
public readonly Vector4b Not()
Returns
Type | Description |
---|---|
Vector4b | A vector with each component negated. |
Not(Vector4b)
Returns the logical negation of a vector.
Declaration
public static Vector4b Not(Vector4b vec)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | vec | The vector to logically negate. |
Returns
Type | Description |
---|---|
Vector4b | A vector with each component negated. |
Or(Vector4b, Vector4b)
Returns the component-wise logical or of two vectors.
Declaration
public static Vector4b Or(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | The first vector to or. |
Vector4b | right | The second vector to or. |
Returns
Type | Description |
---|---|
Vector4b | A vector were each component is the logical or of the input vector components. |
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
ToString(IFormatProvider)
Formats the value of the current instance using the specified format.
Declaration
public readonly string ToString(IFormatProvider formatProvider)
Parameters
Type | Name | Description |
---|---|---|
IFormatProvider | formatProvider | The provider to use to format the value. -or- A null reference ( |
Returns
Type | Description |
---|---|
string | The value of the current instance in the specified format. |
Xor(Vector4b, Vector4b)
Returns the component-wise logical xor of two vectors.
Declaration
public static Vector4b Xor(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | The first vector to xor. |
Vector4b | right | The second vector to xor. |
Returns
Type | Description |
---|---|
Vector4b | A vector were each component is the logical xor of the input vector components. |
Operators
operator &(Vector4b, Vector4b)
ANDs the specified instances.
Declaration
public static Vector4b operator &(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | Left operand. |
Vector4b | right | Right operand. |
Returns
Type | Description |
---|---|
Vector4b | Result of the logical AND operation. |
operator |(Vector4b, Vector4b)
ORs the specified instances.
Declaration
public static Vector4b operator |(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | Left operand. |
Vector4b | right | Right operand. |
Returns
Type | Description |
---|---|
Vector4b | Result of the logical OR operation. |
operator ==(Vector4b, Vector4b)
Compares the specified instances for equality.
Declaration
public static bool operator ==(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | Left operand. |
Vector4b | right | Right operand. |
Returns
Type | Description |
---|---|
bool | True if both instances are equal; false otherwise. |
operator ^(Vector4b, Vector4b)
XORs the specified instances.
Declaration
public static Vector4b operator ^(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | Left operand. |
Vector4b | right | Right operand. |
Returns
Type | Description |
---|---|
Vector4b | Result of the logical XOR operation. |
implicit operator Vector4b((bool X, bool Y, bool Z, bool W))
Initializes a new instance of the Vector4b struct using a tuple containing the component values.
Declaration
[Pure]
public static implicit operator Vector4b((bool X, bool Y, bool Z, bool W) values)
Parameters
Type | Name | Description |
---|---|---|
(bool X, bool Y, bool Z, bool W) | values | A tuple containing the component values. |
Returns
Type | Description |
---|---|
Vector4b | A new instance of the Vector4b struct with the given component values. |
operator !=(Vector4b, Vector4b)
Compares the specified instances for inequality.
Declaration
public static bool operator !=(Vector4b left, Vector4b right)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | left | Left operand. |
Vector4b | right | Right operand. |
Returns
Type | Description |
---|---|
bool | True if both instances are not equal; false otherwise. |
operator !(Vector4b)
Negates the specified instance.
Declaration
public static Vector4b operator !(Vector4b vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4b | vector | Operand. |
Returns
Type | Description |
---|---|
Vector4b | Result of negation. |