Vector4

StockSharp.Xaml.Charting.Rendering.HighQualityRasterizer.Agg.VectorMath

Represents a 4D vector using four double-precision floating-point numbers.

Implementa: IEquatable<Vector4>

Constructores

Vector4(double, double, double, double)

Constructs a new Vector4d.

x
The x component of the Vector4d.
y
The y component of the Vector4d.
z
The z component of the Vector4d.
w
The w component of the Vector4d.
Vector4(Vector2)

Constructs a new Vector4d from the given Vector2d.

v
The Vector2d to copy components from.
Vector4(Vector3)

Constructs a new Vector4d from the given Vector3d.

v
The Vector3d to copy components from.
Vector4(Vector3, double)

Constructs a new Vector4d from the specified Vector3d and w component.

v
The Vector3d to copy components from.
w
The w component of the new Vector4.
Vector4(Vector4)

Constructs a new Vector4d from the given Vector4d.

v
The Vector4d to copy components from.

Propiedades

Length : double

Gets the length (magnitude) of the vector.

LengthFast : double

Gets an approximation of the vector length (magnitude).

LengthSquared : double

Gets the square of the vector length (magnitude).

Xy : Vector2

Gets or sets an OpenTK.Vector2d with the X and Y components of this instance.

Xyz : Vector3

Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.

Métodos

Add(Vector4, Vector4, Vector4)

Adds two vectors.

a
Left operand.
b
Right operand.
result
Result of operation.
Add(Vector4, Vector4) : Vector4

Adds two vectors.

a
Left operand.
b
Right operand.

Devuelve: Result of operation.

BaryCentric(Vector4, Vector4, Vector4, double, double, Vector4)

Interpolate 3 Vectors using Barycentric coordinates

a
First input Vector.
b
Second input Vector.
c
Third input Vector.
u
First Barycentric Coordinate.
v
Second Barycentric Coordinate.
result
Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise
BaryCentric(Vector4, Vector4, Vector4, double, double) : Vector4

Interpolate 3 Vectors using Barycentric coordinates

a
First input Vector
b
Second input Vector
c
Third input Vector
u
First Barycentric Coordinate
v
Second Barycentric Coordinate

Devuelve: a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise

Clamp(Vector4, Vector4, Vector4, Vector4)

Clamp a vector to the given minimum and maximum vectors

vec
Input vector
min
Minimum vector
max
Maximum vector
result
The clamped vector
Clamp(Vector4, Vector4, Vector4) : Vector4

Clamp a vector to the given minimum and maximum vectors

vec
Input vector
min
Minimum vector
max
Maximum vector

Devuelve: The clamped vector

Divide(Vector4, double) : Vector4

Divides a vector by a scalar.

vector
Left operand.
scale
Right operand.

Devuelve: Result of the operation.

Divide(Vector4, double, Vector4)

Divides a vector by a scalar.

vector
Left operand.
scale
Right operand.
result
Result of the operation.
Divide(Vector4, Vector4) : Vector4

Divides a vector by the components of a vector (scale).

vector
Left operand.
scale
Right operand.

Devuelve: Result of the operation.

Divide(Vector4, Vector4, Vector4)

Divide a vector by the components of a vector (scale).

vector
Left operand.
scale
Right operand.
result
Result of the operation.
Dot(Vector4, Vector4, double)

Calculate the dot product of two vectors

left
First operand
right
Second operand
result
The dot product of the two inputs
Dot(Vector4, Vector4) : double

Calculate the dot product of two vectors

left
First operand
right
Second operand

Devuelve: The dot product of the two inputs

Equals(Vector4) : bool

Indicates whether the current vector is equal to another vector.

other
A vector to compare with this vector.

Devuelve: true if the current vector is equal to the vector parameter; otherwise, false.

Equals(object) : bool

Indicates whether this instance and a specified object are equal.

obj
The object to compare to.

Devuelve: True if the instances are equal; false otherwise.

GetHashCode() : int

Returns the hashcode for this instance.

Devuelve: A System.Int32 containing the unique hashcode for this instance.

Lerp(Vector4, Vector4, double) : Vector4

Returns a new Vector that is the linear blend of the 2 given Vectors

a
First input vector
b
Second input vector
blend
The blend factor. a when blend=0, b when blend=1.

Devuelve: a when blend=0, b when blend=1, and a linear combination otherwise

Lerp(Vector4, Vector4, double, Vector4)

Returns a new Vector that is the linear blend of the 2 given Vectors

a
First input vector
b
Second input vector
blend
The blend factor. a when blend=0, b when blend=1.
result
a when blend=0, b when blend=1, and a linear combination otherwise
Max(Vector4, Vector4, Vector4)

Calculate the component-wise maximum of two vectors

a
First operand
b
Second operand
result
The component-wise maximum
Max(Vector4, Vector4) : Vector4

Calculate the component-wise maximum of two vectors

a
First operand
b
Second operand

Devuelve: The component-wise maximum

Min(Vector4, Vector4) : Vector4

Calculate the component-wise minimum of two vectors

