Commit Graph

2522 Commits

Author SHA1 Message Date
38e1a19e37 alloc: all allocators should take a type for alloc/dealloc 2018-05-10 13:53:06 +10:00
117a870b19 cast: add ffs cast 2018-05-10 13:52:49 +10:00
ad90e10c5d view: remove unnecessary enable_if type 2018-05-10 13:31:51 +10:00
2620e2ed33 alloc: return views rather than raw pointers 2018-05-10 12:54:45 +10:00
df3a556867 view: add convenience wrappers for addition operators 2018-05-10 12:54:45 +10:00
6042d9ab76 geom/ellipse: remove spurious print from test case 2018-05-10 12:54:45 +10:00
2c919a6582 view: use alignment cast for casting 2018-05-10 12:54:45 +10:00
ec44c68ce6 view: require fully named types for casting 2018-05-10 12:54:45 +10:00
29702704fb view: improve template deduction guides 2018-05-10 12:48:20 +10:00
2ec9a7ebe6 maths: remove util::is_nan in preference of std::isnan 2018-05-10 12:45:45 +10:00
4116442e40 debug: don't rely on format for output
debug is relied upon by a great deal of other units so it's very
difficult to include other popular headers like format.hpp without
triggering cyclic dependencies.
2018-05-10 12:44:03 +10:00
06e29ed136 cast: add alignment cast 2018-05-09 17:47:47 +10:00
2926776c97 view: use universal references for return types
Reduces the possibility that we dereference a temporary from the
internal iterators.
2018-05-08 21:51:09 +10:00
170f9ceb2c string: prefer type deduction over explicit typenames 2018-05-08 21:50:43 +10:00
34fc834a29 view: prefer std::next over std::advance
next is slightly less likely to trigger issues dereferencing a temporary
(since we aren't producing an lvalue).
2018-05-08 21:49:27 +10:00
e7c108c770 json: remove use of the restrict qualifier
This mostly just complicates type manipulations. We can add it back in
if performance actually warrants it, or if it becomes an official
qualifier.
2018-05-08 21:48:17 +10:00
749b5179a3 quaternion: add convenience quaternion-vector multiply 2018-05-08 15:51:39 +10:00
f53b9ace1b cpp: add some explanatory comments 2018-05-07 13:28:31 +10:00
1324ae2b4a geom/plane: add distance2 for plane/point 2018-05-07 11:48:32 +10:00
92ba5469c4 geom/frustum: add symbolic constants for plane indices 2018-05-07 11:09:53 +10:00
c33a679e81 geom/ray: make ray intersections more robust 2018-05-04 17:10:51 +10:00
3e5c89f643 coord/ops: add lshift 2018-05-04 17:06:18 +10:00
b01173d82b maths: rename limit to clamp 2018-05-03 21:43:48 +10:00
93ddd4c11d library: force typing for symbol queries 2018-05-03 21:22:41 +10:00
1350ea93c7 random: don't hardcode mt19937 2018-05-03 21:22:05 +10:00
c51673e421 io: add slurp for uint32_t 2018-05-03 21:21:45 +10:00
497d3ca970 build: update for gcc-8.1 warnings 2018-05-03 18:32:08 +10:00
c0af2df2c8 hash/fasthash: print result of each test case 2018-05-03 17:34:19 +10:00
dcf87a7c17 geom/aabb: add ray-aabb distance tests 2018-05-03 17:33:42 +10:00
1c150296f9 hash/siphash: qualify local helper functions as static 2018-05-03 17:32:45 +10:00
9f1f3633e2 debug: catch exceptions by constref in CHECK_THROWS 2018-05-03 17:32:03 +10:00
2a6ad38e9c coord/traits: add vector-extent result_type 2018-05-03 17:31:41 +10:00
9f6697dc2a geom/ray: correct test for negative aabb distance 2018-05-03 16:40:30 +10:00
cfefca7767 geom/ray: correct the sense of ray/plane distance 2018-05-03 16:39:57 +10:00
a1aa0c6949 geom/sample: make the extent surface sampler public 2018-05-01 16:02:55 +10:00
8b47a2e350 geom/sample: don't rely on float distances in poisson sampling 2018-05-01 16:02:23 +10:00
d72485307a geom/ellipse: add convenience ellipse3f typedef 2018-05-01 16:01:43 +10:00
a22829e9fc geom/tri: be consistent with struct/classes 2018-05-01 16:01:17 +10:00
93277d5d9d json/tree: add from_json that takes a path 2018-05-01 16:01:00 +10:00
63cf40eeca poisson-tool: use function objects for distances 2018-04-27 16:33:18 +10:00
864c0ecf58 functor: add constant functor 2018-04-27 16:32:58 +10:00
5011c670c6 geom/tri: add tri sampler 2018-04-26 18:37:01 +10:00
4bb66d2c05 geom/sample: surface sampler should take constref 2018-04-26 18:36:29 +10:00
05f8787c91 poission: add more thoroughly documented poisson sampler 2018-04-26 17:44:16 +10:00
d011c60359 point: add convenience centroid function 2018-04-26 16:30:16 +10:00
c5d142ec9a debug: seperate SCOPED_SANITY from CHECK_SANITY
the former is for checking immediately and a scope exit, the latter is
for checking immediately.
2018-04-24 15:12:09 +10:00
f5399450ab debug: add RETURN_UNLESS convenience macro
returns a given value unless a condition is true. primarily useful for
computing is_valid and breaking if one of the preconditions isn't valid.
2018-04-24 15:11:18 +10:00
e2b55c7ee5 kmeans: use norm as default metric
this avoids relying on 'point' being the coordinate type
2018-04-24 11:53:58 +10:00
337e53b725 kmeans: allow parameterised distance metrics 2018-04-23 23:19:14 +10:00
44d5b655ab geom/plane: correct the sense of coefficient `D' 2018-04-23 22:14:05 +10:00