Vector3

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

Represents a 3D vector using three double-precision floating-point numbers.

Реализует: IEquatable<Vector3>

Конструкторы

Vector3(double, double, double)

Constructs a new Vector3.

x
The x component of the Vector3.
y
The y component of the Vector3.
z
The z component of the Vector3.
Vector3(Vector2, double)

Constructs a new instance from the given Vector2d.

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

Constructs a new instance from the given Vector3d.

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

Constructs a new instance from the given Vector4d.

v
The Vector4d to copy components from.

Свойства

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.

Методы

Add(Vector3, Vector3, Vector3)

Adds two vectors.

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

Adds two vectors.

a
Left operand.
b
Right operand.

Возвращает: Result of operation.

BaryCentric(Vector3, Vector3, Vector3, double, double, Vector3)

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(Vector3, Vector3, Vector3, double, double) : Vector3

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

Возвращает: 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

CalculateAngle(Vector3, Vector3, double)

Calculates the angle (in radians) between two vectors.

first
The first vector.
second
The second vector.
result
Angle (in radians) between the vectors.
CalculateAngle(Vector3, Vector3) : double

Calculates the angle (in radians) between two vectors.

first
The first vector.
second
The second vector.

Возвращает: Angle (in radians) between the vectors.

Clamp(Vector3, Vector3, Vector3, Vector3)

Clamp a vector to the given minimum and maximum vectors

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

Clamp a vector to the given minimum and maximum vectors

vec
Input vector
min
Minimum vector
max
Maximum vector

Возвращает: The clamped vector

ComponentMax(Vector3, Vector3) : Vector3

Calculate the component-wise maximum of two vectors

a
First operand
b
Second operand

Возвращает: The component-wise maximum

ComponentMax(Vector3, Vector3, Vector3)

Calculate the component-wise maximum of two vectors

a
First operand
b
Second operand
result
The component-wise maximum
ComponentMin(Vector3, Vector3) : Vector3

Calculate the component-wise minimum of two vectors

a
First operand
b
Second operand

Возвращает: The component-wise minimum

ComponentMin(Vector3, Vector3, Vector3)

Calculate the component-wise minimum of two vectors

a
First operand
b
Second operand
result
The component-wise minimum
Cross(Vector3, Vector3, Vector3)

Caclulate the cross (vector) product of two vectors

left
First operand
right
Second operand
result
The cross product of the two inputs

Возвращает: The cross product of the two inputs

Cross(Vector3, Vector3) : Vector3

Caclulate the cross (vector) product of two vectors

left
First operand
right
Second operand

Возвращает: The cross product of the two inputs

Divide(Vector3, Vector3) : Vector3

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

vector
Left operand.
scale
Right operand.

Возвращает: Result of the operation.

Divide(Vector3, double, Vector3)

Divides a vector by a scalar.

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

Divides a vector by a scalar.

vector
Left operand.
scale
Right operand.

Возвращает: Result of the operation.

Divide(Vector3, Vector3, Vector3)

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

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

Calculate the dot (scalar) product of two vectors

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

Calculate the dot (scalar) product of two vectors

left
First operand
right
Second operand

Возвращает: The dot product of the two inputs

Equals(Vector3, double) : bool

Indicates whether this instance and a specified object are equal within an error range.

OtherVector
ErrorValue

Возвращает: True if the instances are equal; false otherwise.

Equals(Vector3) : bool

Indicates whether the current vector is equal to another vector.

other
A vector to compare with this vector.

Возвращает: 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.

Возвращает: True if the instances are equal; false otherwise.

GetHashCode() : int

Returns the hashcode for this instance.

Возвращает: A System.Int32 containing the unique hashcode for this instance.

GetNormal() : Vector3

Returns a normalized Vector of this.

Lerp(Vector3, Vector3, double) : Vector3

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.

Возвращает: a when blend=0, b when blend=1, and a linear combination otherwise

Lerp(Vector3, Vector3, double, Vector3)

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(Vector3, Vector3) : Vector3

Returns the Vector3d with the minimum magnitude

left
Left operand
right
Right operand

Возвращает: The minimum Vector3

Min(Vector3, Vector3) : Vector3

Returns the Vector3d with the minimum magnitude

left
Left operand
right
Right operand

Возвращает: The minimum Vector3

Multiply(Vector3, double) : Vector3

Multiplies a vector by a scalar.

vector
Left operand.
scale
Right operand.

Возвращает: Result of the operation.

Multiply(Vector3, double, Vector3)

Multiplies a vector by a scalar.

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

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

vector
Left operand.
scale
Right operand.

Возвращает: Result of the operation.

Multiply(Vector3, Vector3, Vector3)

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

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

Scales the Vector3d to unit length.

Normalize(Vector3, Vector3)

Scale a vector to unit length

vec
The input vector
result
The normalized vector
Normalize(Vector3) : Vector3

Scale a vector to unit length

vec
The input vector

Возвращает: The normalized vector

NormalizeFast(Vector3, Vector3)

Scale a vector to approximately unit length

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

