Whatsinaname Posted March 19, 2020 Share Posted March 19, 2020 (edited) I'm trying to change a value inside a matrix. This seems more complicated than I initially thought it was. It's a standard 4x4 matrix. I want to change the values for row 4, fields 1-3. Looking at the spreadsheet, the matrix is represented as an array of 16 values, therefore I tied: 4@matx[12] = 0.0; 4@matx[13] = 0.0; //etc. ...which results in a VEX error 'Ambiguous call to array index operator'. Why? It's position 12 of that array, storing a float value I want to overwrite with a float value. How that supposed to be done in VEX? Edited March 19, 2020 by Whatsinaname Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 19, 2020 Share Posted March 19, 2020 You can use setcomp() https://www.sidefx.com/docs/houdini/vex/functions/setcomp.html 1 Quote Link to comment Share on other sites More sharing options...
anim Posted March 19, 2020 Share Posted March 19, 2020 As docs say https://www.sidefx.com/docs/houdini/vex/lang.html Quote For matrices, you can use a pair of letters: .xx to reference the [0][0] element .zz to reference the [2][2] element .ax to reference the [3][0] element 1 Quote Link to comment Share on other sites More sharing options...
Whatsinaname Posted March 19, 2020 Author Share Posted March 19, 2020 Thanks guys! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.