Revision 663fea68
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/type/Dynamic4D.java | ||
---|---|---|
432 | 432 |
{ |
433 | 433 |
time = noise(time,0); |
434 | 434 |
|
435 |
buffer[offset ] = (next.x-curr.x)*time + curr.x + (baseV[0][0]*mFactor[0] + baseV[1][0]*mFactor[1] + baseV[2][0]*mFactor[2]);
|
|
436 |
buffer[offset+1] = (next.y-curr.y)*time + curr.y + (baseV[0][1]*mFactor[0] + baseV[1][1]*mFactor[1] + baseV[2][1]*mFactor[2]);
|
|
437 |
buffer[offset+2] = (next.z-curr.z)*time + curr.z + (baseV[0][2]*mFactor[0] + baseV[1][2]*mFactor[1] + baseV[2][2]*mFactor[2]);
|
|
438 |
buffer[offset+3] = (next.z-curr.z)*time + curr.z + (baseV[0][3]*mFactor[0] + baseV[1][3]*mFactor[1] + baseV[2][3]*mFactor[2]);
|
|
435 |
buffer[offset ] = (next.x-curr.x)*time + curr.x + (baseV[1][0]*mFactor[0] + baseV[2][0]*mFactor[1] + baseV[3][0]*mFactor[2]);
|
|
436 |
buffer[offset+1] = (next.y-curr.y)*time + curr.y + (baseV[1][1]*mFactor[0] + baseV[2][1]*mFactor[1] + baseV[3][1]*mFactor[2]);
|
|
437 |
buffer[offset+2] = (next.z-curr.z)*time + curr.z + (baseV[1][2]*mFactor[0] + baseV[2][2]*mFactor[1] + baseV[3][2]*mFactor[2]);
|
|
438 |
buffer[offset+3] = (next.z-curr.z)*time + curr.z + (baseV[1][3]*mFactor[0] + baseV[2][3]*mFactor[1] + baseV[3][3]*mFactor[2]);
|
|
439 | 439 |
} |
440 | 440 |
else |
441 | 441 |
{ |
... | ... | |
495 | 495 |
|
496 | 496 |
computeOrthonormalBaseMore(time,tmp1); |
497 | 497 |
|
498 |
buffer[offset ]= ((tmp1.a[0]*time+tmp1.b[0])*time+tmp1.c[0])*time+tmp1.d[0] + (baseV[0][0]*mFactor[0] + baseV[1][0]*mFactor[1] + baseV[2][0]*mFactor[2]);
|
|
499 |
buffer[offset+1]= ((tmp1.a[1]*time+tmp1.b[1])*time+tmp1.c[1])*time+tmp1.d[1] + (baseV[0][1]*mFactor[0] + baseV[1][1]*mFactor[1] + baseV[2][1]*mFactor[2]);
|
|
500 |
buffer[offset+2]= ((tmp1.a[2]*time+tmp1.b[2])*time+tmp1.c[2])*time+tmp1.d[2] + (baseV[0][2]*mFactor[0] + baseV[1][2]*mFactor[1] + baseV[2][2]*mFactor[2]);
|
|
501 |
buffer[offset+3]= ((tmp1.a[3]*time+tmp1.b[3])*time+tmp1.c[3])*time+tmp1.d[3] + (baseV[0][3]*mFactor[0] + baseV[1][3]*mFactor[1] + baseV[2][3]*mFactor[2]);
|
|
498 |
buffer[offset ]= ((tmp1.a[0]*time+tmp1.b[0])*time+tmp1.c[0])*time+tmp1.d[0] + (baseV[1][0]*mFactor[0] + baseV[2][0]*mFactor[1] + baseV[3][0]*mFactor[2]);
|
|
499 |
buffer[offset+1]= ((tmp1.a[1]*time+tmp1.b[1])*time+tmp1.c[1])*time+tmp1.d[1] + (baseV[1][1]*mFactor[0] + baseV[2][1]*mFactor[1] + baseV[3][1]*mFactor[2]);
|
|
500 |
buffer[offset+2]= ((tmp1.a[2]*time+tmp1.b[2])*time+tmp1.c[2])*time+tmp1.d[2] + (baseV[1][2]*mFactor[0] + baseV[2][2]*mFactor[1] + baseV[3][2]*mFactor[2]);
|
|
501 |
buffer[offset+3]= ((tmp1.a[3]*time+tmp1.b[3])*time+tmp1.c[3])*time+tmp1.d[3] + (baseV[1][3]*mFactor[0] + baseV[2][3]*mFactor[1] + baseV[3][3]*mFactor[2]);
|
|
502 | 502 |
} |
503 | 503 |
else |
504 | 504 |
{ |
Also available in: Unified diff
Some corrections for the new Noise, it is still fishy though (some suspicious loops form - see it with the ''Dynamics" example app, 2D, 3 points)