NullableVector4 Class

Summary

A Vector4 which uses nullable floats.
Assembly
InspectorGadgets.dll
Namespace
InspectorGadgets
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["NullableVector4"] class Type type-node

Syntax

public sealed class NullableVector4

Constructors

Name Summary
NullableVector4() Creates a new InspectorGadgets.NullableVector4 with all components null.
NullableVector4(Nullable<float>, Nullable<float>, Nullable<float>, Nullable<float>) Creates a new InspectorGadgets.NullableVector4 with the specified components.
NullableVector4(Nullable<float>[]) Creates a new InspectorGadgets.NullableVector4 using the first 4 elements of the specified array as its components.
NullableVector4(NullableVector4) Creates a new InspectorGadgets.NullableVector4 with each of its components set the same as the specified `value`.
NullableVector4(Vector2) Creates a new InspectorGadgets.NullableVector4 with each of its components set the same as the specified `value`.
NullableVector4(Vector3) Creates a new InspectorGadgets.NullableVector4 with each of its components set the same as the specified `value`.
NullableVector4(Vector4) Creates a new InspectorGadgets.NullableVector4 with each of its components set the same as the specified `value`.

Fields

Name Constant Value Summary
w
The W component of this vector.
x
The X component of this vector.
y
The Y component of this vector.
z
The Z component of this vector.

Properties

Name Value Summary
this[int] Nullable<float>
Gets or sets the component of this vector at the specified index: 0 = x, 1 = y, 2 = z, 3 = w.

Methods

Name Value Summary
AllNull() bool
Returns true if all of the components of this vector are null.
AllNull(int) bool
Returns true if all of the components of this vector are null, ignoring components after `componentCount`.
AnyNull() bool
Returns true if any of the components of this vector are null.
AnyNull(int) bool
Returns true if any of the components of this vector are null, ignoring components after `componentCount`.
CopyFrom(NullableVector4) void
Sets each of the components of this vector to be the same as the specified `value`.
CopyFrom(Vector2) void
Sets each of the components of this vector to be the same as the specified `value`.
CopyFrom(Vector3) void
Sets each of the components of this vector to be the same as the specified `value`.
CopyFrom(Vector4) void
Sets each of the components of this vector to be the same as the specified `value`.
Equals(NullableVector4, int) bool
Returns true if all of the components of `this` and `other` are equal, ignoring components after `componentCount`.
Equals(Object) bool
Returns true if all of the components of `a` and `b` are equal.
GetHashCode() int
Uses the base method.
SetAllNull() void
Sets all components of this vector to null.
ToString() string
Returns a nicely formatted string for this vector using '-' to denote nulls.
ToString(int) string
Returns a nicely formatted string for this vector using '-' to denote nulls.
ToVector2() Vector2
Returns a new Vector2 using components of this vector. Any components which are null will be set to 0.
ToVector3() Vector3
Returns a new Vector3 using components of this vector. Any components which are null will be set to 0.
ToVector3(Vector2) Vector2
Returns a new Vector3 using components of this vector. Any components which are null will instead use the corresponding component of the specified `fallback`.
ToVector3(Vector3) Vector3
Returns a new Vector3 using components of this vector. Any components which are null will instead use the corresponding component of the specified `fallback`.
ToVector4() Vector4
Returns a new Vector3 using components of this vector. Any components which are null will be set to 0.
ToVector4(Vector4) Vector4
Returns a new Vector4 using components of this vector. Any components which are null will instead use the corresponding component of the specified `fallback`.
TryParse(string, int, NullableVector4) int
Attempts to parse a series of floats from the given string and returns the index of the last successfully parsed value.
static
ZeroAllNulls() void
Sets all components of this vector which are null to 0.

Operators

Name Value Summary
implicit operator NullableVector4(Vector2) NullableVector4
implicit operator NullableVector4(Vector3) NullableVector4
implicit operator NullableVector4(Vector4) NullableVector4
operator !=(NullableVector4, NullableVector4) bool
operator ==(NullableVector4, NullableVector4) bool