VEX HELP: including voptype.h

   4638   4   2
User Avatar
Member
1 posts
Joined: July 2013
Offline
Hi,
As i understand it Houdini has some built in codes that you can access when you write
#include <library>

Is there a way to view what is included in a certain library. Specifically the

#include <voptype.h>

I keep seeing this one line of code:
VOPpoint pcP= v@P;

when the voptype.h library is included and was wondering what exactly does VOPpoint pcP mean?

Thanks!
User Avatar
Member
606 posts
Joined: May 2007
Offline
You can find the include files in your houdini install directory/houdini/vex/include/voptype.h

There isn't much anything interesting in voptype.h, but voplib.h is already quite a bit more interesting.
User Avatar
Member
13 posts
Joined: Sept. 2015
Offline
VOPpoint pcP = v@P;

is simple means, create variables VOPimport and pcP that will be equal current Position from your run over (pts or prims, etc)
FX Artist at Progressive FX.
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Moin,

to extend what Arthur already explained:

VOPpoint pcP= v@P;

creates a 3-parted-vector named pcP and assigns to it the current position (“current” meaning that the VEX code most likely is getting iterated over all positions available in the specific geometry context, be it points, vertices or primitives, depending on the node connection it has).

The “@” means that the “P” (the “P” after the “@” stands for “current position”) is a globally accessible variable, in Houdini speak you would pronounce it “attribute position” (@ for attribute, P for position).
The “v” before the “@” is a type-cast, it is to make sure that “pcP” gets a 3-component vector value (in the case of “P” that should be reliably so, but always putting the type before the variable seems to me like a good habit).

Marc
(no top, no middle, no nothing engineer, just starting with VEX and other crazies)
Edited by malbrecht - Dec. 8, 2016 08:08:11
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
13 posts
Joined: Sept. 2015
Offline
malbrecht
Moin,

to extend what Arthur already explained:

VOPpoint pcP= v@P;

creates a 3-parted-vector named pcP and assigns to it the current position (“current” meaning that the VEX code most likely is getting iterated over all positions available in the specific geometry context, be it points, vertices or primitives, depending on the node connection it has).

The “@” means that the “P” (the “P” after the “@” stands for “current position”) is a globally accessible variable, in Houdini speak you would pronounce it “attribute position” (@ for attribute, P for position).
The “v” before the “@” is a type-cast, it is to make sure that “pcP” gets a 3-component vector value (in the case of “P” that should be reliably so, but always putting the type before the variable seems to me like a good habit).

Marc
(no top, no middle, no nothing engineer, just starting with VEX and other crazies)


malbrecht, Great and clean explanation by the way
FX Artist at Progressive FX.
  • Quick Links