diff --git a/include/PolyVox/AmbientOcclusionCalculator.inl b/include/PolyVox/AmbientOcclusionCalculator.inl index 46eb231e..19336b2b 100644 --- a/include/PolyVox/AmbientOcclusionCalculator.inl +++ b/include/PolyVox/AmbientOcclusionCalculator.inl @@ -25,6 +25,16 @@ namespace PolyVox { /** + * This function fills a 3D array with ambient occlusion values computed by raycasting through the volume. + * This approach to ambient occlusion is only appropriate for relatvely small volumes, otherwise it will + * become very slow and consume a lot of memory. You will need to find a way to actually use the generated + * ambient occlusion data, which might mean uploading it the the GPU as a volume texture or sampling on + * the CPU using the vertex positions from your generated mesh. + * + * In practice we have not made much use of this implementation ourselves, so you may find it needs some + * optimizations or improvements to be useful. It is likely that there are actually better approaches to + * the ambient occlusion problem. + * * \param volInput The volume to calculate the ambient occlusion for * \param[out] arrayResult The output of the calculator * \param region The region of the volume for which the occlusion should be calculated diff --git a/include/PolyVox/BaseVolume.h b/include/PolyVox/BaseVolume.h index 4129301f..a640ddc6 100644 --- a/include/PolyVox/BaseVolume.h +++ b/include/PolyVox/BaseVolume.h @@ -32,8 +32,8 @@ namespace PolyVox { - /// The BaseVolume class provides common functionality and an interface for other volume classes to implement. You should not try to create an instance of this - /// class directly. Instead you should use RawVolume or PagedVolume. + /// The BaseVolume class provides common functionality and an interface for other volume classes to implement. + /// You should not try to create an instance of this class directly. Instead you should use RawVolume or PagedVolume. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// More details to come... //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/PolyVox/BaseVolume.inl b/include/PolyVox/BaseVolume.inl index 679eea5c..a54227f4 100644 --- a/include/PolyVox/BaseVolume.inl +++ b/include/PolyVox/BaseVolume.inl @@ -119,12 +119,12 @@ namespace PolyVox } //////////////////////////////////////////////////////////////////////////////// - /// Note: This function needs reviewing for accuracy... + /// //////////////////////////////////////////////////////////////////////////////// template uint32_t BaseVolume::calculateSizeInBytes(void) { - return this->getWidth() * this->getHeight() * this->getDepth() * sizeof(VoxelType); + POLYVOX_THROW(not_implemented, "You should never call the base class version of this function."); } }