Package rope.mesh

Class R_Shape

All Implemented Interfaces:
R_Constants, R_Constants_Colour
Direct Known Subclasses:
R_Circle, R_Costume, R_House, R_Icosahedron, R_Polygon, R_Primitive, R_Shape_template, R_Star, R_Virus

public class R_Shape extends R_Graphic
  • Constructor Details

    • R_Shape

      public R_Shape(processing.core.PApplet pa)
      Parameters:
      pa -
    • R_Shape

      public R_Shape(processing.core.PApplet pa, processing.core.PGraphics other)
      Parameters:
      pa -
      other -
    • R_Shape

      public R_Shape(processing.core.PApplet pa, int summits)
      Parameters:
      pa -
      summits -
    • R_Shape

      public R_Shape(processing.core.PApplet pa, int summits, processing.core.PGraphics other)
      Parameters:
      pa -
      summits -
      other -
  • Method Details

    • id

      public void id(int id)
      Parameters:
      id - give an id to your R_Shape by default all the shape have 0
    • id

      public int id()
      Returns:
      the id of your R_Shape
    • pos

      public vec3 pos()
      Returns:
      vec3 pos of your P_Shape
    • pos

      public void pos(float p)
      Parameters:
      p -
    • pos

      public void pos(float x, float y)
      Parameters:
      x -
      y -
    • pos

      public void pos(float x, float y, float z)
      Parameters:
      x -
      y -
      z -
    • pos

      public void pos(ivec pos)
      Parameters:
      pos -
    • pos

      public void pos(vec pos)
      Parameters:
      pos -
    • size

      public vec3 size()
      Returns:
    • size

      public void size(float s)
      Parameters:
      s -
    • size

      public void size(float w, float h)
      Parameters:
      w -
      h -
    • size

      public void size(float w, float h, float d)
      Parameters:
      w -
      h -
      d -
    • size

      public void size(ivec size)
      Parameters:
      size -
    • size

      public void size(vec size)
      Parameters:
      size -
    • angle

      public vec3 angle()
      Returns:
      angle
    • angle

      public void angle(float x, float y, float z)
      Parameters:
      x -
      y -
      z -
    • angle

      public void angle(vec angle)
      Parameters:
      angle -
    • angle_x

      public void angle_x(float value)
      set angle x to rotate
      Parameters:
      value -
    • angle_x

      public float angle_x()
      Returns:
      angle x
    • angle_y

      public void angle_y(float value)
      set angle y to rotate
      Parameters:
      value -
    • angle_y

      public float angle_y()
      Returns:
      angle y
    • angle_z

      public void angle_z(float value)
      set angle z to rotate
      Parameters:
      value -
    • angle_z

      public float angle_z()
      Returns:
      angle z
    • use_pos_is

      public boolean use_pos_is()
      Returns:
    • use_pos_is

      public void use_pos_is(boolean is)
      Parameters:
      is -
    • reset_is

      public void reset_is(boolean is)
      Parameters:
      is -
    • reset_is

      public boolean reset_is()
      Returns:
    • clear

      public void clear()
    • get_summits

      public int get_summits()
      Returns:
      the num of summits
    • set_summits

      public void set_summits(int summits)
      Parameters:
      summits -
    • add

      @Deprecated public void add(float x, float y)
      Deprecated.
      instead use void add_point(float x, float y)
      Parameters:
      x -
      y -
    • add

      @Deprecated public void add(float x, float y, float z)
      Deprecated.
      instead use void add_point(float x, float y, float z)
      Parameters:
      x -
      y -
      z -
    • add

      @Deprecated public void add(vec... coord)
      Deprecated.
      instead use void add_points(vec... coord)
      Parameters:
      coord - a list of vec
    • add_point

      public void add_point(float x, float y)
      Parameters:
      x -
      y -
    • add_point

      public void add_point(int index, float x, float y)
      Parameters:
      index -
      x -
      y -
    • add_point

      public void add_point(float x, float y, float z)
      Parameters:
      x -
      y -
      z -
    • add_point

      public void add_point(int index, float x, float y, float z)
      Parameters:
      index -
      x -
      y -
      z -
    • add_points

      public void add_points(vec... coord)
      Parameters:
      coord - a list of vec
    • add_points

      public void add_points(int index, vec... coord)
      Parameters:
      index -
      coord - a list of vec
    • get_ref_points

      public vec3[] get_ref_points()
      Returns:
      all the normal points of your Shape
    • get_ref_point

      public vec3 get_ref_point(int target)
      Parameters:
      target -
      Returns:
      a specific point normal of the array
    • get_points

      public vec3[] get_points()
      ***WARNING*** sometime it's can be necessary to use the function calc() from the Class is used we do that to avoid a problem if the shape is too complex. Because that's can make a huge memory using for nothing
      Returns:
      all the points of your Shape
    • get_point

      public vec3 get_point(int target)
      ***WARNING*** sometime it's can be necessary to use the function calc() from the Class is used we do that to avoid a problem if the shape is too complex. Because that's can make a huge memory using for nothing
      Parameters:
      target -
      Returns:
      a specific point of the array
    • get_ref_x

      public float get_ref_x(int index)
    • get_ref_y

      public float get_ref_y(int index)
    • get_ref_z

      public float get_ref_z(int index)
    • get_x

      public float get_x(int index)
    • get_y

      public float get_y(int index)
    • get_z

      public float get_z(int index)