a
First operand
b
Second operand

Devuelve: The component-wise minimum

Min(Vector4, Vector4, Vector4)

Calculate the component-wise minimum of two vectors

a
First operand
b
Second operand
result
The component-wise minimum
Multiply(Vector4, double) : Vector4

Multiplies a vector by a scalar.

vector
Left operand.
scale
Right operand.

Devuelve: Result of the operation.

Multiply(Vector4, double, Vector4)

Multiplies a vector by a scalar.

vector
Left operand.
scale
Right operand.
result
Result of the operation.
Multiply(Vector4, Vector4) : Vector4

Multiplies a vector by the components a vector (scale).

vector
Left operand.
scale
Right operand.

Devuelve: Result of the operation.

Multiply(Vector4, Vector4, Vector4)

Multiplies a vector by the components of a vector (scale).

vector
Left operand.
scale
Right operand.
result
Result of the operation.
Normalize(Vector4) : Vector4

Scale a vector to unit length

vec
The input vector

Devuelve: The normalized vector

Normalize()

Scales the Vector4d to unit length.

Normalize(Vector4, Vector4)

Scale a vector to unit length

vec
The input vector
result
The normalized vector
NormalizeFast()

Scales the Vector4d to approximately unit length.

NormalizeFast(Vector4, Vector4)

Scale a vector to approximately unit length

vec
The input vector
result
The normalized vector
NormalizeFast(Vector4) : Vector4

Scale a vector to approximately unit length

vec
The input vector

Devuelve: The normalized vector

op_Addition(Vector4, Vector4) : Vector4

Adds two instances.

left
The first instance.
right
The second instance.

Devuelve: The result of the calculation.

op_Division(Vector4, double) : Vector4

Divides an instance by a scalar.

vec
The instance.
scale
The scalar.

Devuelve: The result of the calculation.

op_Equality(Vector4, Vector4) : bool

Compares two instances for equality.

left
The first instance.
right
The second instance.

Devuelve: True, if left equals right; false otherwise.

op_Explicit(Double*) : nint

Returns a pointer to the first element of the specified instance.

v
The instance.

Devuelve: A pointer to the first element of v.

op_Explicit(IntPtr) : nint

Returns a pointer to the first element of the specified instance.

v
The instance.

Devuelve: A pointer to the first element of v.

op_Inequality(Vector4, Vector4) : bool

Compares two instances for inequality.

left
The first instance.
right
The second instance.

Devuelve: True, if left does not equa lright; false otherwise.

op_Multiply(double, Vector4) : Vector4

Multiplies an instance by a scalar.

scale
The scalar.
vec
The instance.

Devuelve: The result of the calculation.

op_Multiply(Vector4, double) : Vector4

Multiplies an instance by a scalar.

vec
The instance.
scale
The scalar.

Devuelve: The result of the calculation.

op_Subtraction(Vector4, Vector4) : Vector4

Subtracts two instances.

left
The first instance.
right
The second instance.

Devuelve: The result of the calculation.

op_UnaryNegation(Vector4) : Vector4

Negates an instance.

vec
The instance.

Devuelve: The result of the calculation.

Subtract(Vector4, Vector4) : Vector4

Subtract one Vector from another

a
First operand
b
Second operand

Devuelve: Result of subtraction

Subtract(Vector4, Vector4, Vector4)

Subtract one Vector from another

a
First operand
b
Second operand
result
Result of subtraction
ToString(string) : string

Returns a System.String that represents the current Vector4d, formatting each element with format.

format
ToString() : string

Returns a System.String that represents the current Vector4d.

Transform(Vector4, Matrix4X4) : Vector4

Transform a Vector by the given Matrix

vec
The vector to transform
mat
The desired transformation

Devuelve: The transformed vector

Transform(Vector4, Matrix4X4, Vector4)

Transform a Vector by the given Matrix

vec
The vector to transform
mat
The desired transformation
result
The transformed vector
Transform(Vector4, Quaternion) : Vector4

Transforms a vector by a quaternion rotation.

vec
The vector to transform.
quat
The quaternion to rotate the vector by.

Devuelve: The result of the operation.

Transform(Vector4, Quaternion, Vector4)

Transforms a vector by a quaternion rotation.

vec
The vector to transform.
quat
The quaternion to rotate the vector by.
result
The result of the operation.

Campos

One : Vector4

Defines an instance with all components set to 1.

SizeInBytes : int

Defines the size of the Vector4d struct in bytes.

UnitW : Vector4

Defines a unit-length Vector4d that points towards the W-axis.

UnitX : Vector4

Defines a unit-length Vector4d that points towards the X-axis.

UnitY : Vector4

Defines a unit-length Vector4d that points towards the Y-axis.

UnitZ : Vector4

Defines a unit-length Vector4d that points towards the Z-axis.

w : double

The W component of the Vector4d.

x : double

The X component of the Vector4d.

y : double

The Y component of the Vector4d.

z : double

The Z component of the Vector4d.

Zero : Vector4

Defines a zero-length Vector4d.