Fixed bug with RawVolume always starting coordinates at (0,0,0).
Removed Filters.h/.inl Added Summed Area Table support to LowPassFilter. Added test for low pass filter.
This commit is contained in:
@ -21,10 +21,11 @@ freely, subject to the following restrictions:
|
||||
distribution.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "PolyVoxCore/Filters.h"
|
||||
#include "PolyVoxCore/Log.h"
|
||||
#include "PolyVoxCore/MaterialDensityPair.h"
|
||||
#include "PolyVoxCore/LargeVolume.h"
|
||||
#include "PolyVoxCore/LowPassFilter.h"
|
||||
#include "PolyVoxCore/RawVolume.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
#include "PolyVoxImpl/Utility.h"
|
||||
|
||||
@ -101,8 +102,11 @@ int main(int argc, char *argv[])
|
||||
createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity());
|
||||
|
||||
//Smooth part of the volume
|
||||
smoothRegion<LargeVolume, MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
smoothRegion<LargeVolume, MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
RawVolume<MaterialDensityPair44> tempVolume(Region(0,0,0,128, 128, 128));
|
||||
LowPassFilter<LargeVolume, RawVolume, MaterialDensityPair44> pass1(&volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3);
|
||||
pass1.executeSAT();
|
||||
LowPassFilter<RawVolume, LargeVolume, MaterialDensityPair44> pass2(&tempVolume, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), &volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(126, 126, 126)), 3);
|
||||
pass2.executeSAT();
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@ -29,7 +29,6 @@ freely, subject to the following restrictions:
|
||||
#include "PolyVoxCore/SurfaceExtractor.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
#include "PolyVoxCore/LargeVolume.h"
|
||||
#include "PolyVoxCore/Filters.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
|
@ -24,7 +24,6 @@ freely, subject to the following restrictions:
|
||||
#include "OpenGLWidget.h"
|
||||
|
||||
#include "PolyVoxCore/Density.h"
|
||||
#include "PolyVoxCore/Filters.h"
|
||||
#include "PolyVoxCore/SurfaceExtractor.h"
|
||||
#include "PolyVoxCore/SurfaceMesh.h"
|
||||
#include "PolyVoxCore/RawVolume.h"
|
||||
@ -86,10 +85,10 @@ int main(int argc, char *argv[])
|
||||
SimpleVolume<Density8> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63)));
|
||||
createSphereInVolume(volData, 28);
|
||||
|
||||
//Smooth the data
|
||||
smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
//Smooth the data - should reimplement this using LowPassFilter
|
||||
//smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
//smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
//smoothRegion<SimpleVolume, Density8>(volData, volData.getEnclosingRegion());
|
||||
|
||||
RawVolume<Density8> volDataLowLOD(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(15, 31, 31)));
|
||||
|
||||
|
Reference in New Issue
Block a user