Skip to main content

Vector3D Struct

Definition

Namespace:Avalonia
Assembly:Avalonia.Base
Package:Avalonia
public struct Vector3D

Inheritance: ValueType -> Vector3D

Implements: IEquatable<Vector3D>

Constructors

NameDescription
Vector3DNo summary available.

Vector3D Constructor

public Vector3D(double X, double Y, double Z)

Parameters

X double

Y double

Z double

Methods

NameDescription
AbsReturns a vector whose elements are the absolute values of each of the specified vector's elements.
AddAdds the second to the first vector
ClampRestricts a vector between a minimum and a maximum value.
DeconstructNo summary available.
DistanceComputes the Euclidean distance between the two given points.
DistanceSquaredComputes the squared Euclidean distance between the two given points.
Divide (2 overloads)Divides the first vector by the second.
DotCalculates the dot product of two vectors.
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
MaxReturns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors
MinReturns 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.
NormalizeReturns a normalized version of this vector.
ParseParses a Avalonia.Vector string.
SubstractSubtracts the second from the first vector
ToStringNo 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

Avalonia.Vector3D

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

Avalonia.Vector3D

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

min Avalonia.Vector3D

max Avalonia.Vector3D

Returns

Avalonia.Vector3D

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

Avalonia.Vector3D

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

Avalonia.Vector3D

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

Avalonia.Vector3D

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

Avalonia.Vector3D

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

Avalonia.Vector3D

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

Avalonia.Vector3D

Normalize Method

Returns a normalized version of this vector.

public Avalonia.Vector3D Normalize(Avalonia.Vector3D value)

Parameters

value Avalonia.Vector3D

Returns

Avalonia.Vector3D

Parse Method

Parses a Avalonia.Vector string.

public Avalonia.Vector3D Parse(string s)

Parameters

s string

The string.

Returns

Avalonia.Vector3D

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

Avalonia.Vector3D

ToString Method

public string ToString()

Returns

string

Properties

NameDescription
LengthLength of the vector.
XNo summary available.
YNo summary available.
ZNo 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; }