Package rope.core
Class Rope
java.lang.Object
rope.core.Rope
- 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, 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, FIT, FLOWER, FLUID, FX2D, G, GOLD_ANGLE, GOLD_NUMBER, GRAVITY, HALF_PI, HENDECAGON, HEPTAGON, HEXAGON, HORIZONTAL, HOUSE, HPI, ICOSI_DODECAHEDRON_LINE, IMAGE, JAVA2D, LANDSCAPE, LEAF, LEFT, LINE, LINEAR, MAD, MAGNETIC, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MIX, NONAGON, NONE, NORMAL, NORTH, NORTH_EAST, NORTH_WEST, NOTHING, NULL, OCTOGON, OCTOHEDRON_LINE, OPEN, ORDER, P2D, P3D, PDF, PENTAGON, PERLIN, PHI, PI, PIE, PIXEL, POINT, POLAR, POLYGON, PORTRAIT, POW, 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 TypeMethodDescriptionboolean
all
(boolean... list) boolean
boolean
any
(boolean... list) boolean
binary
(byte value) binary
(char value) binary
(int value) binary
(int value, int digits) Converts an int, byte, char, or color to a String containing the equivalent binary notation.float
clamp
(float x, float min, float max) boolean
equal
(float x, float y) boolean
equal
(int x, int y) boolean
extension_is
(String filename, String... extension) remove the path of your String to return the file name of it.float
fract
(float x) get_os()
boolean
greaterThan
(float x, float y) boolean
greaterThan
(int x, int y) greaterThan
(ivec2 x, ivec2 y) greaterThan
(ivec3 x, ivec3 y) greaterThan
(ivec4 x, ivec4 y) greaterThan
(vec2 x, vec2 y) greaterThan
(vec3 x, vec3 y) greaterThan
(vec4 x, vec4 y) boolean
greaterThanEqual
(float x, float y) boolean
greaterThanEqual
(int x, int y) greaterThanEqual
(ivec2 x, ivec2 y) greaterThanEqual
(ivec3 x, ivec3 y) greaterThanEqual
(ivec4 x, ivec4 y) greaterThanEqual
(vec2 x, vec2 y) greaterThanEqual
(vec3 x, vec3 y) greaterThanEqual
(vec4 x, vec4 y) hex
(byte value) hex
(char value) hex
(int value) hex
(int value, int digits) int
index_pixel_array
(int x, int y, int width) boolean
lessThan
(float x, float y) boolean
lessThan
(int x, int y) boolean
lessThanEqual
(float x, float y) boolean
lessThanEqual
(int x, int y) lessThanEqual
(ivec2 x, ivec2 y) lessThanEqual
(ivec3 x, ivec3 y) lessThanEqual
(ivec4 x, ivec4 y) lessThanEqual
(vec2 x, vec2 y) lessThanEqual
(vec3 x, vec3 y) lessThanEqual
(vec4 x, vec4 y) float
map
(float value, float start1, float stop1, float start2, float stop2) map methodfloat
max
(float... list) float
min
(float... list) float
mix
(float x, float y, float a) float
mod
(float x, float y) boolean
only
(boolean... list) boolean
void
void
print_err_tempo
(int tempo, Object... obj) void
void
print_tempo
(int tempo, Object... obj) float
random
(float low, float high) float
random_next_gaussian
(float range) float
random_next_gaussian
(float range, int n) float
random_next_gaussian
(int n) float
sign
(float x) int
sign
(int x) float
smoothstep
(float edge0, float edge1, float x) smoothstep
(vec2 edge0, vec2 edge1, vec2 x) smoothstep
(vec3 edge0, vec3 edge1, vec3 x) smoothstep
(vec4 edge0, vec4 edge1, vec4 x) String[]
String[]
float
step
(float edge, float x) float
truncate
(float x) float
truncate
(float x, int num) int
int
Converts a Stringrepresentation of a hexadecimal number to its equivalent integer value.
-
Constructor Details
-
Rope
public Rope()
-
-
Method Details
-
map
public float map(float value, float start1, float stop1, float start2, float stop2) map method- Parameters:
value
- value must be computestart1
- min range value of the starting fieldstop1
- max range value of the starting fieldstart2
- min range value of the final fieldstop2
- max range value of the final field- Returns:
- result of the scale map operation
-
random
public float random(float low, float high) - Parameters:
low
- define value min for the randomhigh
- define value max for the random- Returns:
- random number, this method is a copy of Processing one
-
random_next_gaussian
public float random_next_gaussian(int n) - Parameters:
n
- the num of operation must iterate each operation is mult by the previous result- Returns:
- random value
-
random_next_gaussian
public float random_next_gaussian(float range) - Parameters:
range
- define value max for the random- Returns:
- random value
-
random_next_gaussian
public float random_next_gaussian(float range, int n) - Parameters:
range
- represente the max value possible from 0 to this value.n
- the num of operation must iterate each operation is mult by the previous result- Returns:
- random value
-
max
public float max(float... list) - Parameters:
list
- list of arguments must be sorted- Returns:
- the max value of the list
-
min
public float min(float... list) - Parameters:
list
- list of arguments must be sorted- Returns:
- the min value of the list
-
mix
public float mix(float x, float y, float a) - Parameters:
x
- elem to mixy
- elem to mixa
- mixer element- Returns:
- the mix result
- See Also:
-
mix
-
mix
-
mix
-
fract
public float fract(float x) - Parameters:
x
- value to fract- Returns:
- fract result
- See Also:
-
fract
-
fract
-
fract
-
sign
public float sign(float x) - Parameters:
x
- value who find sign- Returns:
- value -1, 0 or 1
- See Also:
-
sign
-
sign
-
sign
-
sign
public int sign(int x) -
sign
-
sign
-
sign
-
step
public float step(float edge, float x) - Parameters:
x
- value to smoothedge
- the smooth edge- Returns:
- the result of the operation
- See Also:
-
step
-
step
-
step
-
smoothstep
public float smoothstep(float edge0, float edge1, float x) - Parameters:
x
- value to smoothedge0
- the smooth first edgeedge1
- the smooth second edge- Returns:
- the result of the operation
- See Also:
-
smoothstep
-
smoothstep
-
smoothstep
-
mod
public float mod(float x, float y) - Parameters:
x
- value to mody
- value to mod- Returns:
- result of operation
- See Also:
-
mod
-
mod
-
mod
-
mod
-
mod
-
mod
-
clamp
public float clamp(float x, float min, float max) - Parameters:
x
- value to clampmin
- the min value availablemax
- the max value available- Returns:
- reslut of operation
- See Also:
-
clamp
-
clamp
-
clamp
-
equal
public boolean equal(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x equal to y
- See Also:
-
equal
public boolean equal(int x, int y) -
equal
-
equal
-
equal
-
equal
-
equal
-
equal
-
lessThan
public boolean lessThan(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x inferior to y
- See Also:
-
lessThan
public boolean lessThan(int x, int y) -
lessThan
-
lessThan
-
lessThan
-
lessThan
-
lessThan
-
lessThan
-
greaterThan
public boolean greaterThan(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x superior to y
-
greaterThan
public boolean greaterThan(int x, int y) -
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThanEqual
public boolean greaterThanEqual(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x superior or equal to y
- See Also:
-
greaterThanEqual
public boolean greaterThanEqual(int x, int y) -
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
lessThanEqual
public boolean lessThanEqual(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x inferior or equal to y
- See Also:
-
lessThanEqual
public boolean lessThanEqual(int x, int y) -
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
all
- Parameters:
b
- bvec value to test- Returns:
- true only if all components of x are true.
- See Also:
-
all
public boolean all(boolean... list) - Parameters:
list
-- Returns:
- true if all elments of the list is true
-
any
- Parameters:
b
- bvec value to test https://www.khronos.org/registry/OpenGL/specs/gl- Returns:
- true if any component of x is true.
-
any
public boolean any(boolean... list) - Parameters:
list
- boolean list value to test- Returns:
- return true if any element of the list is true
-
only
- Parameters:
b
- bvec value to test- Returns:
- true is only one elements of the list is true
-
only
public boolean only(boolean... list) -
index_pixel_array
public int index_pixel_array(int x, int y, int width) - Parameters:
x
- coordinate xy
- coordinate ywidth
- the width of you 2D array pixel- Returns:
- a linear position from a 2D array tab
-
truncate
public float truncate(float x) -
truncate
public float truncate(float x, int num) - Parameters:
x
- value to worknum
- after coma to display- Returns:
- a float number with a number after comma equal to the num arg
-
hex
-
hex
-
hex
-
hex
- Parameters:
value
- value to convertdigits
- the number of digits (maximum 8)- Returns:
- String hexadecimal value
-
unhex
Converts a Stringrepresentation of a hexadecimal number to its equivalent integer value.- Parameters:
value
- value to convert- Returns:
- unhexadecimal int value
-
binary
-
binary
-
binary
-
binary
Converts an int, byte, char, or color to a String containing the equivalent binary notation. For example, the color value produced by color(0, 102, 153, 255) will convert to the String value "11111111000000000110011010011001". This function can help make your geeky debugging sessions much happier. Note that the maximum number of digits is 32, because an int value can only represent up to 32 bits. Specifying more than 32 digits will have no effect. .- Parameters:
value
- value to convertdigits
- number of digits to return- Returns:
- String binary
-
unbinary
-
split
- Parameters:
value
-delim
-- Returns:
-
split
- Parameters:
value
- is the sentence must be spiteddelim
- is a separator- Returns:
- array String of the String argument sentence
-
file_name
remove the path of your String to return the file name of it.- Parameters:
file_path
-- Returns:
-
print_out
- Parameters:
obj
-
-
print_err
-
print_err_tempo
-
print_tempo
-
get_os
- Returns:
- the current os
-
get_os_family
- Returns:
- the current os family
-
extension
- Parameters:
filename
- check the last part of String path to return the extension if there is one- Returns:
- the extension of the file
-
extension_is
- Parameters:
filename
- check the last part of String path return true at the first extension who matchextension
- list of extension must be check;- Returns:
-