本 Wiki 开启了 HTTPS。但由于同 IP 的 Blog 也开启了 HTTPS,因此本站必须要支持 SNI 的浏览器才能浏览。为了兼容一部分浏览器,本站保留了 HTTP 作为兼容。如果您的浏览器支持 SNI,请尽量通过 HTTPS 访问本站,谢谢!
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版上一修订版两侧同时换到之后的修订记录 | ||
vfx:houdini:vex:functions [2020/05/14 01:47] – [Pop] codinghare | vfx:houdini:vex:functions [2020/05/14 01:59] – [NOISE AND RANDOMNESS] codinghare | ||
---|---|---|---|
行 4: | 行 4: | ||
===== ===== | ===== ===== | ||
- | ====Arrays==== | ||
- | * 数组可以通过 '' | ||
- | * Houdini VEX 不支持多维数组。 | ||
- | ==Removeindex== | + | |
- | <code vex> | + | |
- | // | + | |
- | /* 使用 */ | + | |
- | < | + | |
- | </ | + | |
- | ====Attribute AND Iintrinsics==== | + | |
- | ===Attrib=== | + | |
- | ==point== | + | |
- | <code vex> | + | |
- | // | + | |
- | // | + | |
- | /* 使用 */ | + | |
- | //可以对 intrinsic 属性进行读取 | + | |
- | // | + | |
- | //Point number 可以用@P 循环选定所有点,也可以指定具体的点编号对指定点操作 | + | |
- | < | + | |
- | //FIXME | + | |
- | < | + | |
- | </ | + | |
- | ====Geometry==== | + | |
- | ===Create=== | + | |
- | ==Addpoint== | + | |
- | <code vex> | + | |
- | // | + | |
- | // | + | |
- | /* 使用 */ | + | |
- | // | + | |
- | int addpoint(int geohandle, int point_number) | + | |
- | // | + | |
- | int addpoint(int geohandle, vector pos) | + | |
- | </ | + | |
- | ==Addprim== | + | |
- | ===Delete=== | + | |
- | ==Removepoint== | + | |
- | <code vex> | + | |
- | // | + | |
- | // | + | |
- | /* 使用 */ | + | |
- | // | + | |
- | removepoint(int input number, int point number); | + | |
- | // | + | |
- | //1 为删除任意因删除点造成的坏面,比如封闭的,只有3个顶点的面,或者开放的,只有二个顶点的面 | + | |
- | //0 为删除因删除点造成的无效的几何体,比如少于 4 个顶点的四面体,没有顶点的体积等 | + | |
- | removepoint(int input_number, | + | |
- | //e.g. 删除当前几何体中的 0 号点 | + | |
- | removepoint(0, | + | |
- | </ | + | |
- | ===Point=== | + | |
- | ==Nearpoints== | + | |
- | <code vex> | + | |
- | // | + | |
- | // | + | |
- | /* 使用 */ | + | |
- | // | + | |
- | int [] nearpoints(< | + | |
- | // | + | |
- | int [] nearpoints(< | + | |
- | // | + | |
- | int [] nearpoints(< | + | |
- | int [] nearpoints(< | + | |
- | </ | + | |
====MEASURE==== | ====MEASURE==== | ||
- | ===BoundingBox=== | ||
- | ==Getbbox_min / max== | ||
- | <code vex> | ||
- | // | ||
- | // | ||
- | /* 使用 */ | ||
- | //以 vec 的形式返回当前几何体 Bounding Box 的 min / max 点 | ||
- | // | ||
- | vector | ||
- | // | ||
- | vector | ||
- | </ | ||
- | ====NOISE AND RANDOMNESS==== | ||
- | ==Rand== | ||
- | <code vex> | ||
- | // | ||
- | // | ||
- | // | ||
- | // | ||
- | /* 使用 */ | ||
- | float rand(seed); // | ||
- | // | ||
- | vector pos = 1; | ||
- | float seed = 0; | ||
- | pos *= rand(seed); //random number are differernt in x,y,z | ||
- | pos *= float(rand(seed));// | ||
- | </ | + | |
====VOLUME==== | ====VOLUME==== | ||
===Volume=== | ===Volume=== |