Skip to content

Commit

Permalink
Document the point name mnemonics
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Sep 21, 2019
1 parent fb9bd10 commit 70fce43
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/coordinates.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ struct hash<coords::coord_point<Point, Origin, Scale>> {

} // namespace std

/** Typedefs for point types with coordinate mnemonics.
*
* Each name is of the form (tri)point_<origin>_<scale> where <origin> tells you the
* context in which the point has meaning, and <scale> tells you what one unit
* of the point means.
*
* For example:
* point_omt_ms is the position of a map square within an overmap terrain.
* tripoint_rel_sm is a relative tripoint submap offset.
*/
/*@{*/
using point_rel_ms = coords::coord_point<point, coords::origin::relative, coords::ms>;
using point_abs_ms = coords::coord_point<point, coords::origin::abs, coords::ms>;
using point_sm_ms = coords::coord_point<point, coords::origin::submap, coords::ms>;
Expand All @@ -266,6 +277,7 @@ using tripoint_abs_sm = coords::coord_point<tripoint, coords::origin::abs, coord
using tripoint_abs_omt = coords::coord_point<tripoint, coords::origin::abs, coords::omt>;
using tripoint_abs_seg = coords::coord_point<tripoint, coords::origin::abs, coords::seg>;
using tripoint_abs_om = coords::coord_point<tripoint, coords::origin::abs, coords::om>;
/*@}*/

using coords::project_to;
using coords::project_remain;
Expand Down

0 comments on commit 70fce43

Please sign in to comment.