Interface ElementTrail

All Superinterfaces:
Data, Element, InteractionSource
All Known Implementing Classes:
ElementTrail

public interface ElementTrail extends Element, Data

Title: ElementTrail

Description:

A trail of 3D pixels on the screen.

This object is often used to show the path of a moving object.
Version:
March 2005
Author:
Francisco Esquembre
  • Method Details

    • addPoint

      void addPoint(double x, double y, double z)
      Adds a new (x,y,z) point to the trail.
      Parameters:
      x - double
      y - double
      z - double
    • addPoint

      void addPoint(double[] point)
      Adds a new double[] point to the trail.
      Parameters:
      point - double[] The array with the coordinates of the point. If the length of the array is 2, the coordinates are asumed to be X and Y (Z=0). If it is 3, then X, Y, and Z (as usual).
    • moveToPoint

      void moveToPoint(double x, double y, double z)
      Starts a new (x,y,z) trail segment by moving to a new point without drawing. (Equivalent to setting the connected flag to false and adding one singlepoint, then setting the flag back to true.)
      Parameters:
      x - double
      y - double
      z - double
    • setMaximumPoints

      void setMaximumPoints(int maximum)
      Sets the maximum number of points for the trail. Once the maximum is reached, adding a new point will cause remotion of the first one. This is useful to keep trails down to a reasonable size, since very long trails can slow down the rendering (in certain implementations). If the value is 0 (the default) the trail grows forever without discarding old points.
      Parameters:
      maximum - int
    • getMaximumPoints

      int getMaximumPoints()
      Returns the maximum number of points allowed for the trail
      Returns:
      int
    • setConnected

      void setConnected(boolean connected)
      Sets the connected flag. Successive points are connected by a segment if this flag is true. Each point is marked as a colored pixel if the trail is not connected. Setting it temporarily to false helps create discontinuous trails.
      Parameters:
      connected - boolean
    • isConnected

      boolean isConnected()
      Gets the connected flag.
      See Also:
    • clear

      void clear()
      Clears all points from the trail.
    • setXLabel

      void setXLabel(String _label)
      Sets the label of the X coordinate when the data is displayed in a table
      Parameters:
      _label -
    • setYLabel

      void setYLabel(String _label)
      Sets the label of the Y coordinate when the data is displayed in a table
      Parameters:
      _label -
    • setZLabel

      void setZLabel(String _label)
      Sets the label of the Z coordinate when the data is displayed in a table
      Parameters:
      _label -
    • setGhostPoint

      void setGhostPoint(double[] point, boolean connected)
      Sets a temporary point that is displayed as the last point of the trail but is not meant to be a permanent part of the trail. The point can be changed at will and even removed (by passing a null array as point), but if not null, it is always drawn following the last effective point of the trail. This is used by MultiTrail to implement the skip parameter.
      Parameters:
      point - the double[3] data with the point. null if there is no such point
      connected - whether this point is connected to the previous one