Class ReferenceFrame

All Implemented Interfaces:
PropertyChangeListener, EventListener

public class ReferenceFrame extends ImageCoordSystem implements PropertyChangeListener
A ReferenceFrame is an image coordinate system with its origin determined by the position of a PointMass.
Author:
Douglas Brown
  • Constructor Details

    • ReferenceFrame

      public ReferenceFrame(ImageCoordSystem coords, PointMass originTrack)
      Constructs a ReferenceFrame with a default initial length.
      Parameters:
      coords - the image coordinate system providing angle and scale data
      originTrack - the point mass providing origin data
  • Method Details

    • setFixedOrigin

      public void setFixedOrigin(boolean fixed, int n)
      Overrides ImageCoordSystem setFixedOrigin method. Origin is never fixed for a reference frame.
      Overrides:
      setFixedOrigin in class ImageCoordSystem
      Parameters:
      fixed - ignored
      n - the frame number
    • setLocked

      public void setLocked(boolean locked)
      Overrides setLocked method.
      Overrides:
      setLocked in class ImageCoordSystem
      Parameters:
      locked - true to lock the coordinate system
    • isLocked

      public boolean isLocked()
      Overrides isLocked method.
      Overrides:
      isLocked in class ImageCoordSystem
      Returns:
      true if this is locked
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Responds to property change events.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      e - the property change event
    • updateAllTransforms

      protected void updateAllTransforms()
      Description copied from class: ImageCoordSystem
      Updates all transforms used to convert between drawing spaces.
      Overrides:
      updateAllTransforms in class ImageCoordSystem
    • getCoords

      public ImageCoordSystem getCoords()
      Gets the parent image coordinate system. The parent coords are returned after setting its angles and scales to match this.
      Returns:
      the parent image coordinate system
    • getOriginTrack

      public PointMass getOriginTrack()
      Gets the origin track of this reference frame.
      Returns:
      the point mass supplying origin data
    • setOrigins

      protected void setOrigins()
      Sets the origins of the image coordinate system.