Jump to content

Declare Matrix in a Attrib Wrangle


Recommended Posts

Hello! 

what is the correct syntax for correctly declaring an empty matrix3 in vex?  

Atypically most people just use 

matrix3 mat = ident();

Can I decalre a matrix the same way I would a vector or float? (I just want to see all my variables on the spreadsheet while working through some code B)) 

Example 

@N = {0,1,0); 

@f = @ptnum; 

I can see these on the spreadsheet

matrix3 mat = ident(): I cannot

 

Also, what are the technical terms for one versus the other?  -- local attributes (no @ symbol)  versus global variables (@symbol)?  

Thanks!

Link to comment
Share on other sites

Hey Justin,

To declare a 3x3 matrix the way you're trying to:

3@mat = ident();

2@ for 2x2 and 4@ for 4x4. The technical terminology is attribute with the @ symbol, and a parameter when it's just within the snippet.

Edit: here's a lot more info http://www.sidefx.com/docs/houdini/vex/snippets.html

Edited by coltonmil
Link to comment
Share on other sites

1 hour ago, coltonmil said:

Hey Justin,

To declare a 3x3 matrix the way you're trying to:


3@mat = ident();

2@ for 2x2 and 4@ for 4x4. The technical terminology is attribute with the @ symbol, and a parameter when it's just within the snippet.

Edit: here's a lot more info http://www.sidefx.com/docs/houdini/vex/snippets.html

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...