Class ElementSegment

java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.ElementSegment
All Implemented Interfaces:
Element, ElementSegment, InteractionSource
Direct Known Subclasses:
ElementArrow

public class ElementSegment extends Element implements ElementSegment

Title: ElementSegment

Description: A Segment using the painter's algorithm

Version:
March 2005
Author:
Francisco Esquembre
  • Field Details

    • div

      protected int div
    • aCoord

      protected int[] aCoord
    • bCoord

      protected int[] bCoord
    • objects

      protected org.opensourcephysics.display3d.simple3d.Object3D[] objects
  • Constructor Details

    • ElementSegment

      public ElementSegment()
  • Method Details

    • getTargetHit

      protected InteractionTarget getTargetHit(int x, int y)
      Description copied from class: Element
      Gets the target that is under the (x,y) position of the screen
      Overrides:
      getTargetHit in class Element
      Parameters:
      x - int
      y - int
      Returns:
      InteractionTarget
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns an XML.ObjectLoader to save and load object data.
      Returns:
      the XML.ObjectLoader