Scale a vector to approximately unit length

vec
The input vector

Возвращает: The normalized vector

NormalizeFast()

Scales the Vector3d to approximately unit length.

op_Addition(Vector3, Vector3) : Vector3

Adds two instances.

left
The first instance.
right
The second instance.

Возвращает: The result of the calculation.

op_Division(double, Vector3) : Vector3

Creates a new vector which is the numerator devided by each component of the vector.

numerator
vec

Возвращает: The result of the calculation.

op_Division(Vector3, double) : Vector3

Divides an instance by a scalar.

vec
The instance.
scale
The scalar.

Возвращает: The result of the calculation.

op_Equality(Vector3, Vector3) : bool

Compares two instances for equality.

left
The first instance.
right
The second instance.

Возвращает: True, if left equals right; false otherwise.

op_Inequality(Vector3, Vector3) : bool

Compares two instances for inequality.

left
The first instance.
right
The second instance.

Возвращает: True, if left does not equa lright; false otherwise.

op_Multiply(double, Vector3) : Vector3

Multiplies an instance by a scalar.

scale
The scalar.
vec
The instance.

Возвращает: The result of the calculation.

op_Multiply(Vector3, double) : Vector3

Multiplies an instance by a scalar.

vec
The instance.
scale
The scalar.

Возвращает: The result of the calculation.

op_Multiply(Vector3, Vector3) : Vector3

Component wise multiply two vectors together, x*x, y*y, z*z.

vecA
vecB
op_Subtraction(Vector3, Vector3) : Vector3

Subtracts two instances.

left
The first instance.
right
The second instance.

Возвращает: The result of the calculation.

op_UnaryNegation(Vector3) : Vector3

Negates an instance.

vec
The instance.

Возвращает: The result of the calculation.

Subtract(Vector3, Vector3) : Vector3

Subtract one Vector from another

a
First operand
b
Second operand

Возвращает: Result of subtraction

Subtract(Vector3, Vector3, Vector3)

Subtract one Vector from another

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

Returns a System.String that represents the current Vector3.

Transform(Vector3[], Quaternion)

Transform all the vectors in the array by the quaternion rotation.

vecArray
rotationQuaternion
Transform(Vector3, Quaternion, Vector3)

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.
Transform(Vector3, Matrix4X4, Vector3)

Transform a Vector by the given Matrix

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

Transforms a vector by a quaternion rotation.

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

Возвращает: The result of the operation.

Transform(Vector3[], Matrix4X4)

Transform all the vectors in the array by the given Matrix.

Transform(Vector3, Matrix4X4)

Transform a Vector by the given Matrix

vec
The vector to transform
mat
The desired transformation

Возвращает: The transformed vector

TransformNormal(Vector3, Matrix4X4, Vector3)

Transform a Normal by the given Matrix

norm
The normal to transform
mat
The desired transformation
result
The transformed normal
TransformNormal(Vector3, Matrix4X4) : Vector3

Transform a Normal by the given Matrix

norm
The normal to transform
mat
The desired transformation

Возвращает: The transformed normal

TransformNormalInverse(Vector3, Matrix4X4, Vector3)

Transform a Normal by the (transpose of the) given Matrix

norm
The normal to transform
invMat
The inverse of the desired transformation
result
The transformed normal
TransformNormalInverse(Vector3, Matrix4X4) : Vector3

Transform a Normal by the (transpose of the) given Matrix

norm
The normal to transform
invMat
The inverse of the desired transformation

Возвращает: The transformed normal

TransformPerspective(Vector3, Matrix4X4) : Vector3

Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3

vec
The vector to transform
mat
The desired transformation

Возвращает: The transformed vector

TransformPerspective(Vector3, Matrix4X4, Vector3)

Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d

vec
The vector to transform
mat
The desired transformation
result
The transformed vector
TransformPosition(Vector3, Matrix4X4, Vector3)

Transform a Position by the given Matrix

pos
The position to transform
mat
The desired transformation
result
The transformed position
TransformPosition(Vector3, Matrix4X4) : Vector3

Transform a Position by the given Matrix

pos
The position to transform
mat
The desired transformation

Возвращает: The transformed position

TransformVector(Vector3, Matrix4X4, Vector3)

Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.

vec
The vector to transform
mat
The desired transformation
result
The transformed vector
TransformVector(Vector3, Matrix4X4) : Vector3

Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.

vec
The vector to transform
mat
The desired transformation

Возвращает: The transformed vector

Поля

NegativeInfinity : Vector3

Defines an instance with all components set to negative infinity.

One : Vector3

Defines an instance with all components set to 1.

PositiveInfinity : Vector3

Defines an instance with all components set to positive infinity.

SizeInBytes : int

Defines the size of the Vector3d struct in bytes.

UnitX : Vector3

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

UnitY : Vector3

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

UnitZ : Vector3

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

x : double

The X component of the Vector3.

y : double

The Y component of the Vector3.

z : double

The Z component of the Vector3.

Zero : Vector3

Defines a zero-length Vector3.