> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class Vector3d

Namespace: [OpenTD](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD)\
Assembly: OpenTD.dll

A 3D vector. Note that coordinates are dimensional and reflect the current
OpenTD WorkingUnits ModelLength.

```csharp theme={null}
[MessagePackObject(true)]
public class Vector3d
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

## Inherited Members

[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone),
[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### Vector3d()

Initializes a new instance of the [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Vector3d.md) class.

```csharp theme={null}
public Vector3d()
```

### Vector3d(double, double, double)

Initializes a new instance of the [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Vector3d.md) class.

```csharp theme={null}
public Vector3d(double x, double y, double z)
```

#### Parameters

`x` [double](https://learn.microsoft.com/dotnet/api/system.double)

The x coordinate.

`y` [double](https://learn.microsoft.com/dotnet/api/system.double)

The y coordinate.

`z` [double](https://learn.microsoft.com/dotnet/api/system.double)

The z coordinate.

### Vector3d(Vector3d)

Initializes a new instance of the [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Vector3d.md) class.
Copy constructor.

```csharp theme={null}
public Vector3d(Vector3d v)
```

#### Parameters

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### Vector3d(DimensionlessVector3d)

```csharp theme={null}
public Vector3d(DimensionlessVector3d v)
```

#### Parameters

`v` [DimensionlessVector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.DimensionlessVector3d.md)

## Properties

### X

```csharp theme={null}
public Dimensional<ModelLength> X { get; set; }
```

#### Property Value

[Dimensional](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.Dimensional-1.md)\<[ModelLength](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.ModelLength.md)>

### Y

```csharp theme={null}
public Dimensional<ModelLength> Y { get; set; }
```

#### Property Value

[Dimensional](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.Dimensional-1.md)\<[ModelLength](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.ModelLength.md)>

### Z

```csharp theme={null}
public Dimensional<ModelLength> Z { get; set; }
```

#### Property Value

[Dimensional](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.Dimensional-1.md)\<[ModelLength](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Dimension.ModelLength.md)>

## Methods

### CrossProduct(Vector3d)

```csharp theme={null}
public Vector3d CrossProduct(Vector3d vv)
```

#### Parameters

`vv` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### DotProduct(Vector3d)

```csharp theme={null}
public double DotProduct(Vector3d v)
```

#### Parameters

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[double](https://learn.microsoft.com/dotnet/api/system.double)

### Equals(object)

Determines whether the specified object is equal to the current object.

```csharp theme={null}
public override bool Equals(object obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)

The object to compare with the current object.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

[true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the specified object  is equal to the current object; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

### GetHashCode()

Serves as the default hash function.

```csharp theme={null}
public override int GetHashCode()
```

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

A hash code for the current object.

### Length()

```csharp theme={null}
public double Length()
```

#### Returns

[double](https://learn.microsoft.com/dotnet/api/system.double)

### LengthSqrd()

```csharp theme={null}
public double LengthSqrd()
```

#### Returns

[double](https://learn.microsoft.com/dotnet/api/system.double)

### Mag()

```csharp theme={null}
public double Mag()
```

#### Returns

[double](https://learn.microsoft.com/dotnet/api/system.double)

### Normal()

```csharp theme={null}
public Vector3d Normal()
```

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### Normalize()

```csharp theme={null}
public void Normalize()
```

### ToString()

Returns a string that represents the current object.

```csharp theme={null}
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current object.

### set(double, double, double)

```csharp theme={null}
public void set(double v1, double v2, double v3)
```

#### Parameters

`v1` [double](https://learn.microsoft.com/dotnet/api/system.double)

`v2` [double](https://learn.microsoft.com/dotnet/api/system.double)

`v3` [double](https://learn.microsoft.com/dotnet/api/system.double)

## Operators

### operator +(Vector3d, Vector3d)

```csharp theme={null}
public static Vector3d operator +(Vector3d a, Vector3d b)
```

#### Parameters

`a` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`b` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator /(Vector3d, double)

```csharp theme={null}
public static Vector3d operator /(Vector3d v, double s)
```

#### Parameters

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`s` [double](https://learn.microsoft.com/dotnet/api/system.double)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator ==(Vector3d, Vector3d)

```csharp theme={null}
public static bool operator ==(Vector3d first, Vector3d second)
```

#### Parameters

`first` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`second` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### operator !=(Vector3d, Vector3d)

```csharp theme={null}
public static bool operator !=(Vector3d first, Vector3d second)
```

#### Parameters

`first` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`second` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### operator %(Vector3d, Vector3d)

```csharp theme={null}
public static Vector3d operator %(Vector3d u, Vector3d v)
```

#### Parameters

`u` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator \*(Vector3d, Vector3d)

```csharp theme={null}
public static double operator *(Vector3d a, Vector3d b)
```

#### Parameters

`a` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`b` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[double](https://learn.microsoft.com/dotnet/api/system.double)

### operator \*(double, Vector3d)

```csharp theme={null}
public static Vector3d operator *(double s, Vector3d v)
```

#### Parameters

`s` [double](https://learn.microsoft.com/dotnet/api/system.double)

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator \*(Vector3d, double)

```csharp theme={null}
public static Vector3d operator *(Vector3d v, double s)
```

#### Parameters

`v` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`s` [double](https://learn.microsoft.com/dotnet/api/system.double)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator -(Vector3d, Vector3d)

```csharp theme={null}
public static Vector3d operator -(Vector3d a, Vector3d b)
```

#### Parameters

`a` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

`b` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

### operator -(Vector3d)

```csharp theme={null}
public static Vector3d operator -(Vector3d a)
```

#### Parameters

`a` [Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)

#### Returns

[Vector3d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Vector3d.md)
