I’m in the process of writing a maxscript based on Joe Stam’s “Real-Time Fluid Dynamics for Games” research paper. I’m not that familiar with c coding and came across this entry…
for ( i=1 ; i<=N ; i++ ) { x[IX(0 ,i)] = b==1 ? x[IX(1,i)] : x[IX(1,i)];
x[IX(N+1,i)] = b==1 ? x[IX(N,i)] : x[IX(N,i)];
x[IX(i,0 )] = b==2 ? x[IX(i,1)] : x[IX(i,1)];
x[IX(i,N+1)] = b==2 ? x[IX(i,N)] : x[IX(i,N)];
}
I’m not sure how this would translate into maxscript, especially the " = b==1 ?". My guess is that b is a flag that if equal to the number will do what’s next else do what follows. In other words, its shorthand for an if then else statement in c.
If anyone could reinterprit this I’d really apreciate it.
Stephen Lebed