Package org.djutils.draw.line
Class LineSegment3dTest
java.lang.Object
org.djutils.draw.line.LineSegment3dTest
Segment3dTest.java.
Copyright (c) 2020-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTest the closestPointOnSegment method.voidTest the constructors.voidTest the equals and hasCode methods.voidTest the getLocation methods.voidTest the project methods.voidTest the reverse operation.voidTest the toExcel method.voidverifySegment(String description, LineSegment3d segment, double expectedStartX, double expectedStartY, double expectedStartZ, double expectedEndX, double expectedEndY, double expectedEndZ) Check that a segment has all the right values.
-
Constructor Details
-
LineSegment3dTest
public LineSegment3dTest()
-
-
Method Details
-
constructorTest
Test the constructors. -
verifySegment
public void verifySegment(String description, LineSegment3d segment, double expectedStartX, double expectedStartY, double expectedStartZ, double expectedEndX, double expectedEndY, double expectedEndZ) Check that a segment has all the right values.- Parameters:
description- description of the testsegment- the segmentexpectedStartX- the expected x value for the start of the segmentexpectedStartY- the expected y value for the start of the segmentexpectedStartZ- the expected z value for the start of the segmentexpectedEndX- the expected x value for the end of the segmentexpectedEndY- the expected y value for the end of the segmentexpectedEndZ- the expected y value for the end of the segment
-
locationTest
Test the getLocation methods. -
closestPointOnSegmentTest
Test the closestPointOnSegment method. -
testReverse
Test the reverse operation. -
testProject
Test the project methods. -
testToExcel
Test the toExcel method.- Throws:
NumberFormatException- if that happens, this test has failed
-
equalsAndHashCodeTest
Test the equals and hasCode methods.
-