0351313c36
Merge branch 'master' into coord
2017-11-23 17:24:11 +11:00
d3f434b523
coord: make template parameters more flexible
...
The coordinate system was unable to support types that prohibited
redim or retype operations. Additionally, the `tags' type used for
providing named data parameters was unwiedly.
We remove much of the dependance on template template parameters in the
defined operations and instead define these in terms of a template
specialisation of is_coord.
The tag types were replaced with direct specialisation of the `store'
struct by the primary type, and passing this type through use of the
CRTP.
2017-11-22 17:03:00 +11:00
1f337ef964
point: add min/max convenience methods
...
these create the smallest/largest expressible coordinates
2017-07-28 14:22:21 +10:00
62491b4cec
coord: generalise point hashing for all coord types
...
move the point hashing function into general coord operations. convert
from using std::hash to something we've made so that we know it's going
to spread the bits a little (unlike the default identity of GCC 7).
2017-06-29 16:33:53 +10:00
08b57c9716
point: add docstrings for distance metrics
2017-05-24 15:15:40 +10:00
f6116eb63e
point: prefer constexpr functions over static variables
2016-12-12 17:06:04 +11:00
ec78216813
coord: prefer int/unsigned to intmax/size_t
2016-10-25 17:46:36 +11:00
9a798446b5
build: remove unnecessary includes
...
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
7f4cf49931
iterator: use infix_iterator for coord ostream
2016-03-11 12:48:19 +11:00
f7a1ead518
point: remove constexpr from functions relying on cmath
2015-10-06 15:20:06 +11:00
31b59df97a
point: add constant sized convenience typedefs
2015-10-06 15:19:06 +11:00
c7637fd627
point: add octile distance function
2015-09-22 18:32:11 +10:00
864cedc257
point: add single dimensional typedefs
2015-09-21 15:26:57 +10:00
21b51a5011
point: make distance metrics constexpr
2015-09-15 21:06:43 +10:00
4ea5896d21
coord: use template typedefs
2015-07-24 01:34:44 +10:00
9b548e56d9
point: convert distance member functions to functions
2015-06-01 15:29:24 +10:00
012f8107c6
point: operate on value types, not references
2015-04-15 14:14:01 +10:00
2658b41ea1
relicence under Apache-2.0
2015-04-13 18:05:28 +10:00
bd88832df3
coord: move cast/redim operations to coord
2015-04-09 17:58:47 +10:00
5428c93b9a
coord: pass client class to coord base
...
allows common typesafe implementation of cast and redim
2015-04-09 17:47:35 +10:00
5627c573eb
coord: use size_t/intmax_t for u and i suffixes
...
size_t matches array indices we are likely to be used in conjuction with
these types.
2015-04-07 16:53:46 +10:00
8a0eee50e3
point: add from function
2015-03-07 03:20:07 +11:00
e461654de8
coord: split coord header into components
2015-03-06 01:46:01 +11:00
99ba406b4d
coord: move base coord class into main namespace
2015-03-06 01:16:14 +11:00
439bb19679
coord: move operators out of subclasses
2015-03-06 01:09:58 +11:00
e5d99b3370
coord: use stricter member variable names
...
use tags for the core coordinate structures to specify what names should
be used for the data variables (in the data union)
2015-03-03 04:11:30 +11:00
6ac02a9920
point: add homogenous redim
2015-02-19 13:29:16 +11:00
049aaf84c9
point: add redim with constant
2015-02-19 13:19:02 +11:00
60f2a7e00d
point: add self-division operator
2015-02-19 13:18:28 +11:00
6abfd252d9
coord: move free maths func from point to vector
2015-01-28 14:59:33 +11:00
1b19dadd40
point: add free multiply operator
2015-01-21 23:40:13 +11:00
f64e232201
point: point subtraction should give a vector
2015-01-19 19:14:53 +11:00
319a8ce616
coord: use inherited class for data definitions
...
keep as many operations centralised in the base coord class as possible.
2015-01-19 19:13:52 +11:00
2210db9c4e
point: add a cast method
2015-01-19 13:27:13 +11:00
09f5894d0c
point: add scalar division operation
2015-01-15 14:04:51 +11:00
917ab8fc8e
point: add redim with fill
2015-01-13 18:41:51 +11:00
64c11bdcb0
point/vector: use coord constructors
2015-01-13 18:41:51 +11:00
dadfe6173e
point: add convenience typedef point4f
2015-01-13 18:41:51 +11:00
3d3c1a5f2f
build: instantiate templates in declared namespace
2015-01-10 19:40:32 +11:00
7007b76db6
point: add static const member ORIGIN
2015-01-05 18:08:20 +11:00
bce2f81d2f
point: add trivial std::hash specialisation
2014-12-19 15:00:33 +11:00
58aeeb1786
point: add equality operator
2014-12-19 14:59:50 +11:00
1bb4c752f1
point: templatise distance functions
2014-12-19 14:59:16 +11:00
d4a6c115bc
point: add point2u typedef for point<size_t,2>
2014-12-18 19:43:13 +11:00
5956d0421e
parameterise point, vector, region, matrix on type
2014-12-15 20:10:56 +11:00
9cc47a05bd
Add point::redim implementation
2014-02-18 15:28:28 +11:00
4e8d9e793b
Add subtraction operators for point - vector
2013-08-06 14:31:46 +10:00
247d47f733
Add more scalar operators
2012-05-26 18:02:11 +10:00
40c40507f9
Give vector and point templated dimension size
2012-05-18 17:56:24 +10:00
6d879a96de
Add distance2 for point
2012-05-03 18:12:12 +10:00