Package rope.mesh

Class R_Face

All Implemented Interfaces:
R_Constants, R_Constants_Colour

public class R_Face extends R_Graphic
  • Constructor Details

    • R_Face

      public R_Face(processing.core.PApplet pa)
      Parameters:
      pa - is the Processing PAplet
    • R_Face

      public R_Face(processing.core.PApplet pa, vec a, vec b, vec c)
      Parameters:
      pa - is the Processing PAplet
      a - is summit vec3 point of the triangle face
      b - is summit vec3 point of the triangle face
      c - is summit vec3 point of the triangle face
  • Method Details

    • set

      public void set(vec a, vec b, vec c)
      Parameters:
      a - is summit vec3 point of the triangle face
      b - is summit vec3 point of the triangle face
      c - is summit vec3 point of the triangle face
    • set

      public void set(float ax, float ay, float az, float bx, float by, float bz, float cx, float cy, float cz)
      Parameters:
      ax - is summit point of the triangle face
      ay - is summit point of the triangle face
      az - is summit point of the triangle face
      bx - is summit point of the triangle face
      by - is summit point of the triangle face
      bz - is summit point of the triangle face
      cx - is summit point of the triangle face
      cy - is summit point of the triangle face
      cz - is summit point of the triangle face
    • get

      public vec3[] get()
      Returns:
      the coordonnate of the face in vec3 array
    • copy

      public R_Face copy()
      Returns:
      a copy of R_Face with a new reference.
    • barycenter

      public vec3 barycenter()
      Returns:
      the vec3 position of the barycenter of three points of the triangle face
    • set_fill

      public void set_fill(int fill)
      Parameters:
      fill - set the fill value
    • set_stroke

      public void set_stroke(int stroke)
      Parameters:
      stroke - set the stroke value
    • get_fill

      public int get_fill()
      Returns:
      the int fill color
    • get_stroke

      public int get_stroke()
      Returns:
      the int stroke color
    • offset

      public void offset(float value)
      Parameters:
      value - is float type use to create the displacement
    • offset

      public void offset(float x, float y)
      Parameters:
      x - is float type use to create the displacement
      y - is float type use to create the displacement
    • offset

      public void offset(float x, float y, float z)
      Parameters:
      x - is float type use to create the displacement
      y - is float type use to create the displacement
      z - is float type use to create the displacement
    • offset

      public void offset(vec value)
      Parameters:
      value - is vec3 type use to create the displacement
    • show

      public void show()
      Display the triangle face
    • toString

      public String toString()
      Overrides:
      toString in class Object