﻿Vector4D Structure

# Vector4D Structure

Represents 4D vectors and points.

Namespace:  LightBuzz
Assembly:  LightBuzz (in LightBuzz.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
```[SerializableAttribute]
public struct Vector4D```

The Vector4D type exposes the following members.

Constructors
NameDescription
Vector4D(Single, Single)
Constructs a new vector with given X and Y components.
Vector4D(Single, Single, Single)
Constructs a new vector with given X, Y, and Z components.
Vector4D(Single, Single, Single, Single)
Constructs a new vector with given X, Y, Z, and W components.
Top
Properties
NameDescription
Item
Access the X, Y, Z, W components of the vector using [0], [1], [2], [3] respectively.
Length
Returns the length of the current vector.
LengthSquared
Returns the squared length of the current vector.
Magnitude
Returns the length of the current vector.
MagnitudeSquared
Returns the squared length of the current vector.
Top
Methods
NameDescription
Angle
Returns the angle (in degrees) between two vectors.
Divide
Divides a vector by a number.
Dot
Returns the dot product of two vectors.
Equals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ValueTypeEquals(Object).)
Equals(Vector4D, Vector4D)
Specifies whether two vectors are approximately equal.
GetHashCode
Returns the hash code of the current object.
(Overrides ValueTypeGetHashCode.)
GetType (Inherited from Object.)
Lerp
Linearly interpolates between two vectors by t.
Multiply(Single, Vector4D)
Multiplies a vector by a number.
Multiply(Vector4D, Vector3D)
Multiplies the given rotation around the given point.
Multiply(Vector4D, Vector4D)
Multiplies a vector with another vector.
Multiply(Vector4D, Single)
Multiplies a vector by a number.
Negate
Negates every component of the specified vector.
Normalize
Makes the current vector have a magnitude of 1.
Normalize(Vector4D)
Makes the specified vector have a magnitude of 1.
Set
Sets the X, Y, Z, and W components of the current vector.
Subtract
Subtracts the second vector from the first vector.
ToString
Returns a string representation of the current object.
(Overrides ValueTypeToString.)
Top
Operators
NameDescription
Division
Divides a vector by a number.
Equality
Compares two vectors for equality.
GreaterThan
Compares the lengths of two vectors.
GreaterThanOrEqual
Compares the lengths of two vectors.
(Quaternion to Vector4D)
Converts the specified Unity Quaternion into its equivalent 4D vector.
(Vector4 to Vector4D)
Converts the specified Unity Vector4 into its equivalent 4D vector.
(Vector2D to Vector4D)
Converts the specified 2D vector into its equivalent 4D vector.
(Vector3D to Vector4D)
Converts the specified 3D vector into its equivalent 4D vector.
(Vector4D to Vector4)
Converts the specified 4D vector into its equivalent Unity Vector4.
(Vector4D to Quaternion)
Converts the specified 4D vector into its equivalent Unity Quaternion.
Inequality
Compares two vectors for inequality.
LessThan
Compares the lengths of two vectors.
LessThanOrEqual
Compares the lengths of two vectors.
Multiply(Single, Vector4D)
Multiplies a number by a vector.
Multiply(Vector4D, Vector3D)
Multiplies a 4D vector by 3D point.
Multiply(Vector4D, Vector4D)
Multiplies a vector by another one.
Multiply(Vector4D, Single)
Multiplies a vector by a number.
Subtraction
Subtracts one vector from another.
UnaryNegation
Negates a vector.
Top
Fields
NameDescription
NegativeInfinity
Shorthand for (-∞, -∞, -∞, -∞).
One
Shorthand for (1, 1, 1, 1).
PositiveInfinity
Shorthand for (+∞, +∞, +∞, +∞).
W
W component of the vector.
X
X component of the vector.
Y
Y component of the vector.
Z
Z component of the vector.
Zero
Shorthand for (0, 0, 0, 0).
Top
Extension Methods
NameDescription
ToStringDetailed
Displays the current vector as a detailed string.
(Defined by UnityExtensions.)
ToVector4
Converts the current LightBuzz 4D vector into its equivalent Microsoft Vector4.
(Defined by Kinect2Extensions.)
Top