[Sidefx-houdini-list] Expression syntax for matrices and vectors

Mario Marengo mario at axyzfx.com
Tue Oct 30 13:09:34 EDT 2007


On October 30, 2007 11:48 am, Andy Nicholas wrote:
> So I take it from the last bit you wrote, you could also do something like
> this?:
>
> vector v = vector4(<expr>,<expr>,<expr>,<expr>);

Yes, I think so -- returning v[3] from the above, for example, should give you 
the 4th component (even though the data type in the assignment is vector 
instead of vector4).

> But is it me, or is this whole stripmatrix thing a little obtuse! 

Of course it is :)
But keep in mind that the expression language evolved from a shell-scripting 
type of language, not a general purpose programming language. Awkward for 
some things, like what you're trying to do, but surprisingly efficient (and 
succinct) for some other things. Ergo the evolution into VEX (a much more 
C-like programming language) and the new Python binding in H9. I think it's 
safe to say that the old expression language should be treated as 
"deprecated".

Cheers.

-- 
......................................................................
Mario Marengo                                  mailto:mario at axyzfx.com
AXYZ ANIMATION                                 http://www.axyzfx.com
......................................................................



More information about the Sidefx-houdini-list mailing list