public class WireframeCone extends AbstractCompositeShape
A wireframe cone that can be oriented in any direction.

The cone has a circular base and a single apex (tip) point. The wireframe consists of:

  • A circular ring at the base
  • Lines from each base vertex to the apex

Two constructors are provided for different use cases:

  • Directional (recommended): Specify apex point and base center point. The cone points from apex toward the base center. This allows arbitrary orientation and is the most intuitive API.
  • Y-axis aligned: Specify base center, radius, and height. The cone points in -Y direction (apex at lower Y). Useful for simple vertical cones.

Usage examples:


 // Directional constructor: cone pointing from apex toward base
 LineAppearance appearance = new LineAppearance(2, Color.RED);
 WireframeCone directionalCone = new WireframeCone(
     new Point3D(0, -100, 0),   // apex (tip of the cone)
     new Point3D(0, 50, 0),     // baseCenter (cone points toward this)
     50,                        // radius of the circular base
     16,                        // segments
     appearance
 );

 // Y-axis aligned constructor: cone pointing upward
 WireframeCone verticalCone = new WireframeCone(
     new Point3D(0, 0, 300),    // baseCenter
     50,                        // radius
     100,                       // height
     16,                        // segments
     appearance
 );
 
See Also:
  • Constructor Details

    • WireframeCone

      public WireframeCone(Point3D apexPoint, Point3D baseCenterPoint, double radius, int segments, LineAppearance appearance)
      Constructs a wireframe cone pointing from apex toward base center.

      This is the recommended constructor for placing cones in 3D space. The cone's apex (tip) is at apexPoint, and the circular base is centered at baseCenterPoint. The cone points in the direction from apex to base center.

      Coordinate interpretation:

      • apexPoint - the sharp tip of the cone
      • baseCenterPoint - the center of the circular base; the cone "points" in this direction from the apex
      • The distance between apex and base center determines the cone height
      Parameters:
      apexPoint - the position of the cone's tip (apex)
      baseCenterPoint - the center point of the circular base; the cone points from apex toward this point
      radius - the radius of the circular base
      segments - the number of segments around the circumference. Higher values create smoother cones. Minimum is 3.
      appearance - the line appearance (color, width) used for all lines
    • WireframeCone

      public WireframeCone(Point3D baseCenter, double radius, double height, int segments, LineAppearance appearance)
      Constructs a wireframe cone with circular base centered at the given point, pointing in the -Y direction.

      This constructor creates a Y-axis aligned cone. The apex is positioned at baseCenter.y - height (above the base in the negative Y direction). For cones pointing in arbitrary directions, use WireframeCone(Point3D, Point3D, double, int, LineAppearance) instead.

      Coordinate system: The cone points in -Y direction (apex at lower Y). The base is at Y=baseCenter.y, and the apex is at Y=baseCenter.y - height. In Sixth 3D's coordinate system, "up" visually is negative Y.

      Parameters:
      baseCenter - the center point of the cone's circular base in 3D space
      radius - the radius of the circular base
      height - the height of the cone from base center to apex
      segments - the number of segments around the circumference. Higher values create smoother cones. Minimum is 3.
      appearance - the line appearance (color, width) used for all lines