TheOpenSpatialLibrary by southerlies

<PackageReference Include="TheOpenSpatialLibrary" Version="0.5.0" />

 TranslationVector

Represents a 3D vector using three double-precision floating-point numbers.
public static readonly TranslationVector Ones

Defines an instance with all components set to 1.

public static readonly int SizeInBytes

Defines the size of the Vector3d struct in bytes.

public static readonly TranslationVector UnitX

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

public static readonly TranslationVector UnitY

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

public static readonly TranslationVector UnitZ

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

public static readonly TranslationVector Zero

Defines a zero-length Vector3.

public double X

The X component of the Vector3.

public double Y

The Y component of the Vector3.

public double Z

The Z component of the Vector3.

public double this[int i] { get; set; }

Gets or sets an element by index.

public double Length { get; }

Gets the length (magnitude) of the vector.

public double LengthSquared { get; }

Gets the square of the vector length (magnitude).

public TranslationVector(double value)

Constructs a new instance.

public TranslationVector(double[] value)

Constructs a new instance.

public TranslationVector(double[] value, int startIndex)

Constructs a new instance.

public TranslationVector(double x, double y, double z)

Constructs a new instance.

Copy ctor semantics. Constructs a new instance from the given object.

It computes the sum of two vectors.

public static TranslationVector Div(TranslationVector vector, double scale)

Divides a vector by a scalar.

public static TranslationVector Mul(TranslationVector vector, double scale)

Multiplies a vector items a scalar.

Adds two instances.

public static TranslationVector op_Division(TranslationVector vec, double scale)

Divides an instance by a scalar.

public static bool op_Equality(TranslationVector left, TranslationVector right)

Compares two instances for equality.

Caclulate the cross (vector) product of two vectors

public static bool op_Inequality(TranslationVector left, TranslationVector right)

Compares two instances for inequality.

public static TranslationVector op_Multiply(TranslationVector vec, double scale)

Multiplies an instance by a scalar.

public static TranslationVector op_Multiply(double scale, TranslationVector vec)

Multiplies an instance by a scalar.

public static double op_Multiply(TranslationVector left, TranslationVector right)

Dot product.

Subtracts two instances.

Negates an instance.

It computes the difference of two vectors.

public void Add(TranslationVector right)

Add the Vector passed as parameter to this instance. The result is stored in the current instance.

public void Ceil(TranslationVector ceil)

Sets the current instance components as the greatest value between the component itself and its homologous of the passed ceil parameter.

Clamp a vector to the given minimum and maximum vectors

public object Clone()

Creates a new object that is a copy of the current instance.

Calculate the cross (vector) product of two vectors

public void Div(double f)

Divide this instance by a scalar.

public double Dot(TranslationVector right)

Calculate the dot (scalar) product of two vectors.

public bool Equals(TranslationVector other)

Indicates whether the current object is equal to another object of the same type.

public void Floor(TranslationVector floor)

Sets the current instance components as the lowest value between the component itself and its homologous of the passed floor parameter.

Gets the translation as a vector.

Create a copy of the current instance and negate it ( Negate).

Returns a copy of the instance scaled to unit length.

public void Mul(double f)

It computes the product of a vector times a scalar. The result is stored in the current instance.

public void Negate()

Invert the sign of every component.

public void Normalize()

Scales the instance to unit length.

public void Scale(double sx, double sy, double sz)

Scales the current instance by the given amounts.

public void Scale(TranslationVector scale)

Scales this instance by the given parameter.

public void Sub(TranslationVector right)

Subtract the Vector passed as parameter from this instance. The result is stored in the current instance.

public double[] ToArray()

Creates and returns a double array representation with x, y, and z ordered components.

public string ToString(uint decimals)

Returns a string formatted to the decimals-th decimal and separated by a default separator.