Hello,
I am trying to apply some raw matrix(4x4) data to a camera object in SU. I am parsing an output file from another program and my data looks like this...
[
[0.999938,0.001129,-0.011103,0.000000],
[0.001072,-0.999986,-0.005202,0.000000],
[-0.011108,0.005189,-0.999925,0.000000],
[1.054297,1.571880,-8.966838,1.000000]
]
How can i apply this 4x4 matrix to the camera since it has no transformation method? I know how to use the transformation class but not how to apply this to a camera.
OK, i found out that M[-1] represents the camera loc and (M[0],M[1],M[2]) affect rot and scale. But i still cannot translate this to a SU camera. Here is what i got so far...
eye = M[-1]
target = ?
up = ?
cam = Sketchup;;Camera.new(eye, target, up)
Any help whatsoever is greatly welcomed, math, programming, 2 cents, whatever!?
Thanks in Advance!