    

 ## On this page

  

 

 # OpenTD.Vector3d Class Reference

 Last update: 16.07.2025 

A 3D vector. Note that coordinates are dimensional and reflect the current [OpenTD](namespace_open_t_d.xhtml "Base Thermal Desktop functionality.") WorkingUnits [ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml). [More...](#details)

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [Vector3d](#af5a7aae045d94b846f6ff6069d76493b) () Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class.   
  [Vector3d](#aa862007c6d02243b21eb683cec9cd30c) (double x, double y, double z) Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class.   
  [Vector3d](#a492fcef2c249e05d140ed9b1a916e828) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) v) Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class. Copy constructor.   
  [Vector3d](#a7bbd824a5aed92a0a4b5fc33c10dd141) ([DimensionlessVector3d](class_open_t_d_1_1_dimensionless_vector3d.xhtml) v) override bool [Equals](#a5cb50dc69ef99daccd66c538a29dfcb1) (object obj) override int [GetHashCode](#a5620cd2889afcfef77c97d7e5982e8ac) () override string [ToString](#a11956eced31863c4d317ced83a2e392f) () void [set](#a07b8ffdc3bd88b3f00aa46f3699690a5) (double v1, double v2, double v3) double [DotProduct](#a0b8fb3aa5555971fb9d988bcb7710fae) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) v) [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [CrossProduct](#a738bef4470f8b21c94857fbf735d24ed) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) vv) double [Mag](#a1853cd71d7ddcdedb1f199a3b8506141) () double [Length](#a0fcbf605e00bbe5de9118b18d88d7638) () double [LengthSqrd](#a4f8749cfe69dce0be6a1c7a5fe2d2f0d) () void [Normalize](#a6b228c7db5c93ea434d6ab064946ba2f) () [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [Normal](#a3bb1bbc3d5816c70a6f2ec317a39db59) () ## <a id="pub-static-methods" name="pub-static-methods"></a>Static Public Member Functions

static bool [operator==](#acdd9d9a79871c4d8f0a258acd539a638) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) first, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) second) static bool [operator!=](#a863c7c9002df47e8020c1d45c3fd88ef) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) first, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) second) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator+](#a3f834332327202b4cd1c52ee7ab7ebb7) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) a, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) b) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator-](#a01a775bdbf49af8a25d3f984bf9ce881) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) a, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) b) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator-](#af9955e9064a8a9630cb06a3f968b5f3d) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) a) static double [operator\*](#aab7a4e76fc37ada706514406a3dc7cdc) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) a, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) b) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator\*](#ac22ebdc722cbebba21eb639a24a99b6d) (double s, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) v) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator\*](#ab1d0f185e673eb90706e7f69671cdcad) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) v, double s) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator%](#ac411baa29b7a3438193da82700077239) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) u, [Vector3d](class_open_t_d_1_1_vector3d.xhtml) v) static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) [operator/](#adec16ac714095dbfb8903f15faf34303) ([Vector3d](class_open_t_d_1_1_vector3d.xhtml) v, double s) ## <a id="properties" name="properties"></a>Properties

Dimensional&lt; [ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml) &gt; [X](#a8062bcb0b2f85b6691db9cfd82b45988)` [get, set]` Dimensional&lt; [ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml) &gt; [Y](#a80904ca0d46a51cf3b3756697ec59217)` [get, set]` Dimensional&lt; [ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml) &gt; [Z](#aacbab103210973f84f75db989b23e451)` [get, set]` <a id="details" name="details"></a>## Detailed Description

A 3D vector. Note that coordinates are dimensional and reflect the current [OpenTD](namespace_open_t_d.xhtml "Base Thermal Desktop functionality.") WorkingUnits [ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml).



## Constructor &amp; Destructor Documentation

<a id="af5a7aae045d94b846f6ff6069d76493b" name="af5a7aae045d94b846f6ff6069d76493b"></a>## [◆ ](#af5a7aae045d94b846f6ff6069d76493b)Vector3d() \[1/4\]

 OpenTD.Vector3d.Vector3d  ( )   inline 

Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class.





<a id="aa862007c6d02243b21eb683cec9cd30c" name="aa862007c6d02243b21eb683cec9cd30c"></a>## [◆ ](#aa862007c6d02243b21eb683cec9cd30c)Vector3d() \[2/4\]

 OpenTD.Vector3d.Vector3d  ( double *x*,    double *y*,    double *z* )  inline 

Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class.

Parameters xThe x coordinate.yThe y coordinate.zThe z coordinate.



<a id="a492fcef2c249e05d140ed9b1a916e828" name="a492fcef2c249e05d140ed9b1a916e828"></a>## [◆ ](#a492fcef2c249e05d140ed9b1a916e828)Vector3d() \[3/4\]

 OpenTD.Vector3d.Vector3d  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v*)   inline 

Initializes a new instance of the [Vector3d](class_open_t_d_1_1_vector3d.xhtml "A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelL...") class. Copy constructor.





<a id="a7bbd824a5aed92a0a4b5fc33c10dd141" name="a7bbd824a5aed92a0a4b5fc33c10dd141"></a>## [◆ ](#a7bbd824a5aed92a0a4b5fc33c10dd141)Vector3d() \[4/4\]

 OpenTD.Vector3d.Vector3d  ( [DimensionlessVector3d](class_open_t_d_1_1_dimensionless_vector3d.xhtml) *v*)   inline 





## Member Function Documentation

<a id="a738bef4470f8b21c94857fbf735d24ed" name="a738bef4470f8b21c94857fbf735d24ed"></a>## [◆ ](#a738bef4470f8b21c94857fbf735d24ed)CrossProduct()

 [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.CrossProduct  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *vv*)   inline 





<a id="a0b8fb3aa5555971fb9d988bcb7710fae" name="a0b8fb3aa5555971fb9d988bcb7710fae"></a>## [◆ ](#a0b8fb3aa5555971fb9d988bcb7710fae)DotProduct()

 double OpenTD.Vector3d.DotProduct  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v*)   inline 





<a id="a5cb50dc69ef99daccd66c538a29dfcb1" name="a5cb50dc69ef99daccd66c538a29dfcb1"></a>## [◆ ](#a5cb50dc69ef99daccd66c538a29dfcb1)Equals()

 override bool OpenTD.Vector3d.Equals  ( object *obj*)   inline 





<a id="a5620cd2889afcfef77c97d7e5982e8ac" name="a5620cd2889afcfef77c97d7e5982e8ac"></a>## [◆ ](#a5620cd2889afcfef77c97d7e5982e8ac)GetHashCode()

 override int OpenTD.Vector3d.GetHashCode  ( )   inline 





<a id="a0fcbf605e00bbe5de9118b18d88d7638" name="a0fcbf605e00bbe5de9118b18d88d7638"></a>## [◆ ](#a0fcbf605e00bbe5de9118b18d88d7638)Length()

 double OpenTD.Vector3d.Length  ( )   inline 





<a id="a4f8749cfe69dce0be6a1c7a5fe2d2f0d" name="a4f8749cfe69dce0be6a1c7a5fe2d2f0d"></a>## [◆ ](#a4f8749cfe69dce0be6a1c7a5fe2d2f0d)LengthSqrd()

 double OpenTD.Vector3d.LengthSqrd  ( )   inline 





<a id="a1853cd71d7ddcdedb1f199a3b8506141" name="a1853cd71d7ddcdedb1f199a3b8506141"></a>## [◆ ](#a1853cd71d7ddcdedb1f199a3b8506141)Mag()

 double OpenTD.Vector3d.Mag  ( )   inline 





<a id="a3bb1bbc3d5816c70a6f2ec317a39db59" name="a3bb1bbc3d5816c70a6f2ec317a39db59"></a>## [◆ ](#a3bb1bbc3d5816c70a6f2ec317a39db59)Normal()

 [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.Normal  ( )   inline 





<a id="a6b228c7db5c93ea434d6ab064946ba2f" name="a6b228c7db5c93ea434d6ab064946ba2f"></a>## [◆ ](#a6b228c7db5c93ea434d6ab064946ba2f)Normalize()

 void OpenTD.Vector3d.Normalize  ( )   inline 





<a id="a863c7c9002df47e8020c1d45c3fd88ef" name="a863c7c9002df47e8020c1d45c3fd88ef"></a>## [◆ ](#a863c7c9002df47e8020c1d45c3fd88ef)operator!=()

 static bool OpenTD.Vector3d.operator!=  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *first*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *second* )  inlinestatic 





<a id="ac411baa29b7a3438193da82700077239" name="ac411baa29b7a3438193da82700077239"></a>## [◆ ](#ac411baa29b7a3438193da82700077239)operator%()

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator%  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *u*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v* )  inlinestatic 





<a id="ac22ebdc722cbebba21eb639a24a99b6d" name="ac22ebdc722cbebba21eb639a24a99b6d"></a>## [◆ ](#ac22ebdc722cbebba21eb639a24a99b6d)operator\*() \[1/3\]

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator\*  ( double *s*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v* )  inlinestatic 





<a id="aab7a4e76fc37ada706514406a3dc7cdc" name="aab7a4e76fc37ada706514406a3dc7cdc"></a>## [◆ ](#aab7a4e76fc37ada706514406a3dc7cdc)operator\*() \[2/3\]

 static double OpenTD.Vector3d.operator\*  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *a*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *b* )  inlinestatic 





<a id="ab1d0f185e673eb90706e7f69671cdcad" name="ab1d0f185e673eb90706e7f69671cdcad"></a>## [◆ ](#ab1d0f185e673eb90706e7f69671cdcad)operator\*() \[3/3\]

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator\*  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v*,    double *s* )  inlinestatic 





<a id="a3f834332327202b4cd1c52ee7ab7ebb7" name="a3f834332327202b4cd1c52ee7ab7ebb7"></a>## [◆ ](#a3f834332327202b4cd1c52ee7ab7ebb7)operator+()

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator+  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *a*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *b* )  inlinestatic 





<a id="af9955e9064a8a9630cb06a3f968b5f3d" name="af9955e9064a8a9630cb06a3f968b5f3d"></a>## [◆ ](#af9955e9064a8a9630cb06a3f968b5f3d)operator-() \[1/2\]

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator-  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *a*)   inlinestatic 





