Open Rails

WorldLocation Methods

The methods of the WorldLocation structure are listed below. For a complete list of WorldLocation structure members, see the WorldLocation Members topic.

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 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