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
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
e7f41b7e0f
More fixing/tidying of test, related to removing volume size limit.
2015-03-01 08:14:30 +01:00
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
7e03c3e05b
Compile fixes and tweaks for tests.
2015-02-28 13:43:17 +01:00
f262c0e8f5
Revert "Removing tests which depend on wrap modes, in preparation for removing the wrap modes themselves."
...
This reverts commit 917d3b8c95
.
2015-02-28 09:59:28 +01:00
416ae8eb7f
Revert "Removed 'AllInternal' part of function name as it is now redundant."
...
This reverts commit 42e8b2cf44
.
2015-02-28 09:59:11 +01:00
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
42e8b2cf44
Removed 'AllInternal' part of function name as it is now redundant.
2015-02-26 22:15:19 +01:00
917d3b8c95
Removing tests which depend on wrap modes, in preparation for removing the wrap modes themselves.
2015-02-26 17:07:00 +01:00
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
db2e62d2a8
Replaced LargeVolume and SimpleVolume with PagedVolume in tests and examples.
2014-09-21 17:57:42 +02:00
880dcd8645
Fixed incorrect messages about temp files not being deleted.
2014-09-20 17:17:18 +02:00
4779f91787
TestVolume unit test now tests PagedVolume rather than SimpleVolume and LargeVolume.
2014-09-20 14:49:12 +02:00
d2bbd6beba
Some renaming.
2014-09-18 14:58:17 +02:00
8dd026e095
Work on limiting maximum memory usage.
2014-09-18 14:51:43 +02:00
c0a22de2df
Removed a lot of compression-related code.
2014-09-13 12:20:56 +02:00
302c6e688b
More work eliminating compression from inside LargeVolume.
2014-09-13 11:59:51 +02:00
4781ca5c42
Work on removing compression from LargeVolume.
2014-09-12 15:36:28 +02:00
4478e365c9
Removed RLECompressor as the code is now in RLEBlockCompressor.
...
Things are starting to get back under control. All tests pass, and all examples except PagingExample work.
2013-07-30 17:01:27 +02:00
a4fc814a51
Rearranging and renaming some code.
2013-07-29 16:04:01 +02:00
7146b5ecdb
The idea of a 'setTargetMemoryLimitInBytes' function was not really working out. It was too comp-lex and not really clear what the ideal size would be. I think user code needs to call setMaxNumberOfBlocksInMemory() and setMaxNumberOfUncompressedBlocks() directly, if they see from profiling toat too much camressing or paging is taking place.
2013-07-23 13:15:01 +02:00
bd60f34bd7
Removing explicit functions to control the number of compressed and uncompressed blocks in memory, and letting the user set a memory limit instead.
2013-07-04 16:23:58 +02:00
e38aa3b1b9
Unit tests now test FilePager.
2013-06-28 16:16:08 +02:00
a14de4a72e
Replaced std::functions with Pager class for paging.
2013-06-16 19:48:14 +02:00
fa8e7c390f
replaced 'getVoxelWithWrapping()' with regular 'getVoxel()', as they can be differentiated by their parameters.
2013-05-17 15:52:18 +02:00
62370868c8
Reverted accidental changes to tests.
...
Updated comments in compression code.
2013-02-25 17:06:12 +01:00
f70498e806
Removed old code.
2013-02-25 16:34:21 +01:00
c3801db4e2
Set tests to use MinizCompressor.
2013-02-07 16:20:05 +01:00
50c1c7c64b
Removed setCompressionEnabled() from LargeVolume.
2013-02-07 15:55:10 +01:00
09c6e2bf26
More work making the compression more robust.
2013-02-01 16:10:10 +01:00
3d66db50e0
Fixes and comments for RLE compression.
2013-02-01 14:09:29 +01:00
46e38c4714
Work on compression.
2013-01-31 16:56:32 +01:00
a81ec68714
Work on compression interface.
2013-01-31 16:35:50 +01:00
c7937b176d
Very bad (but functional!) initial implementation of LargeVolume compression with miniz.
2013-01-10 16:20:29 +01:00
a8383b47db
Temporarily disabled multiple samplers as they break the LargeVolume tests.
2013-01-08 16:54:17 +01:00
4b45bb297f
More volume unit tests - now iterating backwards as well as forwards.
2013-01-02 17:05:35 +01:00
25fae419f3
Removed some old testing code.
2013-01-02 16:11:19 +01:00
7bbaa0d559
Better testing of volume samplers.
2013-01-02 16:09:30 +01:00
a4b6339689
Fixed typos.
2013-01-02 15:15:30 +01:00
97024ba9b2
More volume test configurations.
2013-01-02 14:48:30 +01:00
c05293844f
Work on volume tests.
2013-01-02 14:13:14 +01:00
8b018be2dc
Fix for LargeVolumeSampler.
2012-12-18 16:25:31 +01:00
2a12bcd6d6
Fixed behavior of SimpleVolumeSampler.inl
2012-12-18 14:34:36 +01:00
c0d4b2a36f
Linux compile fix.
2012-12-14 16:50:06 +01:00
c69417a72b
Commented out failing volume tests - will have to come back to these.
2012-12-13 15:59:25 +01:00
2d7045ddd1
Compile fixes for Linux.
...
Removed use of qrand() until I can confirm results match between platforms.
2012-12-13 15:29:22 +01:00
ab6ec9380d
Tweaking results so that the tests pass... I'll have to debug this properly on a faster computer.
2012-12-11 22:14:26 +00:00
d8da6a7b7f
Refactoring the volume unit test code, trying to get some performance benchmarks. Unit tests are currently not passing.
2012-12-11 21:57:30 +00:00
dac0e5449f
Refactoring volume unit test code.
2012-12-11 20:18:26 +00:00