Vector3 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 3D vector using three single-precision floating-point numbers.
[System.Serializable]
public struct Vector3 : IEquatable<OpenTK.Vector3>
type Vector3 = struct
- Inheritance
-
Vector3
- Attributes
- Implements
Remarks
The Vector3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats.
Constructors
Vector3(Single, Single, Single) |
Constructs a new Vector3. |
Vector3(Single) | |
Vector3(Vector2) |
Constructs a new Vector3 from the given Vector2. |
Vector3(Vector3) |
Constructs a new Vector3 from the given Vector3. |
Vector3(Vector4) |
Constructs a new Vector3 from the given Vector4. |
Fields
One |
Defines an instance with all components set to 1. |
SizeInBytes |
Defines the size of the Vector3 struct in bytes. |
UnitX |
Defines a unit-length Vector3 that points towards the X-axis. |
UnitY |
Defines a unit-length Vector3 that points towards the Y-axis. |
UnitZ |
/// Defines a unit-length Vector3 that points towards the Z-axis. |
X |
The X component of the Vector3. |
Y |
The Y component of the Vector3. |
Z |
The Z component of the Vector3. |
Zero |
Defines a zero-length Vector3. |
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. |