Class PoissonDiskSubSamplingGPU
java.lang.Object
cz.fidentis.analyst.engines.sampling.impl.PointSamplingVisitorImpl
cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling
cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSamplingGPU
- All Implemented Interfaces:
MeshVisitor
,PointSamplingVisitor
This implementation overrides
PoissonDiskSubSampling
sample generation
to use GPU-based Ray Casting algorithm implemented in OpenCl.
Each instance creates new OpenCL context and is responsible for it's disposing before destruction.-
Nested Class Summary
Nested classes/interfaces inherited from class cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling
PoissonDiskSubSampling.ActiveNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final double
static final double
Fields inherited from class cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling
facets, POISSON_MAX_ITERATIONS, smoothing
-
Constructor Summary
ConstructorsConstructorDescriptionPoissonDiskSubSamplingGPU
(int max, MeshTriangle.Smoothing smoothing) Constructor for the maximum number of samples. -
Method Summary
Methods inherited from class cz.fidentis.analyst.engines.sampling.impl.PoissonDiskSubSampling
addSamplesToKdTree, createProjectorFromGrid, distanceToNumSamples, filterRaysIntersections, generatePoissonSamples, isBackedByOrigMesh, rotateProjectorPlane, setRequiredSamples, visitMeshFacet
Methods inherited from class cz.fidentis.analyst.engines.sampling.impl.PointSamplingVisitorImpl
getRequiredSamples, setRealSamples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.mesh.MeshVisitor
isThreadSafe
-
Field Details
-
PROJECTOR_MAX_ANGLE
public static final double PROJECTOR_MAX_ANGLE- See Also:
-
PROJECTOR_MIN_ROTATION
public static final double PROJECTOR_MIN_ROTATION- See Also:
-
MIN_PROJECTION_ITERATIONS
public static final int MIN_PROJECTION_ITERATIONS- See Also:
-
-
Constructor Details
-
PoissonDiskSubSamplingGPU
Constructor for the maximum number of samples. The density (minimal distance between samples) is approximated so that the mean absolut percentage error (MAPE) of this approximation is ~ 5.27%, and the median absolute percentage error (MDAPE) is ~ 4.52%.- Parameters:
max
- Required number of samples. Must be bigger than zerosmoothing
- Surface samples can be equipped by interpolated normal and or adapted position to interpolate surface curvature. UseSmoothing.NONE
to simply get samples from triangle planes without normal vectors.- Throws:
IllegalArgumentException
- if the input parameter is wrong
-
-
Method Details
-
getSamples
Description copied from interface:PointSamplingVisitor
Returns a list of vertices reduced according to the strategy. The returned mesh points are backed by original points.- Specified by:
getSamples
in interfacePointSamplingVisitor
- Overrides:
getSamples
in classPoissonDiskSubSampling
- Returns:
- selected vertices of inspected meshes
-
toString
- Overrides:
toString
in classPoissonDiskSubSampling
-
dispose
public void dispose()Description copied from interface:MeshVisitor
Dispose all disposable resources this visitor was using. Distances can still be retrieved after calling this method. Subclasses should override this method if they need to dispose something.
-