public class WireframeArrow extends AbstractCompositeShape
A 3D wireframe arrow shape composed of a cylindrical body and a conical tip.

The arrow points from a start point to an end point, with the tip located at the end point. The wireframe consists of:

  • Body: Two circular rings connected by lines between corresponding vertices
  • Tip: A circular ring at the cone base with lines to the apex

Usage example:


 // Create a red arrow pointing from origin to (100, -50, 200)
 LineAppearance appearance = new LineAppearance(2, Color.RED);
 WireframeArrow arrow = new WireframeArrow(
     new Point3D(0, 0, 0),      // start point
     new Point3D(100, -50, 200), // end point
     8,                         // body radius
     20,                        // tip radius
     40,                        // tip length
     16,                        // segments
     appearance
 );
 shapeCollection.addShape(arrow);
 
See Also:
  • Constructor Details

    • WireframeArrow

      public WireframeArrow(Point3D startPoint, Point3D endPoint, double bodyRadius, LineAppearance appearance)
      Constructs a 3D wireframe arrow pointing from start to end with sensible defaults.

      This simplified constructor automatically calculates the tip radius as 2.5 times the body radius, the tip length as 5 times the body radius, and uses 12 segments for smoothness. For custom tip dimensions or segment count, use the full constructor.

      Parameters:
      startPoint - the origin point of the arrow (where the body starts)
      endPoint - the destination point of the arrow (where the tip points to)
      bodyRadius - the radius of the cylindrical body; tip dimensions are calculated automatically from this value
      appearance - the line appearance (color, width) used for all lines
    • WireframeArrow

      public WireframeArrow(Point3D startPoint, Point3D endPoint, double bodyRadius, double tipRadius, double tipLength, int segments, LineAppearance appearance)
      Constructs a 3D wireframe arrow pointing from start to end with full control over all dimensions.

      The arrow consists of a cylindrical body extending from the start point towards the end, and a conical tip at the end point. If the distance between start and end is less than or equal to the tip length, only the cone tip is rendered.

      Parameters:
      startPoint - the origin point of the arrow (where the body starts)
      endPoint - the destination point of the arrow (where the tip points to)
      bodyRadius - the radius of the cylindrical body
      tipRadius - the radius of the cone base at the tip
      tipLength - the length of the conical tip
      segments - the number of segments for cylinder and cone smoothness. Higher values create smoother arrows. Minimum is 3.
      appearance - the line appearance (color, width) used for all lines