Skip to main content
Describes a system of units. Can be inconsistent. Inheritance diagram for OpenTD.UnitsData:

Public Types

Public Member Functions

Static Public Member Functions

Properties

Detailed Description

Describes a system of units. Can be inconsistent.

Member Enumeration Documentation

Angle

Angle units.

Current

Current units.

Energy

Energy units.

FlocadOutputUnitsType

FloCAD/FLUINT units system types.

Force

Force units.

Mass

Mass units.

ModelLength

Length units to describe model dimensions.

OrbitLength

Length units to describe orbital distances.

Pressure

Pressure units.

Resistance

Electrical resistance units.

Temp

Temperature units.

Time

Time units.

UnitsType

Physical dimensions.

Voltage

Voltage units.

Constructor & Destructor Documentation

UnitsData() [1/4]

inline

UnitsData() [2/4]

inline Initializes a new instance of the UnitsData class by parsing the supplied units expression string. Use with basic units (m, hr, Btu, etc.) or compound units expressions (Btu/hr/ft^2/F, kg/m-s, etc.). Recognizes strings in the same format output by TD. Accepted operators : ( ) / - ^ Exponents denoted with optional ^, e.g. m^3 and m3 are both valid W can be substituted for J/s 1 can be used, as in 1/m^3 Revolution can be used, as in Revolution/s Case-insensitive For overlapping model length and orbit length units (m and ft), assumes model length.

UnitsData() [3/4]

inline Initializes a new instance of the UnitsData class, using integers written to save files or CSR’s by SINDA.

UnitsData() [4/4]

inline Copy constructor.

Member Function Documentation

Equals() [1/2]

inline

Equals() [2/2]

inline

GetHashCode()

inline

GetName()

inline static

GetTitle()

inline

GetUnitsName()

inline

operator!=()

inline static

operator==()

inline static

SetFrom()

inline

SetFromDataset()

inline Set this units system based on 64-bit integers written to a save file or CSR by Sinda. Exceptions

SetFromUnitsExpression()

inline Sets this UnitsData using the supplied string. Use with basic units (m, hr, Btu, etc.) or compound units expressions (Btu/hr/ft^2/F, kg/m-s, etc.). For basic units, SetFromBasicUnit(string str) will be more efficient. Recognizes strings in the same format output by TD. Accepted operators : ( ) / - ^ Exponents denoted with optional ^, e.g. m^3 and m3 are both valid W can be substituted for J/s 1 can be used, as in 1/m^3 Revolution can be used, as in Revolution/s Case-insensitive For overlapping model length and orbit length units (m and ft), assumes model length.

SetToEng()

inline

SetToSI()

inline

Text() [1/12]

inline static

Text() [2/12]

inline static

Text() [3/12]

inline static

Text() [4/12]

inline static

Text() [5/12]

inline static

Text() [6/12]

inline static

Text() [7/12]

inline static

Text() [8/12]

inline static

Text() [9/12]

inline static

Text() [10/12]

inline static

Text() [11/12]

inline static

Text() [12/12]

inline static

ToString()

inline

Property Documentation

angle

get set

current

get set

def

get set Use def to create arbitrary combinations of units (advanced).

energy

get set

FlocadOutputUnits

get set

force

get set

mass

get set

modelLength

get set

orbitLength

get set

pressure

get set

temp

get set

time

get set

voltage

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