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
    • 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(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