public class WireframeCylinder extends AbstractCompositeShape
A wireframe cylinder defined by two end points.

The cylinder extends from startPoint to endPoint with circular rings at both ends. The number of segments determines the smoothness of the circular rings. The wireframe consists of:

  • Two circular rings at the start and end points
  • Vertical lines connecting corresponding vertices between the rings

Usage example:


 // Create a vertical cylinder from Y=100 to Y=200
 LineAppearance appearance = new LineAppearance(2, Color.RED);
 WireframeCylinder cylinder = new WireframeCylinder(
     new Point3D(0, 100, 0),   // start point (bottom)
     new Point3D(0, 200, 0),   // end point (top)
     10,                        // radius
     16,                        // segments
     appearance
 );

 // Create a horizontal cylinder along X axis
 WireframeCylinder pipe = new WireframeCylinder(
     new Point3D(-50, 0, 0),
     new Point3D(50, 0, 0),
     5, 12, appearance
 );
 
See Also:
  • Constructor Details

    • WireframeCylinder

      public WireframeCylinder(Point3D startPoint, Point3D endPoint, double radius, int segments, LineAppearance appearance)
      Constructs a wireframe cylinder between two end points.

      The cylinder has circular rings at both startPoint and endPoint, connected by lines between corresponding vertices. The orientation is automatically calculated from the direction between the two points.

      Parameters:
      startPoint - the center of the first ring
      endPoint - the center of the second ring
      radius - the radius of the cylinder
      segments - the number of segments around the circumference. Higher values create smoother cylinders. Minimum is 3.
      appearance - the line appearance (color, width) used for all lines