Direct Known Subclasses:
WireframeCube

public class WireframeBox extends AbstractCompositeShape
A wireframe box (rectangular parallelepiped) composed of 12 line segments representing the edges of the box. The box is axis-aligned, defined by two opposite corner points.

The wireframe consists of four edges along each axis: four edges parallel to X, four parallel to Y, and four parallel to Z.

Usage example:


 LineAppearance appearance = new LineAppearance(2, Color.GREEN);
 Point3D corner1 = new Point3D(-50, -50, -50);
 Point3D corner2 = new Point3D(50, 50, 50);
 WireframeBox box = new WireframeBox(corner1, corner2, appearance);
 shapeCollection.addShape(box);
 
See Also:
  • Constructor Details

    • WireframeBox

      public WireframeBox(Box box, LineAppearance appearance)
      Constructs a wireframe box from a Box geometry object.
      Parameters:
      box - the axis-aligned box defining the two opposite corners
      appearance - the line appearance (color, width) used for all 12 edges
    • WireframeBox

      public WireframeBox(Point3D p1, Point3D p2, LineAppearance appearance)
      Constructs a wireframe box from two opposite corner points. The corners do not need to be in any particular min/max order; the constructor uses each coordinate independently to form all eight vertices of the box.
      Parameters:
      p1 - the first corner point of the box
      p2 - the diagonally opposite corner point of the box
      appearance - the line appearance (color, width) used for all 12 edges