Vector4 Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a 4D vector using four single-precision floating-point numbers.
[System.Serializable]
public struct Vector4 : IEquatable<OpenTK.Vector4>
type Vector4 = struct
- Inheritance
-
Vector4
- Attributes
- Implements
Remarks
The Vector4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats.
Constructors
Vector4(Single, Single, Single, Single) |
Constructs a new Vector4. |
Vector4(Single) | |
Vector4(Vector2) |
Constructs a new Vector4 from the given Vector2. |
Vector4(Vector3, Single) | |
Vector4(Vector3) |
Constructs a new Vector4 from the given Vector3. |
Vector4(Vector4) |
Constructs a new Vector4 from the given Vector4. |
Fields
One |
Defines an instance with all components set to 1. |
SizeInBytes |
Defines the size of the Vector4 struct in bytes. |
UnitW |
Defines a unit-length Vector4 that points towards the W-axis. |
UnitX |
Defines a unit-length Vector4 that points towards the X-axis. |
UnitY |
Defines a unit-length Vector4 that points towards the Y-axis. |
UnitZ |
Defines a unit-length Vector4 that points towards the Z-axis. |
W |
The Z component of the Vector4. |
X |
The X component of the Vector4. |
Y |
The Y component of the Vector4. |
Z |
The Z component of the Vector4. |
Zero |
Defines a zero-length Vector4. |
Properties
Length |
Gets the length (magnitude) of the vector. |
LengthFast |
Gets an approximation of the vector length (magnitude). |
LengthSquared |
Gets the square of the vector length (magnitude). |
Xy |
Gets or sets an OpenTK.Vector2 with the X and Y components of this instance. |
Xyz |
Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance. |