Interface ElementPolygon

All Superinterfaces:
Element, InteractionSource
All Known Implementing Classes:
ElementPolygon

public interface ElementPolygon extends Element

Title: ElementPolygon

Description: A 3D polygon.

Polygons can be closed (a real polygon) or open (polylines).
Version:
March 2005
Author:
Francisco Esquembre
  • Method Details

    • setClosed

      void setClosed(boolean closed)
      Sets whether the polygon is closed
      Parameters:
      closed - boolean
    • isClosed

      boolean isClosed()
      Gets whether the polygon is closed
      Returns:
      boolean
    • setData

      void setData(double[][] data)
      Sets the data for the points of the polygon. Each entry in the data array corresponds to one vertex. If the polygon is closed, the last point will be connected to the first one and the interior will be filled (unless the fill color of the style is set to null).
      Parameters:
      data - double[][] the double[nPoints][3] array with the data
    • setData

      void setData(double[] xArray, double[] yArray, double[] zArray)
      Sets the data for the points of the polygon. Each entry in the data array corresponds to one vertex. If the polygon is closed, the last point will be connected to the first one and the interior will be filled (unless the fill color of the style is set to null). The data array is copied, so subsequence changes to the original array do not affect the polygon, until the setData() method is invoked. If the arrays have different lengths, the last element of the shortest array is repeated to match the longest array.
      Parameters:
      xArray - double[] the double[nPoints] array with the X coordinates
      yArray - double[] the double[nPoints] array with the Y coordinates
      zArray - double[] the double[nPoints] array with the Z coordinates
    • getData

      double[][] getData()
      Gets ths data of the points fo the polygon
      Returns:
      double[][] the double[nPoints][3] array with the data