Simutrans-Squirrel-API  r11875
Public Member Functions | Public Attributes | List of all members
coord3d Class Reference
Inheritance diagram for coord3d:
Inheritance graph
[legend]

Public Member Functions

 coord (int x, int y, int z)
 
coord3d operator+ (coord3d other)
 
coord3d operator- (coord other)
 
coord3d operator+ (coord3d other)
 
coord3d operator- (coord other)
 
coord3d operator- ()
 
coord3d operator* (integer fac)
 
coord3d operator/ (integer fac)
 
string _tostring ()
 
string href (string text)
 
- Public Member Functions inherited from coord
 coord (int x, int y)
 
coord operator+ (coord other)
 
coord operator- (coord other)
 
coord operator- ()
 
coord operator* (integer fac)
 
coord operator/ (integer fac)
 
string _tostring ()
 
string href (string text)
 
dir to_dir ()
 

Public Attributes

integer x
 x-coordinate More...
 
integer y
 y-coordinate More...
 
integer z
 z-coordinate - height More...
 
- Public Attributes inherited from coord
integer x
 x-coordinate More...
 
integer y
 y-coordinate More...
 

Detailed Description

Class that holds 3d coordinates. All functions that use this as input parameters will accept every data structure that contains members x, y, and z.

Coordinates always refer to the original rotation in map::file. They will be rotated if transferred between the game engine and squirrel.

Definition at line 70 of file api_simple.cc.

Member Function Documentation

◆ _tostring()

string coord3d::_tostring ( )

Converts coordinate to string containing the coordinates in the current rotation of the map.

Cannot be used in links in scenario texts. Use href instead.

◆ coord()

coord3d::coord ( int  x,
int  y,
int  z 
)

◆ href()

string coord3d::href ( string  text)

Generates text to generate links to coordinates in scenario texts.

Parameters
texttext to be shown in the link
Returns
a-tag with link in href
See also
get_rule_text

◆ operator*()

coord3d coord3d::operator* ( integer  fac)

◆ operator+() [1/2]

coord3d coord3d::operator+ ( coord3d  other)

◆ operator+() [2/2]

coord3d coord3d::operator+ ( coord3d  other)

◆ operator-() [1/3]

coord3d coord3d::operator- ( coord  other)

◆ operator-() [2/3]

coord3d coord3d::operator- ( coord  other)

◆ operator-() [3/3]

coord3d coord3d::operator- ( )

◆ operator/()

coord3d coord3d::operator/ ( integer  fac)

Member Data Documentation

◆ x

integer coord3d::x

x-coordinate

Definition at line 73 of file api_simple.cc.

◆ y

integer coord3d::y

y-coordinate

Definition at line 75 of file api_simple.cc.

◆ z

integer coord3d::z

z-coordinate - height

Definition at line 77 of file api_simple.cc.


The documentation for this class was generated from the following file: