venkat Posted January 21, 2011 Share Posted January 21, 2011 I am trying to implement a c++ simple expression in Houdini VOPS. Can anyone help me.... C++ code for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(b!=b[j]) { c=c+b[j]; } } } Plz help me guys. Quote Link to comment Share on other sites More sharing options...
anim Posted January 21, 2011 Share Posted January 21, 2011 and what problem are you having with nested for loops? once you are inside for loop, use Initial Value from subinputs as your counter (i,j) because it gets incremented each step everything else is straightforward I think don't forget you can use VEX code in inline VOP or do the whole thing in VEX if you wish, but it all depends on what you are trying to do are you using arrays, those are available just in VEX code or what is b? i-th point from second input? Quote Link to comment Share on other sites More sharing options...
venkat Posted January 23, 2011 Author Share Posted January 23, 2011 and what problem are you having with nested for loops? once you are inside for loop, use Initial Value from subinputs as your counter (i,j) because it gets incremented each step everything else is straightforward I think don't forget you can use VEX code in inline VOP or do the whole thing in VEX if you wish, but it all depends on what you are trying to do are you using arrays, those are available just in VEX code or what is b? i-th point from second input? I am new to VEX programming. I started with simple implementations but I don't know how to use INLINE CODE VOP, which variables to use in inline vex code parameter. Can I get any examples of inline vop from internet??? plz help me.... Quote Link to comment Share on other sites More sharing options...
anim Posted January 23, 2011 Share Posted January 23, 2011 there is plenty of info about inline VOP, just search for inline in this or sidefx forum there is also help for it http://www.sidefx.com/docs/houdini11.0/nodes/vop/inline you can also write specific question to get specific answer or example file, so what are you trying to do exactly? Quote Link to comment Share on other sites More sharing options...
Macha Posted January 24, 2011 Share Posted January 24, 2011 Can I get any examples of inline vop from internet??? HERE IS A PRESENT FROM THE INTERNET!!! example.hip Quote Link to comment Share on other sites More sharing options...
venkat Posted January 25, 2011 Author Share Posted January 25, 2011 HERE IS A PRESENT FROM THE INTERNET!!! Thanks Macha, it is helpful for me 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.