Package rope.vector
Class vec3
java.lang.Object
rope.vector.vec
rope.vector.vec3
- All Implemented Interfaces:
R_Constants
-
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()
add
(float a) add
(float ax, float ay, float az) add main methodadd_x
(float x) add_y
(float y) add_z
(float z) float
average()
average of all componentsblu
(float z) bri
(float z) boolean
boolean
return true if the vector this and vector target are in the same vector areaconstrain
(float max) constrain
(float min, float max) Constrains a value to not exceed a maximum and minimum value.copy()
cos_wave
(int timeline, float s) WAVE COSINUScos_wave
(int timeline, float sx, float sy, float sz) cross
(float x, float y, float z) dir()
return normal cartesian angle coorddir
(float a_x, float a_y, float a_z) return normal cartesian angle coordreturn normal cartesian angle coordfloat
* return distance between vectordiv
(float d) div
(float dx, float dy, float dz) divdiv_x
(float x) div_y
(float y) div_z
(float z) float
dot
(float x, float y, float z) float
boolean
equals
(float target) return true if the vector this is equals to float targetboolean
equals
(float t_x, float t_y, float t_z) return true if the vector this is equals to float argumentsboolean
return true if the vector this is equals to vector targetgre
(float y) hue
(float x) inv()
limit
(float max) limitfloat
mag()
float
float
magSq()
map
(float minIn, float maxIn, float minOut, float maxOut) mod
(float mod) mod
(float mod_x, float mod_y, float mod_z) mult
(float m) mult
(float mx, float my, float mz) multmult_x
(float x) mult_y
(float y) mult_z
(float z) p
(float z) pow
(float pow) each component of the vec is power pushpow
(float pow_x, float pow_y, float pow_z) each component of the vec is power pushrand
(float max) randomrand
(float min, float max) randomrandomred
(float x) s
(float x) sat
(float y) set
(float v) set
(float[] source) set
(float x, float y, float z) set component main methodset
(int[] source) set_to
(int index, float arg) sin_wave
(int timeline, float s) WAVE SINUSsin_wave
(int timeline, float sx, float sy, float sz) sub
(float s) sub
(float sx, float sy, float sz) sub main methodsub_x
(float x) sub_y
(float y) sub_z
(float z) float
sum()
sum of all componentst
(float y) tan
(float float_to_make_plane_ref_x, float float_to_make_plane_ref_y, float float_to_make_plane_ref_z) toString()
wave
(int timeline, float s) wave
(int timeline, float sx, float sy, float sz) x
(float x) y
(float y) z
(float z) Methods inherited from class rope.vector.vec
a, ab, abc, abcd, abcde, abcdef, all, alp, array, b, blu, bri, c, d, e, equals, f, get, get, get_size, gre, hsb, hsba, hue, map, max, min, p, pq, q, random, random, random_next_gaussian, random_next_gaussian, random_next_gaussian, red, rgb, rgba, s, sat, size, st, stpq, t, u, uv, v, w, ww, www, wwww, wwwx, wwwy, wwwz, wwx, wwxw, wwxx, wwxy, wwxz, wwy, wwyw, wwyx, wwyy, wwyz, wwz, wwzw, wwzx, wwzy, wwzz, wx, wxw, wxww, wxwx, wxwy, wxwz, wxx, wxxw, wxxx, wxxy, wxxz, wxy, wxyw, wxyx, wxyy, wxyz, wxz, wxzw, wxzx, wxzy, wxzz, wy, wyw, wyww, wywx, wywy, wywz, wyx, wyxw, wyxx, wyxy, wyxz, wyy, wyyw, wyyx, wyyy, wyyz, wyz, wyzw, wyzx, wyzy, wz, wzw, wzww, wzwx, wzwy, wzwz, wzx, wzxw, wzxx, wzxy, wzxz, wzy, wzyw, wzyx, wzyy, wzyz, wzz, wzzw, wzzx, wzzy, wzzz, x, xw, xww, xwww, xwwx, xwwy, xwwz, xwx, xwxw, xwxx, xwxy, xwxz, xwy, xwyw, xwyx, xwyy, xwyz, xwz, xwzw, xwzx, xwzy, xwzz, xx, xxw, xxww, xxwx, xxwy, xxwz, xxx, xxxw, xxxx, xxxy, xxxz, xxy, xxyw, xxyx, xxyy, xxyz, xxz, xxzw, xxzx, xxzy, xxzz, xy, xyw, xyww, xywx, xywy, xywz, xyx, xyxw, xyxx, xyxy, xyxz, xyy, xyyw, xyyx, xyyy, xyyz, xyz, xyzw, xyzx, xyzy, xyzz, xz, xzw, xzww, xzwx, xzwy, xzwz, xzx, xzxw, xzxx, xzxy, xzxz, xzy, xzyw, xzyx, xzyy, xzyz, xzzw, xzzx, xzzy, xzzz, y, yw, yww, ywww, ywwx, ywwy, ywwz, ywx, ywxw, ywxx, ywxy, ywxz, ywy, ywyw, ywyx, ywyy, ywyz, ywz, ywzw, ywzx, ywzy, ywzz, yx, yxw, yxww, yxwx, yxwy, yxwz, yxx, yxxw, yxxx, yxxy, yxxz, yxy, yxyw, yxyx, yxyy, yxyz, yxz, yxzw, yxzx, yxzy, yxzz, yy, yyw, yyww, yywx, yywy, yywz, yyx, yyxw, yyxx, yyxy, yyxz, yyy, yyyw, yyyx, yyyy, yyyz, yyz, yyzw, yyzx, yyzy, yyzz, yz, yzw, yzww, yzwx, yzwy, yzwz, yzx, yzxw, yzxx, yzxy, yzxz, yzy, yzyw, yzyx, yzyy, yzyz, yzzw, yzzx, yzzy, yzzz, z, zw, zww, zwww, zwwx, zwwy, zwwz, zwx, zwxw, zwxx, zwxy, zwxz, zwy, zwyw, zwyx, zwyy, zwyz, zwz, zwzw, zwzx, zwzy, zwzz, zx, zxw, zxww, zxwx, zxwy, zxwz, zxx, zxxw, zxxx, zxxy, zxxz, zxy, zxyw, zxyx, zxyy, zxyz, zxz, zxzw, zxzx, zxzy, zxzz, zy, zyw, zyww, zywx, zywy, zywz, zyx, zyxw, zyxx, zyxy, zyxz, zyy, zyyw, zyyx, zyyy, zyyz, zyz, zyzw, zyzx, zyzy, zyzz, zz, zzw, zzww, zzwx, zzwy, zzwz, zzx, zzxw, zzxx, zzxy, zzxz, zzy, zzyw, zzyx, zzyy, zzyz, zzz, zzzw, zzzx, zzzy, zzzz
-
Constructor Details
-
vec3
public vec3() -
vec3
public vec3(float v) -
vec3
public vec3(float x, float y, float z) -
vec3
-
vec3
-
vec3
public vec3(float[] source) -
vec3
public vec3(int[] source)
-
-
Method Details
-
set
set component main method- Parameters:
x
-y
-z
-- Returns:
-
set
-
set
-
set
-
set
-
set
-
set_to
-
inv
- Returns:
- inverse all argument
-
x
-
add_x
-
sub_x
-
mult_x
-
div_x
-
y
-
add_y
-
sub_y
-
mult_y
-
div_y
-
z
-
add_z
-
sub_z
-
mult_z
-
div_z
-
red
-
gre
-
blu
-
hue
-
sat
-
bri
-
s
-
t
-
p
-
mult
mult- Parameters:
mx
-my
-mz
-- Returns:
-
mult
-
mult
-
mult
-
div
div- Parameters:
dx
-dy
-dz
-- Returns:
-
div
-
div
-
div
-
add
add main method- Parameters:
ax
-ay
-az
-- Returns:
-
add
-
add
-
add
-
sub
sub main method- Parameters:
sx
-sy
-sz
-- Returns:
-
sub
-
sub
-
sub
-
abs
- Returns:
- the absolute value of the vector
-
dot
public float dot(float x, float y, float z) - Parameters:
x
-y
-z
-- Returns:
- the doc product between the vec and the target
-
dot
-
pow
each component of the vec is power push- Parameters:
pow
-- Returns:
- vec3
-
pow
each component of the vec is power push- Parameters:
pow_x
-pow_y
-pow_z
-- Returns:
-
cross
- Parameters:
v
-target
-- Returns:
- vec3
-
cross
- Parameters:
v
-- Returns:
- vec3
-
cross
- Parameters:
x
-y
-z
-- Returns:
- vec3
-
normalize
- Parameters:
target
-- Returns:
-
normalize
-
map
-
map
-
limit
limit- Parameters:
max
-- Returns:
-
constrain
-
constrain
-
constrain
-
constrain
Constrains a value to not exceed a maximum and minimum value.- Parameters:
min
-max
-- Returns:
-
rand
random- Parameters:
max
- float- Returns:
- random value from 0 to float max for each argument
-
rand
random- Parameters:
min
- floatmax
- float- Returns:
- random value from float min to float max for each argument
-
rand
random- Parameters:
min
-max
-- Returns:
- random value from vec min to vec max for each argument
-
wave
- Parameters:
timeline
- give the tempo modification of the waves
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
- vec3 cosinus of each argument
-
wave
- Parameters:
timeline
- give the tempo modification of the wavesx
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsy
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsz
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
- vec3 cosinus of each argument
-
cos_wave
WAVE COSINUS- Parameters:
timeline
- ints
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
- vec3 cosinus of each argument
-
cos_wave
- Parameters:
timeline
- give the tempo modification of the wavesx
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsy
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsz
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
- vec3 cosinus of each argument
-
sin_wave
WAVE SINUS- Parameters:
timeline
- give the tempo modification of the waves
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
- vec3 sinus of the value
-
sin_wave
- Parameters:
timeline
- give the tempo modification of the wavesx
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsy
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligationsz
- float speed in relation with the timeline, this value is often between 0 and 1, but no obligation- Returns:
-
mod
- Parameters:
mod_x
-mod_y
-mod_z
-- Returns:
- return the modulo of each element in the same order
-
mod
-
mod
-
sum
public float sum()sum of all components- Returns:
- float
-
average
public float average()average of all components- Returns:
- float
-
dist
* return distance between vector- Parameters:
target
-- Returns:
-
dir
return normal cartesian angle coord- Returns:
- vec3
-
dir
return normal cartesian angle coord- Parameters:
a_x
-a_y
-a_z
-- Returns:
- vec3
-
dir
return normal cartesian angle coord- Parameters:
origin
-- Returns:
-
tan
public vec3 tan(float float_to_make_plane_ref_x, float float_to_make_plane_ref_y, float float_to_make_plane_ref_z) -
tan
- Parameters:
vector_to_make_plane_ref
-- Returns:
-
magSq
public float magSq()- Returns:
-
mag
- Parameters:
v_target
-- Returns:
-
mag
public float mag() -
equals
return true if the vector this is equals to vector target- Parameters:
target
-- Returns:
-
equals
public boolean equals(float target) return true if the vector this is equals to float target- Parameters:
target
-- Returns:
-
equals
public boolean equals(float t_x, float t_y, float t_z) return true if the vector this is equals to float arguments- Parameters:
t_x
-t_y
-t_z
-- Returns:
-
compare
return true if the vector this and vector target are in the same vector area- Parameters:
target
-area
-- Returns:
-
compare
- Parameters:
target
-area
-- Returns:
-
copy
- Returns:
-
toString
-