java.lang.Object
org.bzdev.p3d.P3d
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass containing static methods for adding rectangles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprintEdgeErrors(Appendable out, List<Model3D.Edge> elist) Print errors given a list of edges.static voidprintSteppedGridBuilderCalls(Appendable out, String prefix, SteppedGrid.Builder builder) Print stack traces associated with an instance ofSteppedGrid.Builder.static voidprintTag(Appendable out, String prefix, Object tag) Print a tag used to label Model3D triangles.static voidprintTriangleErrors(Appendable out, List<Model3D.Triangle> tlist) Print errors given a list of triangles.
-
Constructor Details
-
P3d
public P3d()
-
-
Method Details
-
printTag
Print a tag used to label Model3D triangles.- Parameters:
out- the outputprefix- a prefix to print at the start of a linetag- 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 outputtlist- a list of triangles that caused an error- Throws:
IOException- an I/O error occurred
-
printEdgeErrors
Print errors given a list of edges.- Parameters:
out- the outputelist- 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 ofSteppedGrid.Builder. IfSteppedGrid.Builder.create()orSteppedGrid.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 appendableprefix- a prefix that starts each linebuilder- theSteppedGrid.Builderthat failed- Throws:
IOException- if an IO error occurred
-