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

Andy Nicholas andy at andynicholas.com
Tue Oct 30 10:04:23 EDT 2007

Hey all, I'm just keeping those questions coming :-)

Okay, at the moment I'm really struggling to do what I'd consider to be
fairly basic operations on vectors and matrices in an expression.

Specifically, I want to do something like the following (the syntax is
wrong, but you should get the picture):

Matrix m = optransform("/obj/geom");
float unitz_x = m[8];
float unitz_y = m[9];
float unitz_z = m[10];
Vector v = {unitz_x, unitz_y, unitz_z};


So far I've been unable to do two things:

1) extract an element from the matrix
2) create a vector from my own components

Are these operations possible in an expression? Is there a better way of
going about this sort of thing?



More information about the Sidefx-houdini-list mailing list