Open Rails

WorldLocation Members

WorldLocation overview

Public Static Fields

None Returns a WorldLocation representing no location at all.

Public Static Methods

GetDistance Get a (3D) vector pointing from locationFrom to locationTo
GetDistance2D Get a (2D) vector pointing from locationFrom to locationTo, so neglecting height (y) information
GetDistanceSquared Get squared distance between two world locations (in meters)
Within Check whether location1 and location2 are within given distance from each other

Public Static Operators

Equality Operator
Inequality Operator

Public Instance Constructors

WorldLocation Overloaded. Initializes a new instance of the WorldLocation class.

Public Instance Fields

LocationThe vector to the location within a tile, relative to center of tile in MSTS coordinates
TileXThe x-value of the tile
TileZThe z-value of the tile

Public Instance Methods

Equals
GetHashCode
GetType (inherited from Object)Gets the Type of the current instance.
Normalize Ensure tile coordinates are within tile boundaries
NormalizeTo Change tile and location values to make it as if the location where on the requested tile.
Restore Restore the object from binary format
Save Save the object to binary format
ToString Create a nice string-representation of the world location

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

WorldLocation Class | ORTS.Common Namespace