Documentation.

This commit is contained in:
David Williams 2016-01-03 23:12:28 +00:00
parent abfe63a525
commit 3d01a8412e
5 changed files with 18 additions and 4 deletions

View File

@ -41,6 +41,8 @@ namespace PolyVox
/// Note that this should probably just be considered an example of how to define /// Note that this should probably just be considered an example of how to define
/// a voxel type for the Marching Cubes algorithm. Advanced users are likely to /// a voxel type for the Marching Cubes algorithm. Advanced users are likely to
/// define custom voxel types and possibly custom controllers. /// define custom voxel types and possibly custom controllers.
///
/// \sa Material, MaterialDensityPair
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
template <typename Type> template <typename Type>
class Density class Density

View File

@ -27,18 +27,20 @@
#include "Impl/IteratorController.h" #include "Impl/IteratorController.h"
#include "RawVolume.h" //Is this desirable?
#include "Region.h" #include "Region.h"
namespace PolyVox namespace PolyVox
{ {
/// This class is able to copy volume data from a source volume to a destination volume while performing low-pass filtering (blurring).
template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType> template< typename SrcVolumeType, typename DstVolumeType, typename AccumulationType>
class LowPassFilter class LowPassFilter
{ {
public: public:
LowPassFilter(SrcVolumeType* pVolSrc, Region regSrc, DstVolumeType* pVolDst, Region regDst, uint32_t uKernelSize); LowPassFilter(SrcVolumeType* pVolSrc, Region regSrc, DstVolumeType* pVolDst, Region regDst, uint32_t uKernelSize);
/// Execute a standard approach to filtering which performs a number of neighbourhood look-ups per voxel.
void execute(); void execute();
/// Execute a version with 'Summed Area Tables'. This should be faster for large kernel sizes but this hasn't really been confirmed yet.
void executeSAT(); void executeSAT();
private: private:

View File

@ -33,7 +33,9 @@ namespace PolyVox
{ {
///This class represents a voxel storing only a material. ///This class represents a voxel storing only a material.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Detailed description... /// Note that this should probably just be considered an example of how to define
/// a voxel type for the Marching Cubes algorithm. Advanced users are likely to
/// define custom voxel types and possibly custom controllers.
/// ///
/// \sa Density, MaterialDensityPair /// \sa Density, MaterialDensityPair
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -34,7 +34,9 @@ namespace PolyVox
{ {
/// This class represents a voxel storing only a density. /// This class represents a voxel storing only a density.
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Detailed description... /// Note that this should probably just be considered an example of how to define
/// a voxel type for the Marching Cubes algorithm. Advanced users are likely to
/// define custom voxel types and possibly custom controllers.
/// ///
/// \sa Density, Material /// \sa Density, Material
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -28,7 +28,7 @@
#include "Impl/PlatformDefinitions.h" #include "Impl/PlatformDefinitions.h"
#include "Region.h" #include "Region.h"
#include "Vertex.h" //Should probably do away with this on in the future... #include "Vertex.h" //Should probably do away with this one in the future...
#include <algorithm> #include <algorithm>
#include <cstdlib> #include <cstdlib>
@ -39,6 +39,9 @@
namespace PolyVox namespace PolyVox
{ {
/// A simple and general-purpose mesh class to represent the data returned by the surface extraction functions.
/// It supports different vertex types (which will vary depending on the surface extractor used and the contents
/// of the volume) and both 16-bit and 32 bit indices.
typedef uint32_t DefaultIndexType; typedef uint32_t DefaultIndexType;
template <typename _VertexType, typename _IndexType = DefaultIndexType> template <typename _VertexType, typename _IndexType = DefaultIndexType>
class Mesh class Mesh
@ -75,6 +78,9 @@ namespace PolyVox
Vector3DInt32 m_offset; Vector3DInt32 m_offset;
}; };
/// Meshes returned by the surface extractors often have vertices with efficient compressed
/// formats which are hard to interpret directly (see CubicVertex and MarchingCubesVertex).
/// This function creates a new uncompressed mesh containing the much simpler Vertex objects.
template <typename MeshType> template <typename MeshType>
Mesh< Vertex< typename MeshType::VertexType::DataType >, typename MeshType::IndexType > decodeMesh(const MeshType& encodedMesh) Mesh< Vertex< typename MeshType::VertexType::DataType >, typename MeshType::IndexType > decodeMesh(const MeshType& encodedMesh)
{ {