Whats the different between these two?
();
{};
curly braces.
Ive just started following the CGwiki guide to houdini and was learning the sop solver.I came across this snippet of code .
–Faked Physics–
@v = {2,2,0};
v@gravity = {0,-0.1,0};
–
but i accidentally used () and got a result the sphere translate -y.I checked the help file to see what the User-defined functions provide but i saw none for the curly braces.
What is the difference between these two punctuations
1547 1 0- absorbentghost
- Member
- 10 posts
- Joined: 1月 2017
- Offline
- AlanZ
- Member
- 41 posts
- Joined: 2月 2018
- Offline
In VEX, there are two ways to explicitly assign values to a vector variable:
So, {2,2,0} gives you a vector.is the same as .
(2,2,0) on itself is not meaningful. I believe it returns the last value in the bracket.
Some examples [www.sidefx.com] to checkout.
- If the values include variables, write
@v = set(x,y,z);
- If the values are constants, write
@v = {2,2,0};
So, {2,2,0} gives you a vector.
@v = {2,2,0};
@v = set(2,2,0);
(2,2,0) on itself is not meaningful. I believe it returns the last value in the bracket.
Some examples [www.sidefx.com] to checkout.
-
- Quick Links