Vector3D Struct
Definition
public struct Vector3D
Constructors
| Name | Description |
|---|---|
| Vector3D | No summary available. |
Vector3D Constructor
public Vector3D(double X, double Y, double Z)
Parameters
X double
Y double
Z double
Methods
| Name | Description |
|---|---|
| Abs | Returns a vector whose elements are the absolute values of each of the specified vector's elements. |
| Add | Adds the second to the first vector |
| Clamp | Restricts a vector between a minimum and a maximum value. |
| Deconstruct | No summary available. |
| Distance | Computes the Euclidean distance between the two given points. |
| DistanceSquared | Computes the squared Euclidean distance between the two given points. |
| Divide (2 overloads) | Divides the first vector by the second. |
| Dot | Calculates the dot product of two vectors. |
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| Max | Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors |
| Min | Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors |
| Multiply (2 overloads) | Multiplies the first vector by the second. |
| Normalize | Returns a normalized version of this vector. |
| Parse | Parses a Avalonia.Vector string. |
| Substract | Subtracts the second from the first vector |
| ToString | No summary available. |
Abs Method
Returns a vector whose elements are the absolute values of each of the specified vector's elements.
public Avalonia.Vector3D Abs()
Returns
Add Method
Adds the second to the first vector
public Avalonia.Vector3D Add(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
Clamp Method
Restricts a vector between a minimum and a maximum value.
public Avalonia.Vector3D Clamp(Avalonia.Vector3D value, Avalonia.Vector3D min, Avalonia.Vector3D max)
Parameters
value Avalonia.Vector3D
Returns
Deconstruct Method
public void Deconstruct(double& X, double& Y, double& Z)
Parameters
X double&
Y double&
Z double&
Distance Method
Computes the Euclidean distance between the two given points.
public double Distance(Avalonia.Vector3D value1, Avalonia.Vector3D value2)
Parameters
value1 Avalonia.Vector3D
value2 Avalonia.Vector3D
Returns
double
DistanceSquared Method
Computes the squared Euclidean distance between the two given points.
public double DistanceSquared(Avalonia.Vector3D value1, Avalonia.Vector3D value2)
Parameters
value1 Avalonia.Vector3D
value2 Avalonia.Vector3D
Returns
double
Divide overloads
Divide Method
Divides the first vector by the second.
public Avalonia.Vector3D Divide(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
Divide Method
Divides the vector by the given scalar.
public Avalonia.Vector3D Divide(Avalonia.Vector3D left, double right)
Parameters
left Avalonia.Vector3D
right double
Returns
Dot Method
Calculates the dot product of two vectors.
public double Dot(Avalonia.Vector3D vector1, Avalonia.Vector3D vector2)
Parameters
vector1 Avalonia.Vector3D
vector2 Avalonia.Vector3D
Returns
double
Equals overloads
Equals Method
public bool Equals(Avalonia.Vector3D other)
Parameters
other Avalonia.Vector3D
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
Max Method
Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors
public Avalonia.Vector3D Max(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
Min Method
Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors
public Avalonia.Vector3D Min(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
Multiply overloads
Multiply Method
Multiplies the first vector by the second.
public Avalonia.Vector3D Multiply(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
Multiply Method
Multiplies the vector by the given scalar.
public Avalonia.Vector3D Multiply(Avalonia.Vector3D left, double right)
Parameters
left Avalonia.Vector3D
right double
Returns
Normalize Method
Returns a normalized version of this vector.
public Avalonia.Vector3D Normalize(Avalonia.Vector3D value)
Parameters
value Avalonia.Vector3D
Returns
Parse Method
Parses a Avalonia.Vector string.
public Avalonia.Vector3D Parse(string s)
Parameters
s string
The string.
Returns
The Avalonia.Vector3D.
Substract Method
Subtracts the second from the first vector
public Avalonia.Vector3D Substract(Avalonia.Vector3D left, Avalonia.Vector3D right)
Parameters
left Avalonia.Vector3D
right Avalonia.Vector3D
Returns
ToString Method
public string ToString()
Returns
string
Properties
| Name | Description |
|---|---|
| Length | Length of the vector. |
| X | No summary available. |
| Y | No summary available. |
| Z | No summary available. |
Length Property
Length of the vector.
public double Length { get; set; }
X Property
public double X { get; set; }
Y Property
public double Y { get; set; }
Z Property
public double Z { get; set; }