Class CandidatePlaneRobust
java.lang.Object
cz.fidentis.analyst.engines.symmetry.impl.CandidatePlaneRobust
- All Implemented Interfaces:
Comparable<CandidatePlaneRobust>
- Direct Known Subclasses:
CandidatePlaneRobustMesh
A symmetry plane extends standard plane with functions related to the
similarity of planes and the measure of their quality (symmetry precision).
This version is used by the robust symmetry calculation methods.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCandidatePlaneRobust
(Plane plane) New candidate symmetry plane constructed from an original plane.Candidate symmetry plane constructed by averaging two planes.CandidatePlaneRobust
(javax.vecmath.Tuple3d point1, javax.vecmath.Tuple3d point2, double avgDist) New candidate symmetry plane constructed from two points. -
Method Summary
Modifier and TypeMethodDescriptionint
protected double
Returns the closest plane from the cache to this plane.double
javax.vecmath.Vector4d
Returns a 4D vector usable as a location for the storage in theUniformGrid4d
javax.vecmath.Vector3d
int
getPlane()
double
Returns the symmetry measure computed by thegetSymmetryMeasure()
.void
measureSymmetry
(List<MeshPoint> points, UniformGrid3d<MeshPoint> grid, double alpha) Symmetry measurement based on the Wendland’s function without additional weights The plane is normalized andnumAvg
set to zero!protected void
protected void
setSymmetryMeasure
(double symmetry) protected static double
similarityFunction
(double length, double alpha) A similarity function Phi.toString()
-
Field Details
-
GRID_SIZE
public static final double GRID_SIZE- See Also:
-
-
Constructor Details
-
CandidatePlaneRobust
public CandidatePlaneRobust(javax.vecmath.Tuple3d point1, javax.vecmath.Tuple3d point2, double avgDist) New candidate symmetry plane constructed from two points.- Parameters:
point1
- point in spacepoint2
- point in spaceavgDist
- the average distance between vertices and their centroid- Throws:
IllegalArgumentException
- if the @code{plane} argument is null
-
CandidatePlaneRobust
Candidate symmetry plane constructed by averaging two planes.- Parameters:
pu
- the closest existing candidatepv
- newly created candidate
-
CandidatePlaneRobust
New candidate symmetry plane constructed from an original plane.- Parameters:
plane
- Original plane. Must not benull
-
-
Method Details
-
getNormal
public javax.vecmath.Vector3d getNormal() -
getDistance
public double getDistance() -
getPlane
-
getClosestPlane
Returns the closest plane from the cache to this plane.- Parameters:
cache
-- Returns:
- the closest plane from the cache to this plane.
-
getEstimationVector
public javax.vecmath.Vector4d getEstimationVector()Returns a 4D vector usable as a location for the storage in theUniformGrid4d
- Returns:
- a 4D vector usable as a location for the storage in the
UniformGrid4d
-
getNumAverages
public int getNumAverages() -
distance
- Parameters:
pv
- the second plane- Returns:
- planes distance
-
measureSymmetry
Symmetry measurement based on the Wendland’s function without additional weights The plane is normalized andnumAvg
set to zero!- Parameters:
points
- Downsampled point cloudgrid
- The same cloud stored in the uniform gridalpha
- the average distance between vertices and their centroid
-
getSymmetryMeasure
public double getSymmetryMeasure()Returns the symmetry measure computed by thegetSymmetryMeasure()
.- Returns:
- the symmetry measure
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CandidatePlaneRobust>
-
toString
-
similarityFunction
protected static double similarityFunction(double length, double alpha) A similarity function Phi.- Parameters:
length
-alpha
-- Returns:
- similarity value
-
setSymmetryMeasure
protected void setSymmetryMeasure(double symmetry) -
normalizeIfNeeded
protected void normalizeIfNeeded()
-