Expanded comment.

This commit is contained in:
David Williams 2012-01-08 17:26:19 +00:00
parent f71f8daf5a
commit 582e2b67be

View File

@ -24,11 +24,13 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
// We try to avoid duplicate vertices by checking whether a vertex has already been added at a given position. // We try to avoid duplicate vertices by checking whether a vertex has already been added at a given position.
// However, it is possible that vertices have the same position but differnt materials. In this case, the // However, it is possible that vertices have the same position but different materials. In this case, the
// vertices are not true duplicates and both must be added to the mesh. As far as I can tell, it is possible to have // vertices are not true duplicates and both must be added to the mesh. As far as I can tell, it is possible to have
// at most six vertices with the same position but different materials. This worst-case scenario happens when we // at most six vertices with the same position but different materials. This worst-case scenario happens when we
// have a 2x2x2 group of voxels (all with different materials) and then we delete two voxels from opposing corners. // have a 2x2x2 group of voxels (all with different materials) and then we delete two voxels from opposing corners.
// The vertex position at the center of this group is then going to be used by six quads all with different materials. // The vertex position at the center of this group is then going to be used by six quads all with different materials.
// One futher note - we can actually have eight quads sharing a vertex position (imagine two 1x1x10 rows of voxels
// sharing a common edge) but in this case all eight quads will not have different materials.
template< template<typename> class VolumeType, typename VoxelType> template< template<typename> class VolumeType, typename VoxelType>
const uint32_t CubicSurfaceExtractor<VolumeType, VoxelType>::MaxVerticesPerPosition = 6; const uint32_t CubicSurfaceExtractor<VolumeType, VoxelType>::MaxVerticesPerPosition = 6;