David Williams
0fe41fe28c
Documentation changes.
2016-01-11 22:54:27 +00:00
David Williams
e433a697cb
Removed out-of-date PagedVolume documentation and added a little bit in it's place.
2016-01-09 09:47:20 +00:00
David Williams
e89a55d154
Applied default Visual Studio formatting to most files. This is a quick fix for the tabs vs spaces issue that messes up the formatting in any editor (esp. Linux) which handles tabs/spaces differently to Visual Studio. Some parts of the formatting look a bit worse but overall it should be better (or at least more consistent).
...
I didn't apply the changes to a few macro-heavy files as Visual Studio removes all indentation from macros, whereas the indentation can be handy to see nesting.
2015-12-26 23:11:27 +00:00
David Williams
b3ca051878
Changed 'embedded' licenses from zlib to MIT.
2015-12-26 21:45:41 +00:00
David Williams
354b6aa9d0
When PolyVox files include other PolyVox files the 'PolyVox' part of the path is not needed. This is only needed when examples, tests, and external applications include PolyVox.
2015-12-20 20:56:37 +00:00
David Williams
28a3d78354
Removed old deprecated code.
2015-11-30 07:50:32 +00:00
David Williams
7fc9990b79
Fixed warning.
2015-11-29 22:50:09 +00:00
David Williams
09253a7bcc
Removed a few uses of '#ifdef SWIG', mainly from areas where they would no longer work. e.g where the code has been templatized since the #ifdef was added so we can see that the SWIG version of the code is out of date and won't build anyway.
2015-05-08 21:08:43 +02:00
David Williams
6ff7b46e26
Merge branch 'develop' into feature/custom-chunk-hash-table
2015-04-14 23:30:29 +02:00
Matt Williams
32c30471a6
Make m_uChunkSideLengthMinusOne const
2015-04-14 15:01:10 +01:00
David Williams
12fdeb8e52
Removed old chunk map.
...
Removed flush(Region) function as it's a bit trickier to implement with the new hash table, and it's not clear that we need it.
2015-04-13 23:51:18 +02:00
David Williams
af70096fcc
Tidying and adding comments.
2015-04-12 16:46:43 +02:00
David Williams
99390580dd
Replaced number with constant.
2015-04-12 10:35:12 +02:00
David Williams
a2fe1944af
Initial work on replacing std::unordered_map with a specialized hash table for looking up chunks based on their 3D position.
2015-04-09 23:44:25 +02:00
David Williams
4c24d61408
Added another function for backwards compatibility.
2015-04-05 12:03:12 +02:00
David Williams
c887d1444f
Added utility function for people who already have data in linear order, to convert it to Morton order.
2015-04-05 10:14:25 +02:00
David Williams
dec06bcfe4
Added caching of variable.
2015-04-04 09:49:12 +02:00
David Williams
77db90ac30
Removed unneeded variable.
2015-04-04 09:42:46 +02:00
David Williams
120b8e84cc
Added position in chunk and pointer to current chunk data to sampler.
2015-03-30 23:33:51 +02:00
David Williams
d99ed5e624
Implemented morton encoding using standard bit-twidling approach.
2015-03-28 09:46:05 +01:00
David Williams
b027cf1a0c
Moved common code into function.
2015-03-21 16:22:23 +01:00
David Williams
d477bec540
Revert "Replaced Vector3D with integer as key to map."
...
This reverts commit e82d6beca1a5cf7e81c546e6dd0243f54ff5d3e6.
2015-03-21 14:41:15 +01:00
David Williams
672c375a7a
Revert "Work on using a bitfield to set up chunk key."
...
This reverts commit 8bd8f8ba7a91de21fd56d4350f3bf8403a84c4b3.
2015-03-21 14:41:10 +01:00
David Williams
5fc0317260
Revert "Added typedef for chunk key type."
...
This reverts commit 6419c5827bc99d91dd5e96acd17bd507a30dc106.
2015-03-21 14:41:04 +01:00
David Williams
92eaaae765
Revert "Decided to always use a 64-bit chunk key, rather than trying to make it configurable."
...
This reverts commit 69f6f4ac3713e7a9eee804773a516cc5c3412183.
2015-03-21 14:40:57 +01:00
David Williams
ceeb8f70ce
Revert "Going back to building key by shifting instead of using bitfield."
...
This reverts commit 0d638f98370907b5ffed6b3460e320f4f9b2cf52.
2015-03-21 14:40:49 +01:00
David Williams
0c619ebec7
Revert "Added typedef for ChunkKey."
...
This reverts commit 905ec27f47a3e2dc1cba3a3a384b2c7532dab03d.
2015-03-21 14:40:30 +01:00
David Williams
f574563672
Revert "New, safer method of packing which makes careful use of casting to avoid problems with e.g. signed integer sign extension."
...
This reverts commit fd451be2dd7b65671274791105e76bd6a31a0f79.
2015-03-21 14:40:11 +01:00
David Williams
fd451be2dd
New, safer method of packing which makes careful use of casting to avoid problems with e.g. signed integer sign extension.
2015-03-21 08:48:45 +01:00
David Williams
905ec27f47
Added typedef for ChunkKey.
2015-03-21 08:12:02 +01:00
David Williams
0d638f9837
Going back to building key by shifting instead of using bitfield.
2015-03-21 08:05:58 +01:00
David Williams
69f6f4ac37
Decided to always use a 64-bit chunk key, rather than trying to make it configurable.
2015-03-20 23:09:38 +01:00
David Williams
6419c5827b
Added typedef for chunk key type.
2015-03-20 16:59:25 +01:00
David Williams
8bd8f8ba7a
Work on using a bitfield to set up chunk key.
2015-03-20 15:48:46 +01:00
David Williams
e82d6beca1
Replaced Vector3D with integer as key to map.
...
Chunks of voxel data are stored in a map, and it is quite common to need to search the map for a particular chunk. The key type used to be a Vector3D (i.e. the position of the chunk in 3D space) which makes conceptual sense but is relatively slow. Using a Vector3D as a key seems to have overhead, probably in terms of copying and performing comparisons. It seems to be significantly faster to use an integer as a key, so we now take the 3D position and pack it into a single integer by bitshifting.
Naturally this reduces the range of positions we can store - a 32-bit int can only encode 3 x 10-bit values, which means our volume can only be 1024 chunks in each direction (with a chunk often being 32x32x32 voxels). This should still be large enough for most uses, but an upcoming change will allow 64-bit keys to be used (at least on 64-bit builds) which then allows 21 bits of precision per component. This is so large that it's almost infinite for any practical purposes.
2015-03-15 09:32:42 +01:00
David Williams
741234e4a5
Small speed improvement by storing variables separately (rather than in Vector3D) to void construction/comparison overhead.
2015-03-09 23:52:56 +01:00
David Williams
99d0a226c8
Tidying up.
2015-03-08 23:48:55 +01:00
David Williams
72abcd8e9c
Chunks are now stored with unique_ptr rather than shared_ptr.
2015-03-08 23:30:12 +01:00
David Williams
43c203a2c9
Removed declaration of function for which we already removed the definition.
2015-03-07 17:42:31 +01:00
David Williams
aaa6b1dc15
A PagedVolume must now always be provided with a Pager when it is constructed.
2015-03-07 17:01:07 +01:00
David Williams
5a5b2b3875
Spotted an optimization for computing the voxel position.
2015-03-06 23:03:38 +01:00
David Williams
2c0d9cb9e7
Moved contents of initialize() into constructor.
2015-03-05 23:51:16 +01:00
David Williams
c804190d84
Removed the ability to set the target memory usage after construction, and this is now just done through the constructor. I don't think the functionality was useful, and this simplifies more logic.
2015-03-05 23:42:50 +01:00
David Williams
89550fcd44
Fixed warnings.
2015-03-05 00:04:22 +01:00
David Williams
bd6efe8c3c
Stuff related to valid regions is being moved from BaseVolum to RawVolume, as PagedVolume is now infinite.
2015-03-04 22:42:14 +01:00
David Williams
bfc7dfdc1b
Removed the ability to specify a region in the PagedVolume's constructor, and updated the tests and examples where required.
2015-02-28 23:31:23 +01:00
David Williams
3ace735619
Work on removing wrap modes.
2015-02-27 13:48:31 +01:00
David Williams
64d010527b
Removed old getVoxelAt()/setVoxelAt() functions. they've been flagged as deprecated for a while now, and are replaced by just getVoxel()/setVoxel().
2015-02-27 11:07:15 +01:00
David Williams
049a77cd0c
Moved all headers from 'PolyVoxCore' to 'PolyVox', as we no longer have the core/util distinction.
2015-02-07 17:26:36 +01:00