Package rope.mesh
Class R_Line2D
java.lang.Object
rope.core.Rope
rope.core.BigBang
rope.core.R_Graphic
rope.mesh.R_Line2D
- All Implemented Interfaces:
R_Constants
,R_Constants_Colour
-
Field Summary
Fields inherited from interface rope.core.R_Constants
ARC, 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, 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, SIN, SKY, SOUTH, SOUTH_EAST, SOUTH_WEST, SPAN, SPHERE, SPHERE_HIGH, SPHERE_LOW, SPHERE_MEDIUM, SPIRAL, SQUARE, STAR, STAR_3D, STATIC, 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, 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, CAERULEUM, CAFE, CANARD, CANELLE, CAPUCINE, CARMIN, CARMINE, CAROTTE, CELESTE, CERISE, CHAMOIS, CHARTREUSE, CHOCOLAT, CIEL, CITROUILLE, COBALT, COFFEE, COLOMBIN, CORAIL, CYAN, 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, TILLEUL, TURQUOISE, VERMILLON, VERT, VERT_D_EAU, VERT_DE_GRIS, VESSIE, VIOLET, WHITE, YELLOW, ZINZOLIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiona()
void
a
(float x, float y) void
float
angle()
Return the angle of the line from "a" to "b"angle
(float angle) Deprecated.angle
(float angle, float normal_pos) Deprecated.b()
void
b
(float x, float y) void
change
(float begin, float end) the idea is pass a normal value 0 to 1, where 1 is the size of your segment.coord
(float normal_pos) Deprecated.instead use vec2 point(float normal_pos)coord
(int len) Deprecated.copy()
float
dist()
Return the length of the lineR_Pix[]
intersection
(R_Line2D target) Return the intersection point between this line and an other one.intersection
(R_Line2D target, vec2... exception) Return the intersection point between this line and an other one.mute
(boolean is) change the state of the line, can be helpful to show or not the line and set behaviorboolean
mute_is()
offset
(float offset_x, float offset_y) make a displacement of the linepoint
(float normal_pos) projected point on the line, the distance is calculated by multiplication the distance line by the normal argument where the starting point is the first point.point
(int len) void
reset()
If you don't use show() function for any reason, and in parralelele you change point with function offset(), function change() or any futur method yo must use function reset() to come back to references points settingrotation
(float angle) Change the angle from the starting point "a"rotation
(float angle, float normal_pos) Create a rotation angle with the axe.set
(float ax, float ay, float bx, float by) void
set_pixels
(float density, int... colour) void
show()
Show the result of all previous work on linevoid
show
(processing.core.PGraphics other) Deprecated.void
void
show_pixels
(float density, int... colour) void
void
show_pixels_x2
(float density, int... colour) toString()
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, 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, get, get_renderer, get_renderer, image, image, image, image, image, index_pixel_array, line, line, line, line, loadPixels, loadShader, noFill, noStroke, pass_graphic, plot, plot, plot, plot, plot_impl, 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, 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, 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, red, saturation, 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, constrain, constrain, cos, cross, 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, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hex, hex, hex, hex, in_line, in_polygon, in_polygon, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, 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_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, 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_Line2D
public R_Line2D(processing.core.PApplet pa) - Parameters:
pa
-
-
R_Line2D
- Parameters:
pa
-a
-b
-
-
R_Line2D
public R_Line2D(processing.core.PApplet pa, float ax, float ay, float bx, float by) - Parameters:
pa
-ax
-ay
-bx
-by
-
-
-
Method Details
-
set
- Parameters:
a
-b
-
-
set
- Parameters:
line
-- Returns:
-
set
- Parameters:
ax
-ay
-bx
-by
-
-
a
- Parameters:
a
-
-
a
public void a(float x, float y) - Parameters:
x
-y
-
-
b
- Parameters:
b
-
-
b
public void b(float x, float y) - Parameters:
x
-y
-
-
offset
make a displacement of the line- Parameters:
offset
-- Returns:
-
offset
-
reset
public void reset()If you don't use show() function for any reason, and in parralelele you change point with function offset(), function change() or any futur method yo must use function reset() to come back to references points setting -
a
- Returns:
- the final value for a
-
b
- Returns:
- the final value for b
-
point
projected point on the line, the distance is calculated by multiplication the distance line by the normal argument where the starting point is the first point.- Parameters:
normal_pos
- where 0 is the starting point and 1 is the end point- Returns:
- a coordinate of the point
-
point
- Parameters:
len
- the position on the line can be upper or lower or the segment- Returns:
- a coordinate of the point
-
angle
public float angle()Return the angle of the line from "a" to "b"- Returns:
-
coord
Deprecated.instead use vec2 point(float normal_pos)return coordinate of the normal position on the line from the first point the distance use is calculte with the length of the line.- Parameters:
normal_pos
- is the normal distance from the first point- Returns:
-
coord
Deprecated.return coordinate of distance from the first point of the line- Parameters:
len
- is the distance from the first point- Returns:
- * @deprecated instead use vec2 point(int len)
-
mute
change the state of the line, can be helpful to show or not the line and set behavior- Parameters:
is
-- Returns:
-
mute_is
public boolean mute_is() -
change
the idea is pass a normal value 0 to 1, where 1 is the size of your segment. The size is mult by the value- Parameters:
begin
- add the distance of the beginning of the segment.end
- add the distance of the end of the segment.
-
rotation
Change the angle from the starting point "a"- Parameters:
angle
-- Returns:
- himself
-
rotation
Create a rotation angle with the axe. The axe is calculated with a normal position where 0 is the start point and 1 the end point see point()- Parameters:
angle
- in radiannormal_pos
-- Returns:
- himself
-
angle
Deprecated. -
angle
Deprecated. -
set_pixels
public void set_pixels(float density, int... colour) -
get_pixels
- Returns:
- the array of pixels a long the line if it's possible.
-
show
public void show()Show the result of all previous work on line -
show
Deprecated.Show the result of all previous work on line- Parameters:
other
- is the PGraphics where the result will be showing
-
show_pixels
public void show_pixels() -
show_pixels_x2
public void show_pixels_x2() -
show_pixels
public void show_pixels(float density, int... colour) -
show_pixels_x2
public void show_pixels_x2(float density, int... colour) -
dist
public float dist()Return the length of the line- Returns:
-
intersection
Return the intersection point between this line and an other one.- Parameters:
target
-- Returns:
-
intersection
Return the intersection point between this line and an other one.- Parameters:
target
-exception
- , list of vec2 point make an exception node, helpful when you don't want a specific node point- Returns:
-
copy
- Returns:
-
toString
-