Show / Hide Table of Contents

Struct Vector3b

Represents a 2D boolean vector.

Implements
IEquatable<Vector3b>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: OpenTK.Mathematics
Assembly: OpenTK.Mathematics.dll
Syntax
[Serializable]
public struct Vector3b : IEquatable<Vector3b>
Remarks

As bools in C# are not blittable this type is not necessarily suitable for interoperation with unmanaged code.

Constructors

Vector3b(Vector2b, bool)

Initializes a new instance of the Vector3b struct.

Declaration
public Vector3b(Vector2b xy, bool z = false)
Parameters
Type Name Description
Vector2b xy

The x and y components of the Vector3b.

bool z

The z component of the Vector3b.

Vector3b(Vector3b)

Initializes a new instance of the Vector3b struct.

Declaration
public Vector3b(Vector3b xyz)
Parameters
Type Name Description
Vector3b xyz

The x, y, and z components of the Vector3b.

Vector3b(Vector4b)

Initializes a new instance of the Vector3b struct.

Declaration
public Vector3b(Vector4b xyz)
Parameters
Type Name Description
Vector4b xyz

The x, y, and z components of the Vector3b.

Vector3b(bool)

Initializes a new instance of the Vector3b struct.

Declaration
public Vector3b(bool value)
Parameters
Type Name Description
bool value

The value that will initialize this instance.

Vector3b(bool, bool, bool)

Initializes a new instance of the Vector3b struct.

Declaration
public Vector3b(bool x, bool y, bool z)
Parameters
Type Name Description
bool x

The x component of the Vector3b.

bool y

The y component of the Vector3b.

bool z

The z component of the Vector3b.

Fields

False

Defines an instance with all components set to false.

Declaration
public static readonly Vector3b False
Field Value
Type Description
Vector3b

True

Defines an instance with all components set to true.

Declaration
public static readonly Vector3b True
Field Value
Type Description
Vector3b

UnitX

Defines an instance with only the X components set to true.

Declaration
public static readonly Vector3b UnitX
Field Value
Type Description
Vector3b

UnitY

Defines an instance with only the Y components set to true.

Declaration
public static readonly Vector3b UnitY
Field Value
Type Description
Vector3b

UnitZ

Defines an instance with only the Z components set to true.

Declaration
public static readonly Vector3b UnitZ
Field Value
Type Description
Vector3b

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 2.

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

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

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

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

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

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

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

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

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

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

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

Methods

All()

Returns true if all components of the vector are true, false otherwise.

Declaration
public readonly bool All()
Returns
Type Description
bool

If all of the components of the vector were true.

All(Vector3b)

Returns true if all components of the vector are true, false otherwise.

Declaration
public static bool All(Vector3b vector)
Parameters
Type Name Description
Vector3b 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(Vector3b, Vector3b)

Returns the component-wise logical and of two vectors.

Declaration
public static Vector3b And(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

The first vector to and.

Vector3b right

The second vector to and.

Returns
Type Description
Vector3b

A vector were each component is the logical and of the input vector components.

Any()

Returns true if any component of the vector is true, false otherwise.

Declaration
public readonly bool Any()
Returns
Type Description
bool

If any of the components of the vector were true.

Any(Vector3b)

Returns true if any components of the vector are true, false otherwise.

Declaration
public static bool Any(Vector3b vector)
Parameters
Type Name Description
Vector3b 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)

Deconstructs the vector into it's individual components.

Declaration
[Pure]
public readonly void Deconstruct(out bool x, out bool y, out bool z)
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.

Equals(Vector3b)

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

Declaration
public readonly bool Equals(Vector3b other)
Parameters
Type Name Description
Vector3b other

An object to compare with this object.

Returns
Type Description
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.

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)

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
ValueType.GetHashCode()

Not()

Returns the logical negation of this vector.

Declaration
public readonly Vector3b Not()
Returns
Type Description
Vector3b

A vector with each component negated.

Not(Vector3b)

Returns the logical negation of a vector.

Declaration
public static Vector3b Not(Vector3b vec)
Parameters
Type Name Description
Vector3b vec

The vector to logically negate.

Returns
Type Description
Vector3b

A vector with each component negated.

Or(Vector3b, Vector3b)

Returns the component-wise logical or of two vectors.

Declaration
public static Vector3b Or(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

The first vector to or.

Vector3b right

The second vector to or.

Returns
Type Description
Vector3b

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
ValueType.ToString()

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 (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns
Type Description
string

The value of the current instance in the specified format.

Xor(Vector3b, Vector3b)

Returns the component-wise logical xor of two vectors.

Declaration
public static Vector3b Xor(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

The first vector to xor.

Vector3b right

The second vector to xor.

Returns
Type Description
Vector3b

A vector were each component is the logical xor of the input vector components.

Operators

operator &(Vector3b, Vector3b)

ANDs the specified instances.

Declaration
public static Vector3b operator &(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

Left operand.

Vector3b right

Right operand.

Returns
Type Description
Vector3b

Result of the logical AND operation.

operator |(Vector3b, Vector3b)

ORs the specified instances.

Declaration
public static Vector3b operator |(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

Left operand.

Vector3b right

Right operand.

Returns
Type Description
Vector3b

Result of the logical OR operation.

operator ==(Vector3b, Vector3b)

Compares the specified instances for equality.

Declaration
public static bool operator ==(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

Left operand.

Vector3b right

Right operand.

Returns
Type Description
bool

True if both instances are equal; false otherwise.

operator ^(Vector3b, Vector3b)

XORs the specified instances.

Declaration
public static Vector3b operator ^(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

Left operand.

Vector3b right

Right operand.

Returns
Type Description
Vector3b

Result of the logical XOR operation.

implicit operator Vector3b((bool X, bool Y, bool Z))

Initializes a new instance of the Vector3b struct using a tuple containing the component values.

Declaration
[Pure]
public static implicit operator Vector3b((bool X, bool Y, bool Z) values)
Parameters
Type Name Description
(bool X, bool Y, bool Z) values

A tuple containing the component values.

Returns
Type Description
Vector3b

A new instance of the Vector3b struct with the given component values.

operator !=(Vector3b, Vector3b)

Compares the specified instances for inequality.

Declaration
public static bool operator !=(Vector3b left, Vector3b right)
Parameters
Type Name Description
Vector3b left

Left operand.

Vector3b right

Right operand.

Returns
Type Description
bool

True if both instances are not equal; false otherwise.

operator !(Vector3b)

Negates the specified instance.

Declaration
public static Vector3b operator !(Vector3b vector)
Parameters
Type Name Description
Vector3b vector

Operand.

Returns
Type Description
Vector3b

Result of negation.

Implements

IEquatable<T>
In this article
Back to top Generated by DocFX