Package cz.fidentis.analyst.data.shapes
Class CrossSection2D
java.lang.Object
cz.fidentis.analyst.data.shapes.CrossSection2D
A 2D cross-section curve computed from
CrossSection3D
.-
Constructor Summary
ConstructorsConstructorDescriptionCrossSection2D
(List<List<javax.vecmath.Point2d>> curveSegments) Constructor used in tests.CrossSection2D
(List<List<javax.vecmath.Point2d>> curveSegments, List<javax.vecmath.Point2d> featurePoints) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionList
<javax.vecmath.Point2d> double
hausdorffDistance
(CrossSection2D curve, int sampling) Returns 2D Hausdorff distance.boolean
isEndPoint
(javax.vecmath.Point2d point) Return true if given point is an endpoint of a curve.void
setNormalAt
(int index, Line2D normal) Sets normal vector at the given indexvoid
setNormals
(List<Line2D> normals) subSample
(int sampling) Returns a reduced curve according to sampling
-
Constructor Details
-
CrossSection2D
Constructor used in tests.- Parameters:
curveSegments
- list of curve segments
-
CrossSection2D
public CrossSection2D(List<List<javax.vecmath.Point2d>> curveSegments, List<javax.vecmath.Point2d> featurePoints) Constructor. Projects the given 3d curve and its feature points into 2d.- Parameters:
curveSegments
- list of curve segmentsfeaturePoints
- 2d feature points lying close to the curve
-
-
Method Details
-
getFeaturePoints
-
getCurveSegments
-
getNormals
-
setNormals
-
setNormalAt
Sets normal vector at the given index- Parameters:
index
- indexnormal
- normal vector
-
subSample
Returns a reduced curve according to sampling- Parameters:
sampling
- numerical representation of how much we want to keep the original curve 100 will keep the original, 0 will be fully reduced- Returns:
- reduced list of points
-
hausdorffDistance
Returns 2D Hausdorff distance.- Parameters:
curve
- Another curvesampling
- Sub-sampling- Returns:
- 2D Hausdorff distance
-
isEndPoint
public boolean isEndPoint(javax.vecmath.Point2d point) Return true if given point is an endpoint of a curve.- Parameters:
point
- point of curve- Returns:
true
if point is and endpoint of one of curve segments
-