Commit Graph

84 Commits

Author SHA1 Message Date
af77aad894 extent/region: simplify iteration over ranges 2018-03-23 16:38:54 +11:00
2d7e3e5d7d build: prefer iosfwd over iostream 2018-03-22 16:11:13 +11:00
0e3fa05f05 build: migrate from ipp files to pure hpp files
ipp files weren't a great way of keeping things clean, and IDEs have a
little trouble dealing with the split configuration. this simplifies
debugging a great deal.
2018-02-28 11:49:13 +11:00
6e32ad84a7 coord: use consistent naming for point coverage tests
use inclusive for tests that include all borders, and exclusive for
tests that do not accept the bottom right borders.
2017-08-24 15:56:58 +10:00
a016e98b12 region: add make_range for regions
introduces an object that provides iterators suitable for row-major
scanning of points covering a region object. mostly a wrapper for the
equivalent extent_range.
2017-08-21 18:48:52 +10:00
d6b77f879f region: add convenience zero() constructor 2017-08-16 17:25:56 +10:00
ec0cb7d2c1 region: remove scale operation
it's not immediately apparent how scale operates on both of point and
extent components. rather than complicate matters we remove them in
preference of letting the user construct it directly.
2017-08-11 15:20:48 +10:00
9abfef2769 region: remove mutating point constrain function 2017-08-11 15:19:14 +10:00
31d2e6bfd8 region: remove duplicate point/region coverage tests 2017-08-11 15:15:44 +10:00
f36a14973a region: add `encloses' test for subregions 2017-08-11 14:39:46 +10:00
72f631ab4b region: remove `expanded' function
we're trying to move away from mutating operators.

also, we do the bad thing of just renaming the non-mutating operator
given it appears no one is using the mutating operator in our code bases
anyway...
2017-08-09 17:28:53 +10:00
b6edf25cd8 region: remove the resize method
we're moving away from mutating operators so this is somewhat
out-of-place. it's not a huge functional change though as there are
enough locations where the internal representation of point/extent are
assumed that we just do it through the members.
2017-08-09 17:27:28 +10:00
fc41f0991d region: add overload of inset for vectors 2017-08-09 17:17:55 +10:00
01f6e5a1e8 region: add make_union function 2017-07-31 15:44:01 +10:00
d29276a427 region: add "has" point query 2017-07-25 17:10:16 +10:00
db5795c25a region: remove array constructor
the meaning of the array values weren't particularly clear. are they
point-point, point-extent, something else? also the implementation was
horribly incorrect for whatever it claimed to be doing. so we remove the
function entirely to avoid the aforementioned ambiguity.
2017-07-19 17:19:37 +10:00
2dcb315ce6 region: prefer constexpr functions over static variables 2016-12-12 17:07:53 +11:00
4f3fd9547d region: add three dimensional typedefs 2016-10-25 20:02:19 +11:00
77c7d87d60 region: remove incorrect union accessors
the union accessors x,y,w,h were predicated on the dimension being 2.
for higher/lower dimensions this resulted in the incorrect variable
being returned.

rather than do something fancy with unions and coord storage type for
access to the underlying data we force the user to acknowledge the split
storage of point/extent.

unfortunately we have pretty shitty names for the components as a
result.
2016-10-25 19:59:53 +11:00
9546526c1f region: remove extent_t/point_t distinction
it's too problematic to retain signedness distinctions between base
points and region extents. just use the same types, but retain the
named typedefs for compatibility.
2016-10-25 17:50:11 +11:00
ec78216813 coord: prefer int/unsigned to intmax/size_t 2016-10-25 17:46:36 +11:00
c2310d5d50 build: explicitly allow anonymous structs 2016-05-12 18:06:12 +10:00
efa52c60e9 build: remove unnecessary pedantic checks 2016-04-28 16:09:14 +10:00
809e7b0421 iostream: use consistent ostream format 2016-03-11 13:01:57 +11:00
4cd6dcc85c region: use size_type for scaling param 2015-10-19 17:08:08 +11:00
bcaa6c7428 region: add cast function 2015-09-21 15:33:58 +10:00
c4f773f129 coord: use explicit constructors consistently 2015-09-09 18:45:23 +10:00
2658b41ea1 relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
426fc1c848 region: remove two-scalar constructor
two-scalar constructor is too similar to extent and point constructors
leading to unexpected initialisation problems.
2015-04-02 15:01:17 +11:00
e461654de8 coord: split coord header into components 2015-03-06 01:46:01 +11:00
439bb19679 coord: move operators out of subclasses 2015-03-06 01:09:58 +11:00
31d1d741e9 extent/region: update to use size parameters 2015-03-03 04:13:29 +11:00
69864bdfcd region: add rebase method
sets region base point
2015-03-02 18:49:12 +11:00
3e2c70f251 region: add magnitude setter 2015-03-02 18:49:12 +11:00
84c957440b region: add extent-only constructor 2015-02-20 21:53:34 +11:00
0a153e8e12 region: add vector subtraction operator 2015-02-20 16:06:46 +11:00
ba878238af region: add vector addition operator 2015-02-20 15:26:59 +11:00
cb5e76cff9 region: rename far to away
far is a reserved word in win32
2015-02-18 02:32:52 +11:00
c7a868beac region: add two point constructor 2015-02-17 18:25:29 +11:00
e1ebacb16a region: add far corner query 2015-02-17 16:24:33 +11:00
8ea1a04f57 region: add extent query method 'size' 2015-02-17 16:24:16 +11:00
6bd9ad333c region: try to use unsigned types for extent 2015-02-17 16:23:54 +11:00
93ec5be1f3 coord: add elements and value_type constants 2015-02-17 16:22:12 +11:00
f7f84ef6b8 region: add dimension and value_type constants
for interoperability with vector and point classes
2015-02-16 23:38:08 +11:00
1db9057c95 region: add per-axis expansion calls 2015-02-04 15:44:51 +11:00
c185ea7226 region: add integer typedef, region2i 2015-01-22 15:00:35 +11:00
a782a61983 region: allow uninitialized construction 2015-01-22 15:00:20 +11:00
d23abfc727 region: use position_type for x,y 2015-01-22 14:58:42 +11:00
76b51e04b2 region: add expansion methods 2015-01-22 14:58:29 +11:00
91ecc49d68 region: add inset method 2015-01-21 23:40:13 +11:00