Forums > Jitter

Mapping between planes and dimensions in jitter matrices

Apr 26 2013 | 5:19 am

Dear all,

What is the simplest way to convert between matrix dimensions and planes?


I make a jit.matrix 6 float32 10 20

planes = rgbxyz
10 = objects
20 = object history

And where in one instance I want to interpret this as: jit.matrix 20 float32 10 6
so I can use a jit.iter to iterate across the 20 dimensions, producing the color/position history of each cell as a list…

Can it be done neatly?



Apr 26 2013 | 9:18 am

this seems a good place for jit.gen
have a look here for a tutorial about the ‘swiz’ operator, which can be what you want

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Jitter