Package rope.mesh
Class R_Shape
java.lang.Object
rope.core.Rope
rope.core.BigBang
rope.core.R_Graphic
rope.mesh.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
-
Field Summary
Fields inherited from interface rope.core.R_Constants
ARC, BEGIN, BEZIER_VERTEX, BLANK, BOTTOM, BOX, BREAK, CARTESIAN, CENTER, CHAOS, CHOICE, CHORD, CIRCULAR, CLOSE, CLOUD, CORNER, CORNERS, COS, CROSS, CROSS_BOX_2, CROSS_BOX_3, CROSS_RECT, CUBE_LINE, CURVE_VERTEX, DECAGON, DIAGONAL, DIAMETER, DODECAGON, DOWN, DRAW, DXF, DYNAMIC, EAST, ELLIPSE, END, EQUATION, EULER, FIRST, FIT, FLOWER, FLUID, FX2D, G, GOLD_ANGLE, GOLD_NUMBER, GRAVITY, HALF, HALF_PI, HENDECAGON, HEPTAGON, HEXAGON, HORIZONTAL, HOUSE, HPI, ICOSI_DODECAHEDRON_LINE, IMAGE, JAVA2D, LANDSCAPE, LAST, LEAF, LEFT, LINE, LINEAR, MAD, MAGNETIC, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MIX, NEXT, NONAGON, NONE, NORMAL, NORTH, NORTH_EAST, NORTH_WEST, NOTCH, NOTHING, NULL, OCTOGON, OCTOHEDRON_LINE, OPEN, ORDER, P2D, P3D, PDF, PENTAGON, PERLIN, PHI, PI, PIE, PIXEL, POINT, POLAR, POLYGON, PORTRAIT, POW, PREVIOUS, QPI, QUADRATIC_VERTEX, QUARTER_PI, RADIUS, RAND, RECT, REPEAT, RHOMBIC_COSI_DODECAHEDRON_SMALL_LINE, RIGHT, ROOT, ROOT2, RUN, SCALE, SEED, SHAPE, SIDE, SIN, SKY, SOUTH, SOUTH_EAST, SOUTH_WEST, SPAN, SPHERE, SPHERE_HIGH, SPHERE_LOW, SPHERE_MEDIUM, SPIRAL, SQUARE, STAR, STAR_3D, START, STATIC, STOP, SVG, TAN, TAU, TETRAHEDRON, TETRAHEDRON_LINE, TEXT, TOP, TREE, TRIANGLE, TWO_PI, UP, VERSION, VERTEX, VERTICAL, VIRUS, WALK, WEST
Fields inherited from interface rope.core.R_Constants_Colour
ABRICOT, ABYSSE, ACAJOU, ALPHA, AMARANTE, AMBRE, ANSI_BLACK, ANSI_BLACK_BACKGROUND, ANSI_BLUE, ANSI_BLUE_BACKGROUND, ANSI_CYAN, ANSI_CYAN_BACKGROUND, ANSI_GREEN, ANSI_GREEN_BACKGROUND, ANSI_PURPLE, ANSI_PURPLE_BACKGROUND, ANSI_RED, ANSI_RED_BACKGROUND, ANSI_RESET, ANSI_WHITE, ANSI_WHITE_BACKGROUND, ANSI_YELLOW, ANSI_YELLOW_BACKGROUND, ARGB, ARGENT, AUBERGINE, AZUR, BIS, BISTRE, BLACK, BLANC, BLEU, BLOND, BLOOD, BLUE, BOUTEILLE, BRIGHTNESS, BRIQUE, BRONZE, BROWN, CACHOU, CAERULEUM, CAFE, CANARD, CANELLE, CAPUCINE, CARMIN, CARMINE, CAROTTE, CELESTE, CERISE, CHAMOIS, CHARTREUSE, CHOCOLAT, CIEL, CITROUILLE, COBALT, COFFEE, COLOMBIN, CORAIL, CYAN, ELEPHANT, EVEQUE, FRANCE, FUSCHIA, GOLD, GRADIENT, GRADIENT_BRIGHTNESS, GRADIENT_HUE, GRADIENT_SATURATION, GRAY, GRAY_MEDIUM, GREEN, GRENAT, GRIS, GRIS_MOYEN, GUEULES, HSB, HUE, IMPERIAL, JAUNE, LAPIS_LAZULI, LAVANDE, LILAS, LIME, LIN, LUNE, MAGENTA, MANDARINE, MARRON, MAUVE, MIMOSA, MOON, MOUNTBATTEN, NANKIN, NAPLE, NOIR, NOISETTE, NUIT, OCRE, OCRE_JAUNE, OCRE_ROUGE, OLIVE, OR, ORANGE, OUTREMER, PALETTE, PAYNE, PERLE, PERROQUET, PINK, PISTACHE, POURPRE, PRUNE, PURPLE, RAINBOW, RED, RGB, RGBA, ROSE, ROUGE, SANG, SAPIN, SATURATION, SAUGE, SEPIA, SHAKUDOU, SILVER, SINOPLE, SMALT, SOURIS, SPECTRUM, TAUPE, TENEBRE, TILLEUL, TURQUOISE, VERMILLON, VERT, VERT_D_EAU, VERT_DE_GRIS, VESSIE, VIOLET, WHITE, YELLOW, ZINZOLIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(float x, float y) Deprecated.instead use void add_vec(float x, float y)void
add
(float x, float y, float z) Deprecated.instead use void add_point(float x, float y, float z)void
Deprecated.instead use void add_points(vec... coord)void
add_point
(float x, float y) void
add_point
(float x, float y, float z) void
add_point
(int index, float x, float y) void
add_point
(int index, float x, float y, float z) void
add_pointers
(int index, vec3... coord) void
add_pointers
(vec3... coord) void
add_points
(int index, vec... coord) void
add_points
(vec... coord) angle()
void
angle
(float x, float y, float z) void
float
angle_x()
void
angle_x
(float value) set angle x to rotatefloat
angle_y()
void
angle_y
(float value) set angle y to rotatefloat
angle_z()
void
angle_z
(float value) set angle z to rotatefloat
area()
area of the shape, but this one need to be a classical one, the line dont must cross each other and the shape must be closevoid
clear()
clone Processing function() clearboolean
boolean
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.vec3[]
***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.get_ref_point
(int target) vec3[]
float
get_ref_x
(int index) float
get_ref_y
(int index) float
get_ref_z
(int index) int
float
get_x
(int index) float
get_y
(int index) float
get_z
(int index) id()
id
(int id) id
(int a, int b, int c, int d, int e, int f) id_a
(int id) id_b
(int id) id_c
(int id) id_d
(int id) id_e
(int id) id_f
(int id) int
length()
pos()
void
pos
(float p) void
pos
(float x, float y) void
pos
(float x, float y, float z) void
void
boolean
reset_is()
void
reset_is
(boolean is) void
set_point
(int index, float x, float y) void
set_point
(int index, float x, float y, float z) replace point at the specific index, if this one existvoid
void
set_summits
(int summits) void
show()
size()
void
size
(float s) void
size
(float w, float h) void
size
(float w, float h, float d) void
void
boolean
void
use_pos_is
(boolean is) Methods inherited from class rope.core.R_Graphic
arc, arc, arc, arc, aspect, aspect, background, background, background, background, background, background, beginContour, beginDraw, beginShape, beginShape, bezierVertex, bezierVertex, bezierVertex, bezierVertex, bezierVertex, bezierVertex, box, box, box, circle, circle, colorMode, colorMode, colorMode, colorMode, colorMode, colorMode, colorMode, createGraphics, curveVertex, curveVertex, curveVertex, curveVertex, curveVertex, curveVertex, ellipse, ellipse, ellipse, ellipse, ellipseMode, ellipseMode, endContour, endDraw, endShape, endShape, fill, fill, fill, fill, fill, fill, fill_is, fill_is, get, get_renderer, get_renderer, image, image, image, image, image, line, line, line, line, loadPixels, loadShader, noFill, noStroke, pass_graphic, plot, plot, plot, plot, plot_x2, plot_x2, point, point, point, point, pop, popMatrix, push, pushMatrix, quadraticVertex, quadraticVertex, quadraticVertex, quadraticVertex, quadraticVertex, quadraticVertex, rect, rect, rect, rect, rect, rect, rectMode, rectMode, renderer_P2D, renderer_P3D, rotate, rotateX, rotateXY, rotateXYZ, rotateXZ, rotateY, rotateYZ, rotateZ, scale, scale, scale, set, set, set, shader, shearX, shearY, sphere, sphereDetail, sphereDetail, square, square, stroke, stroke, stroke, stroke, stroke, stroke, stroke_is, stroke_is, strokeWeight, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textFont, textFont, textSize, thickness, translate, translate, translate, triangle, triangle, triangle, updatePixels, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex, vertex
Methods inherited from class rope.core.BigBang
alpha, blue, brightness, color, color, color, color, createFont, createFont, createFont, getColorMode, getColorMode, green, hue, lerpColor, loadImage, longest_String, longest_String, longest_String_pixel, longest_String_pixel, longest_String_pixel, longest_String_pixel, longest_String_pixel, longest_String_pixel, noise, noiseSeed, pass_processing, pixel_density_is, pixel_density_is, red, saturation, save_BMP, save_frame, save_frame, save_frame, save_frame, sketchPath, sketchPath, start_PDF, start_PDF, start_PDF, width_char, width_char, width_char, width_String, width_String, width_String
Methods inherited from class rope.core.Rope
abs, abs, abs, abs, abs, abs, abs, abs, add, add, add, add, add, add, all, all, any, any, atan, barycenter, barycenter, barycenter, binary, binary, binary, binary, ceil, ceil, ceil, ceil, clamp, clamp, clamp, clamp, compare, compare, compare, compare, compare, compare, compare, compare, constrain, constrain, cos, cross, d_bell, d_cbrt, d_cos, d_normal, d_pow, d_sigmoid, d_sin, d_sqrt, dist, dist, dist, dist, dist, div, div, div, div, div, div, equal, equal, equal, equal, equal, equal, equal, equal, extension, extension_is, file_name, floor, floor, floor, floor, fract, fract, fract, fract, get_os, get_os_family, getColorMode, getColorMode, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hex, hex, hex, hex, in_line, in_line, in_polygon, in_polygon, in_polygon, in_polygon, in_segment, in_segment, index_pixel_array, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, map, map, map, map, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, mix, mix, mix, mix, mod, mod, mod, mod, mod, mod, mod, mult, mult, mult, mult, mult, mult, only, only, pow, print_array, print_err, print_err_tempo, print_out, print_tempo, projection, projection, projection, projection, projection, projection, projection, projection, random, random, random_next_gaussian, random_next_gaussian, random_next_gaussian, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, round, round, round, round, sign, sign, sign, sign, sign, sign, sign, sign, sin, smoothstep, smoothstep, smoothstep, smoothstep, split, split, sq, sqrt, step, step, step, step, sub, sub, sub, sub, sub, sub, to_cartesian_2D, to_cartesian_2D, to_cartesian_2D, to_cartesian_3D, to_cartesian_3D, to_cartesian_3D, truncate, truncate, unbinary, unhex
-
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
-
-
-
Method Details
-
id
-
id
-
id
-
id_a
-
id_b
-
id_c
-
id_d
-
id_e
-
id_f
-
id
-
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
- Parameters:
pos
-
-
pos
- Parameters:
pos
-
-
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
- Parameters:
size
-
-
size
- Parameters:
size
-
-
angle
- Returns:
- angle
-
angle
public void angle(float x, float y, float z) - Parameters:
x
-y
-z
-
-
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
-
area
public float area()area of the shape, but this one need to be a classical one, the line dont must cross each other and the shape must be close- Returns:
- area in pixel
-
compare
- Parameters:
max
-marge
-points
-- Returns:
- true if the num of common point is minimum equal to max and in the marge of error
-
compare
- Parameters:
marge
-points
-- Returns:
- the list of points contain in R_Shape and in the marge of error
-
equals
- Parameters:
max
-points
-- Returns:
- true if the num of common point is minimum equal to max
-
equals
- Parameters:
points
-- Returns:
- the list of points contain in R_Shape
-
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()Description copied from class:R_Graphic
clone Processing function() clear -
barycenter
- Returns:
- the vec3 barycenter of the shape
-
get_summits
public int get_summits()- Returns:
- the num of summits
-
length
public int length()- Returns:
- the num of summits
-
set_summits
public void set_summits(int summits) - Parameters:
summits
-
-
add_pointers
- Parameters:
coord
- a list of vec must be a pointer
-
add_pointers
- Parameters:
index
-coord
- a list of vec must be a pointer. Mean the vec must not be create to be destroy after it passed.
-
add
Deprecated.instead use void add_vec(float x, float y)- Parameters:
x
-y
-
-
add
Deprecated.instead use void add_point(float x, float y, float z)- Parameters:
x
-y
-z
-
-
add
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
- Parameters:
coord
- a list of vec
-
add_points
- Parameters:
index
-coord
- a list of vec
-
set_point
public void set_point(int index, float x, float y, float z) replace point at the specific index, if this one exist- Parameters:
index
-x
-y
-z
-
-
set_point
public void set_point(int index, float x, float y) -
set_point
-
get_ref_points
- Returns:
- all the normal points of your Shape
-
get_ref_point
- Parameters:
target
-- Returns:
- a specific point normal of the array
-
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
***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) -
show
public void show()
-