Skip to main content
Namespace: OpenTD
Assembly: OpenTD.dll
A 3D vector. Note that coordinates are dimensional and reflect the current OpenTD WorkingUnits ModelLength.

Inheritance

object ← Vector3d

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

Vector3d()

Initializes a new instance of the Vector3d class.

Vector3d(double, double, double)

Initializes a new instance of the Vector3d class.

Parameters

x double The x coordinate. y double The y coordinate. z double The z coordinate.

Vector3d(Vector3d)

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

Parameters

v Vector3d

Vector3d(DimensionlessVector3d)

Parameters

v DimensionlessVector3d

Properties

X

Property Value

Dimensional<ModelLength>

Y

Property Value

Dimensional<ModelLength>

Z

Property Value

Dimensional<ModelLength>

Methods

CrossProduct(Vector3d)

Parameters

vv Vector3d

Returns

Vector3d

DotProduct(Vector3d)

Parameters

v Vector3d

Returns

double

Equals(object)

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

Parameters

obj object The object to compare with the current object.

Returns

bool true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

Returns

int A hash code for the current object.

Length()

Returns

double

LengthSqrd()

Returns

double

Mag()

Returns

double

Normal()

Returns

Vector3d

Normalize()

ToString()

Returns a string that represents the current object.

Returns

string A string that represents the current object.

set(double, double, double)

Parameters

v1 double v2 double v3 double

Operators

operator +(Vector3d, Vector3d)

Parameters

a Vector3d b Vector3d

Returns

Vector3d

operator /(Vector3d, double)

Parameters

v Vector3d s double

Returns

Vector3d

operator ==(Vector3d, Vector3d)

Parameters

first Vector3d second Vector3d

Returns

bool

operator !=(Vector3d, Vector3d)

Parameters

first Vector3d second Vector3d

Returns

bool

operator %(Vector3d, Vector3d)

Parameters

u Vector3d v Vector3d

Returns

Vector3d

operator *(Vector3d, Vector3d)

Parameters

a Vector3d b Vector3d

Returns

double

operator *(double, Vector3d)

Parameters

s double v Vector3d

Returns

Vector3d

operator *(Vector3d, double)

Parameters

v Vector3d s double

Returns

Vector3d

operator -(Vector3d, Vector3d)

Parameters

a Vector3d b Vector3d

Returns

Vector3d

operator -(Vector3d)

Parameters

a Vector3d

Returns

Vector3d