Package rope.costume

Class R_Primitive

All Implemented Interfaces:
R_Constants, R_Constants_Colour, R_Shape_contract

public class R_Primitive extends R_Shape implements R_Constants, R_Shape_contract
  • Constructor Details

    • R_Primitive

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

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

      public R_Primitive(processing.core.PApplet pa, int summits, float angle)
      Parameters:
      pa -
      summits -
      angle -
    • R_Primitive

      public R_Primitive(processing.core.PApplet pa, int summits, float angle, vec2 dir)
      Parameters:
      pa -
      summits -
      angle -
      dir -
    • R_Primitive

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

      public R_Primitive(processing.core.PApplet pa, int summits, float angle, processing.core.PGraphics other)
      Parameters:
      pa -
      summits -
      angle -
      other -
    • R_Primitive

      public R_Primitive(processing.core.PApplet pa, int summits, float angle, vec2 dir, processing.core.PGraphics other)
      Parameters:
      pa -
      summits -
      angle -
      dir -
      other -
  • Method Details

    • get_normals

      public vec3[] get_normals()
      return the list of normal points
      Returns:
      array
    • get_normal

      public vec3 get_normal(int target)
    • get_ref_points

      public vec3[] get_ref_points()
      return the list of normal points
      Overrides:
      get_ref_points in class R_Shape
      Returns:
      array
    • get_ref_point

      public vec3 get_ref_point(int target)
      Overrides:
      get_ref_point in class R_Shape
      Parameters:
      target -
      Returns:
    • get

      public vec3[] get()
      return the list of real points position
      Returns:
      array
    • get

      public vec3 get(int target)
      return the list of real points position
      Returns:
      vec3
    • get_points

      public vec3[] get_points()
      return the list of real points position
      Overrides:
      get_points in class R_Shape
      Returns:
      array
    • get_point

      public vec3 get_point(int target)
      return the list of real points position
      Overrides:
      get_point in class R_Shape
      Returns:
      vec3
    • get_dir

      public vec2 get_dir()
      Returns:
    • build

      public void build()
      build all the point if necessary, that increase the speed rendering
      Specified by:
      build in interface R_Shape_contract
    • show

      public void show()
      main SHOW primitive the line rendering is awful, very very low when there is a lot of shape, may be the compute on polygon_2D() is guilty
      Specified by:
      show in interface R_Shape_contract
      Overrides:
      show in class R_Shape
    • polygon_2D

      public vec3[] polygon_2D(int num)
      Parameters:
      num -
      Returns:
    • polygon_2D

      public vec3[] polygon_2D(int num, float new_orientation)
      main method
      Parameters:
      num -
      new_orientation -
      Returns:
    • compute_coord_polygon_2D

      public vec3 compute_coord_polygon_2D(int target, int num, float start_angle)
    • polygon_3D

      public vec3[] polygon_3D(int num, float new_orientation, vec3 dir)
      Parameters:
      num -
      new_orientation -
      dir -
      Returns:
    • polygon_3D

      public vec3[] polygon_3D(vec3 pos, float radius, int num, float new_orientation, vec3 dir)
      Parameters:
      pos -
      radius -
      num -
      new_orientation -
      dir -
      Returns: