Class AngleMonitor

  • All Implemented Interfaces:

    public class AngleMonitor
    extends MeasurementMonitor
    Monitor for measuring angle between 3 components, the first 2 determines a line, the second 2 another. The angle will be determined by the 2 lines. Component can be any GraphicComponent with a proper getCoordinates() function returning a vector.
    Marvin 4.0.2
    • Constructor Detail

      • AngleMonitor

        public AngleMonitor()
        Creates a new instance of AngleMonitor
    • Method Detail

      • measurement

        public double measurement()
        Does the angle measurement.
        Specified by:
        measurement in class MeasurementMonitor
        the angle in degrees
      • maximumItemCount

        public int maximumItemCount()
        Returns 3 as the angle is measured between 3 elements.
        Specified by:
        maximumItemCount in class Monitor
      • getCoordinates

        public void getCoordinates​(float[] c)
        Returns the centroid of the selected elements.
        getCoordinates in class MeasurementMonitor
        c - allocated array where coordinates will be put
      • draw

        public void draw()
        Draws the anglemonitor as lines between the components, and an arc between the lines.
        draw in class GraphicComponent