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
2014-09-25 22:38:01 +02:00
2015-02-28 10:55:01 +00:00
2014-09-25 22:38:01 +02:00
2014-09-25 22:38:01 +02:00
2014-09-25 22:38:01 +02:00
2014-09-25 22:38:01 +02:00
2014-09-25 22:38:01 +02:00
2014-09-25 22:38:01 +02:00

PolyVox - The voxel management and manipulation library
=======================================================
PolyVox is the core technology which lies behind our games. It is a fast, lightweight C++ library for the storage and processing of volumetric (voxel-based) environments. It has applications in both games and medical/scientific visualisation, and is released under the terms of the `zlib license <http://www.tldrlegal.com/l/ZLIB>`_.

PolyVox is a relatively low-level library, and you will need experience in C++ and computer graphics/shaders to use it effectively. It is designed to be easily integrated into existing applications and is independent of your chosen graphics API. For more details please see `this page <http://www.volumesoffun.com/polyvox-about/>`_ on our website.
Description
No description provided
Readme 5.4 MiB
Languages
C++ 92.5%
CMake 3.4%
SWIG 2.2%
C 1%
Python 0.6%
Other 0.3%