Skip to main content

OpenTD .NET8 reference 2025 R2

OpenTD.Vector3d Class Reference

Last update: 16.07.2025

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

Public Member Functions

 Vector3d ()
 Initializes a new instance of the Vector3d class.
 
 Vector3d (double x, double y, double z)
 Initializes a new instance of the Vector3d class.
 
 Vector3d (Vector3d v)
 Initializes a new instance of the Vector3d class. Copy constructor.
 
 Vector3d (DimensionlessVector3d v)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
void set (double v1, double v2, double v3)
 
double DotProduct (Vector3d v)
 
Vector3d CrossProduct (Vector3d vv)
 
double Mag ()
 
double Length ()
 
double LengthSqrd ()
 
void Normalize ()
 
Vector3d Normal ()
 

Static Public Member Functions

static bool operator== (Vector3d first, Vector3d second)
 
static bool operator!= (Vector3d first, Vector3d second)
 
static Vector3d operator+ (Vector3d a, Vector3d b)
 
static Vector3d operator- (Vector3d a, Vector3d b)
 
static Vector3d operator- (Vector3d a)
 
static double operator* (Vector3d a, Vector3d b)
 
static Vector3d operator* (double s, Vector3d v)
 
static Vector3d operator* (Vector3d v, double s)
 
static Vector3d operator% (Vector3d u, Vector3d v)
 
static Vector3d operator/ (Vector3d v, double s)
 

Properties

Dimensional< ModelLengthX [get, set]
 
Dimensional< ModelLengthY [get, set]
 
Dimensional< ModelLengthZ [get, set]
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Vector3d() [1/4]

OpenTD.Vector3d.Vector3d ( )
inline

Initializes a new instance of the Vector3d class.

◆ Vector3d() [2/4]

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

Initializes a new instance of the Vector3d class.

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

◆ Vector3d() [3/4]

OpenTD.Vector3d.Vector3d ( Vector3d v)
inline

Initializes a new instance of the Vector3d class. Copy constructor.

◆ Vector3d() [4/4]

OpenTD.Vector3d.Vector3d ( DimensionlessVector3d v)
inline

Member Function Documentation

◆ CrossProduct()

Vector3d OpenTD.Vector3d.CrossProduct ( Vector3d vv)
inline

◆ DotProduct()

double OpenTD.Vector3d.DotProduct ( Vector3d v)
inline

◆ Equals()

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

◆ GetHashCode()

override int OpenTD.Vector3d.GetHashCode ( )
inline

◆ Length()

double OpenTD.Vector3d.Length ( )
inline

◆ LengthSqrd()

double OpenTD.Vector3d.LengthSqrd ( )
inline

◆ Mag()

double OpenTD.Vector3d.Mag ( )
inline

◆ Normal()

Vector3d OpenTD.Vector3d.Normal ( )
inline

◆ Normalize()

void OpenTD.Vector3d.Normalize ( )
inline

◆ operator!=()

static bool OpenTD.Vector3d.operator!= ( Vector3d first,
Vector3d second )
inlinestatic

◆ operator%()

static Vector3d OpenTD.Vector3d.operator% ( Vector3d u,
Vector3d v )
inlinestatic

◆ operator*() [1/3]

static Vector3d OpenTD.Vector3d.operator* ( double s,
Vector3d v )
inlinestatic

◆ operator*() [2/3]

static double OpenTD.Vector3d.operator* ( Vector3d a,
Vector3d b )
inlinestatic

◆ operator*() [3/3]

static Vector3d OpenTD.Vector3d.operator* ( Vector3d v,
double s )
inlinestatic

◆ operator+()

static Vector3d OpenTD.Vector3d.operator+ ( Vector3d a,
Vector3d b )
inlinestatic

◆ operator-() [1/2]

static Vector3d OpenTD.Vector3d.operator- ( Vector3d a)
inlinestatic

◆ operator-() [2/2]

static Vector3d OpenTD.Vector3d.operator- ( Vector3d a,
Vector3d b )
inlinestatic

◆ operator/()

static Vector3d OpenTD.Vector3d.operator/ ( Vector3d v,
double s )
inlinestatic

◆ operator==()

static bool OpenTD.Vector3d.operator== ( Vector3d first,
Vector3d second )
inlinestatic

◆ set()

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

◆ ToString()

override string OpenTD.Vector3d.ToString ( )
inline

Property Documentation

◆ X

Dimensional<ModelLength> OpenTD.Vector3d.X
getset

◆ Y

Dimensional<ModelLength> OpenTD.Vector3d.Y
getset

◆ Z

Dimensional<ModelLength> OpenTD.Vector3d.Z
getset

The documentation for this class was generated from the following file:
  • C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/OpenTD/OpenTD/Vector3d.cs

Connect with Ansys