Skip to main content

OpenTD reference 2026 R1

Class Point2d

Last update: 09.03.2026

Namespace: OpenTD
Assembly: OpenTD.dll

A mathematical point in 2D.

[MessagePackObject(true)]
public class Point2d

Inheritance

object ← Point2d

Inherited Members

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

Constructors

Point2d()

Initializes a new instance of the class.

public Point2d()

Point2d(Point2d)

Copy constructor.

public Point2d(Point2d p)

Parameters

p Point2d

The Point2d to copy from.

Point2d(double, double)

Initializes a new instance of the class.

public Point2d(double x, double y)

Parameters

x double

The x value.

y double

The y value.

Properties

X

public Dimensional<ModelLength> X { get; set; }

Property Value

Dimensional<ModelLength>

Y

public Dimensional<ModelLength> Y { get; set; }

Property Value

Dimensional<ModelLength>

Methods

Equals(object)

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

public override bool Equals(object obj)

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.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator +(Point2d, Point2d)

public static Point2d operator +(Point2d firstOperand, Point2d secondOperand)

Parameters

firstOperand Point2d

secondOperand Point2d

Returns

Point2d

operator +(Point2d, Vector3d)

public static Point2d operator +(Point2d firstOperand, Vector3d secondOperand)

Parameters

firstOperand Point2d

secondOperand Vector3d

Returns

Point2d

operator ==(Point2d, Point2d)

public static bool operator ==(Point2d first, Point2d second)

Parameters

first Point2d

second Point2d

Returns

bool

operator !=(Point2d, Point2d)

public static bool operator !=(Point2d first, Point2d second)

Parameters

first Point2d

second Point2d

Returns

bool

operator -(Point2d, Point2d)

public static Vector3d operator -(Point2d a, Point2d b)

Parameters

a Point2d

b Point2d

Returns

Vector3d

Connect with Ansys