Class Test

java.lang.Object
org.opentrafficsim.core.geometry.Test

public final class Test extends Object

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static boolean
    Print detailed output.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    printCoordinates(String prefix, List<org.djutils.draw.point.Point2d> points, int fromIndex, int toIndex, String separator)
    Built a string description from part of an array of coordinates.
    static String
    printCoordinates(String prefix, OtsLine2d line, String separator)
    Build a string description from an OtsLine2d.
    static void
    Kink near end of design line.
    static void
    Kink halfway (far from any endpoint).
    static void
    Kink plus decreasing width.
    static void
    Two kinks, (too) close together.
    static void
    Two-segment design line with minimal change of direction.
    static void
    Straight design line with some noise (sufficiently far from the end points).
    static void
    Straight design line with more noise (sufficiently far from the end points).
    static void
    Straight design line with more noise (close to the end points).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • printDetails

      static boolean printDetails
      Print detailed output.
  • Method Details

    • test1

      public static void test1()
      Kink near end of design line.
    • test2

      public static void test2()
      Kink halfway (far from any endpoint).
    • test3

      public static void test3()
      Kink plus decreasing width.
    • test4

      public static void test4()
      Two kinks, (too) close together.
    • test5

      public static void test5()
      Two-segment design line with minimal change of direction.
    • test6

      public static void test6()
      Straight design line with some noise (sufficiently far from the end points).
    • test7

      public static void test7()
      Straight design line with more noise (sufficiently far from the end points).
    • test8

      public static void test8()
      Straight design line with more noise (close to the end points).
    • printCoordinates

      public static String printCoordinates(String prefix, OtsLine2d line, String separator)
      Build a string description from an OtsLine2d.
      Parameters:
      prefix - text to put before the coordinates
      line - the line for which to print the points
      separator - prepended to each coordinate
      Returns:
      description of the OtsLine2d
    • printCoordinates

      public static String printCoordinates(String prefix, List<org.djutils.draw.point.Point2d> points, int fromIndex, int toIndex, String separator)
      Built a string description from part of an array of coordinates.
      Parameters:
      prefix - text to put before the output
      points - the coordinates to print
      fromIndex - index of the first coordinate to print
      toIndex - one higher than the index of the last coordinate to print
      separator - prepended to each coordinate
      Returns:
      description of the selected part of the array of coordinates