Package org.bzdev.p3d

Class P3d

java.lang.Object
org.bzdev.p3d.P3d

public class P3d extends Object
Methods for common cases that occur when configuring an instance of Model3D or when reporting errors. These methods are all static and are provided for convenience.
  • Constructor Details

    • P3d

      public P3d()
  • Method Details

    • printTag

      public static void printTag(Appendable out, String prefix, Object tag) throws IOException
      Print a tag used to label Model3D triangles.
      Parameters:
      out - the output
      prefix - a prefix to print at the start of a line
      tag - the tag itself
      Throws:
      IOException - an I/O error occurred
    • printTriangleErrors

      public static void printTriangleErrors(Appendable out, List<Model3D.Triangle> tlist) throws IOException
      Print errors given a list of triangles.
      Parameters:
      out - the output
      tlist - a list of triangles that caused an error
      Throws:
      IOException - an I/O error occurred
    • printEdgeErrors

      public static void printEdgeErrors(Appendable out, List<Model3D.Edge> elist) throws IOException
      Print errors given a list of edges.
      Parameters:
      out - the output
      elist - a list of edges that caused an error
      Throws:
      IOException - an I/O error occurred
    • printSteppedGridBuilderCalls

      public static void printSteppedGridBuilderCalls(Appendable out, String prefix, SteppedGrid.Builder builder) throws IOException
      Print stack traces associated with an instance of SteppedGrid.Builder. If SteppedGrid.Builder.create() or SteppedGrid.Builder.create(Model3DOps) throws an exception, the exception does not indicate directly which calls were responsible. This method will print the stack traces for those calls (typically addRectangle or addRectangels methods).
      Parameters:
      out - the output appendable
      prefix - a prefix that starts each line
      builder - the SteppedGrid.Builder that failed
      Throws:
      IOException - if an IO error occurred