Class UniformSurfaceSampling
java.lang.Object
cz.fidentis.analyst.engines.sampling.impl.PointSamplingVisitorImpl
cz.fidentis.analyst.engines.sampling.impl.UniformSpaceSampling
cz.fidentis.analyst.engines.sampling.impl.UniformSurfaceSampling
- All Implemented Interfaces:
MeshVisitor
,PointSamplingVisitor
Similar downsampling strategy to the
UniformSpaceSampling
.
However, a random vertex from the mesh is selected from each non-empty cell instead
of computing a new average point. Therefore, the samples lie on the mesh surface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of vertices reduced according to the strategy.boolean
Iftrue
, then the returned points samples are points from the original mesh.toString()
Methods inherited from class cz.fidentis.analyst.engines.sampling.impl.UniformSpaceSampling
createGrid, getAvgDist, getOrigPoints, visitMeshFacet
Methods inherited from class cz.fidentis.analyst.engines.sampling.impl.PointSamplingVisitorImpl
getRequiredSamples, setRealSamples, setRequiredSamples
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
dispose, isThreadSafe
-
Constructor Details
-
UniformSurfaceSampling
public UniformSurfaceSampling(int max) Constructor.- Parameters:
max
- Required number of samples. Must be bigger than zero- Throws:
IllegalArgumentException
- if the input parameter is wrong
-
-
Method Details
-
isBackedByOrigMesh
public boolean isBackedByOrigMesh()Description copied from interface:PointSamplingVisitor
Iftrue
, then the returned points samples are points from the original mesh. Therefore, the transformation of the original mesh also transform these samples. Iffalse
, then new points are returned that are independent on the original mesh.- Specified by:
isBackedByOrigMesh
in interfacePointSamplingVisitor
- Overrides:
isBackedByOrigMesh
in classUniformSpaceSampling
- Returns:
true
if the point samples include points of the original mesh
-
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 classUniformSpaceSampling
- Returns:
- selected vertices of inspected meshes
-
toString
- Overrides:
toString
in classUniformSpaceSampling
-