Class PointSamplingVisitorImpl
java.lang.Object
cz.fidentis.analyst.engines.sampling.impl.PointSamplingVisitorImpl
- All Implemented Interfaces:
MeshVisitor
,PointSamplingVisitor
- Direct Known Subclasses:
CurvatureSampling
,NoSampling
,PoissonDiskSubSampling
,RandomSampling
,UniformSpaceSampling
An abstract class for point sampling methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of required samples.Returns a list of vertices reduced according to the strategy.abstract boolean
Iftrue
, then the returned points samples are points from the original mesh.protected void
setRealSamples
(int realSamples) void
setRequiredSamples
(int max) Changes the number of required samples.toString()
abstract void
visitMeshFacet
(MeshFacet facet) The inspection method to be implemented by specific visitors.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
-
PointSamplingVisitorImpl
protected PointSamplingVisitorImpl(int max) Constructor.- Parameters:
max
- Maximal number of required samples. Must be bigger than zero- Throws:
IllegalArgumentException
- if the input parameter is wrong
-
-
Method Details
-
visitMeshFacet
Description copied from interface:MeshVisitor
The inspection method to be implemented by specific visitors.- Specified by:
visitMeshFacet
in interfaceMeshVisitor
- Specified by:
visitMeshFacet
in interfacePointSamplingVisitor
- Parameters:
facet
- Mesh facet to be visited.
-
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
- Returns:
- selected vertices of inspected meshes
-
isBackedByOrigMesh
public abstract 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
- Returns:
true
if the point samples include points of the original mesh
-
setRequiredSamples
public void setRequiredSamples(int max) Description copied from interface:PointSamplingVisitor
Changes the number of required samples.- Specified by:
setRequiredSamples
in interfacePointSamplingVisitor
- Parameters:
max
- Maximal number of vertices. Must be bigger than zero
-
getRequiredSamples
public int getRequiredSamples()Returns the number of required samples.- Specified by:
getRequiredSamples
in interfacePointSamplingVisitor
- Returns:
- the number of required samples
-
toString
-
setRealSamples
protected void setRealSamples(int realSamples)
-