Pass-by-Reference Vex Functions. Question.

   3354   2   0
User Avatar
Member
10 posts
Joined: July 2016
Offline
I've noticed a few Function in the Vex Lib such as most of the Array functions and few of the transform functions. That uses what looks like at least in C++ Pass-by-Reference Function.

example of what I'm refereing to.
void rotate( matrix3 &m; float amount; vector axis )

Can I create a function like this in a Wrangle? or is this something for the HDK to create?

Cheers
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
Hello.
When you define your own function inside VEX, all arguments are passed by reference.
If you what to ensure that input arguments remain the same then you should use const keyword before your data type.
Your example is for inbuilt VEX functions but not for user define functions in VEX.
See notes in below:
http://www.sidefx.com/docs/houdini/vex/lang.html [www.sidefx.com]
Edited by Nima - Nov. 22, 2017 04:47:39
User Avatar
Member
10 posts
Joined: July 2016
Offline
Thank you for the quick response and info.
  • Quick Links