Package rope.costume

Class R_Chose

All Implemented Interfaces:
R_Constants, R_Constants_Colour, R_Shape_contract

public class R_Chose extends R_Polygon
  • Constructor Details

    • R_Chose

      public R_Chose(processing.core.PApplet pa, int summits)
      Parameters:
      pa - Processing App
      summits - num of summits of the shape
    • R_Chose

      public R_Chose(processing.core.PApplet pa, int summits, processing.core.PGraphics other)
      Parameters:
      pa - Processing App
      summits - num of summits of the shape
      other - PGraphics rendering target
  • Method Details

    • show

      public void show()
      Specified by:
      show in interface R_Shape_contract
      Overrides:
      show in class R_Polygon
    • calc

      public void calc()
      calculate the summits.
      Overrides:
      calc in class R_Polygon
    • is_pair

      public void is_pair()
    • symmetric_is

      public void symmetric_is(boolean is)
      set the reading radius list to set the summits, true reade from 0 to length and after from length to zero ; if it's false read from 0 to length and after from 0 to length etc...
      Parameters:
      is - set if the shape must be reflective and symetric
    • symmetric_is

      public boolean symmetric_is()
      Returns:
      true if it's symetric
    • radius

      public void radius(float... radius)
      set the number of radius you want, this one cannot exceed the number of summits.
      Parameters:
      radius - list of the radisu of each summits
    • get_radius

      public float[] get_radius()
      return the radius list
      Returns:
      the radius value of each summit.
    • get_radius

      public float get_radius(int index)
      return the targeting radius, is this one is not in the list list return NaN
      Parameters:
      index - of the summits
      Returns:
      radius of target summit