<a id="a01a775bdbf49af8a25d3f984bf9ce881" name="a01a775bdbf49af8a25d3f984bf9ce881"></a>## [◆ ](#a01a775bdbf49af8a25d3f984bf9ce881)operator-() \[2/2\]

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator-  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *a*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *b* )  inlinestatic 





<a id="adec16ac714095dbfb8903f15faf34303" name="adec16ac714095dbfb8903f15faf34303"></a>## [◆ ](#adec16ac714095dbfb8903f15faf34303)operator/()

 static [Vector3d](class_open_t_d_1_1_vector3d.xhtml) OpenTD.Vector3d.operator/  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *v*,    double *s* )  inlinestatic 





<a id="acdd9d9a79871c4d8f0a258acd539a638" name="acdd9d9a79871c4d8f0a258acd539a638"></a>## [◆ ](#acdd9d9a79871c4d8f0a258acd539a638)operator==()

 static bool OpenTD.Vector3d.operator==  ( [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *first*,    [Vector3d](class_open_t_d_1_1_vector3d.xhtml) *second* )  inlinestatic 





<a id="a07b8ffdc3bd88b3f00aa46f3699690a5" name="a07b8ffdc3bd88b3f00aa46f3699690a5"></a>## [◆ ](#a07b8ffdc3bd88b3f00aa46f3699690a5)set()

 void OpenTD.Vector3d.set  ( double *v1*,    double *v2*,    double *v3* )  inline 





<a id="a11956eced31863c4d317ced83a2e392f" name="a11956eced31863c4d317ced83a2e392f"></a>## [◆ ](#a11956eced31863c4d317ced83a2e392f)ToString()

 override string OpenTD.Vector3d.ToString  ( )   inline 





## Property Documentation

<a id="a8062bcb0b2f85b6691db9cfd82b45988" name="a8062bcb0b2f85b6691db9cfd82b45988"></a>## [◆ ](#a8062bcb0b2f85b6691db9cfd82b45988)X

 Dimensional&lt;[ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml)&gt; OpenTD.Vector3d.X  getset 





<a id="a80904ca0d46a51cf3b3756697ec59217" name="a80904ca0d46a51cf3b3756697ec59217"></a>## [◆ ](#a80904ca0d46a51cf3b3756697ec59217)Y

 Dimensional&lt;[ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml)&gt; OpenTD.Vector3d.Y  getset 





<a id="aacbab103210973f84f75db989b23e451" name="aacbab103210973f84f75db989b23e451"></a>## [◆ ](#aacbab103210973f84f75db989b23e451)Z

 Dimensional&lt;[ModelLength](class_open_t_d_1_1_dimension_1_1_model_length.xhtml)&gt; OpenTD.Vector3d.Z  getset 





---

The documentation for this class was generated from the following file:- C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/TDDEV\_ALPHA/buildXX/OpenTD/**Vector3d.cs**