目录
pcfind_radius —— 返回最近点的列表(考虑半径)
pcunshaded —— 迭代读写通道内所有点(通道没有被写入任何数据)
pcimport —— 在pciterate或pcunshaded循环内导入点云通道数据
pcexport —— 在pciterate或pcunshaded循环内写入数据到点云
pcclose —— 关闭对应pcopen函数的handle
pcline_radius —— 返回在指定方向上点的列表(考虑半径)
pccone_radius —— 返回在指定圆锥上点的列表(考虑半径)
pcsegment_radius —— 返回在指定线段上点的列表(考虑半径)
pcfind —— 返回最近点的列表
int [] pcfind(<geometry>geometry, string Pchannel, vector P, float radius, int maxpoints) int [] pcfind(<geometry>geometry, string ptgroup, string Pchannel, vector P, float radius, int maxpoints) int [] pcfind(<geometry>geometry, string Pchannel, vector P, float radius, int maxpoints, float &distances[]) int [] pcfind(<geometry>geometry, string ptgroup, string Pchannel, vector P, float radius, int maxpoints, float &distances[])
pcfind_radius —— 返回最近点的列表(考虑半径)
int [] pcfind_radius(<geometry>geometry, string Pchannel, string RadChannel, float radscale, vector P, float radius, int maxpoints) int [] pcfind_radius(<geometry>geometry, string ptgroup, string Pchannel, string RadChannel, float radscale, vector P, float radius, int maxpoints) int [] pcfind_radius(<geometry>geometry, string Pchannel, string RadChannel, float radscale, vector P, float radius, int maxpoints, float &distances[]) int [] pcfind_radius(<geometry>geometry, string ptgroup, string Pchannel, string RadChannel, float radscale, vector P, float radius, int maxpoints, float &distances[])
pcopen —— 打开点云文件的handle
- 此函数打开点云文件(.pc),并排队访问其中包含的点;然后可使用pcunshaded、pciterate迭代点;
- 当使用pcopen()与pciterate()时,点将由近到远存储;
int pcopen(string filename, string channel, int shaded, ...) int pcopen(string filename, string Pchannel, vector P, float radius, int maxpoints, ...) int pcopen(string filename, string Pchannel, vector P, string Nchannel, vector N, float radius, int maxpoints, ...) int pcopen(int opinput, string Pchannel, vector P, float radius, int maxpoints)
int handle = pcopen(texturename, "P", P, maxdistance, maxpoints);
while (pcunshaded(handle, "irradiance"))
{
pcimport(handle, "P", cloudP);
pcimport(handle, "N", cloudN);
ir = computeIrraciance(cloudP, cloudN);
pcexport(handle, "irradiance", ir);
}
pcfilter(handle, radius, "irradiance", ir);
pcfilter —— 过滤由pcopen找到的点
<type> pcfilter(int handle, string channel_name, ...)
//此函数等价于,越近权重越高
float pcfilter(int handle; string channel)
{
float sum, w, d;
float value, result = 0;
while (pciterate(handle))
{
pcimport(handle, "point.distance", d);
pcimport(handle, channel, value);
w = 1 - smooth(0, radius, d);
sum += w;
result += w * value;
}
result /= sum;
return result;
}
pcfarthest —— 返回到最大点的距离
- 如未搜索到点,则返回一个非常大的值(-2147483648=1.0×10^37);
float pcfarthest(int handle)
pcnumfound —— 返回pcopen找到的点数
int pcnumfound(int handle)
Houdini点云函数介绍

该博客主要介绍了Houdini中一系列点云相关函数,如pcfind、pcopen、pcfilter等。涵盖了返回最近点列表、打开点云文件、过滤点、迭代点云等功能,还说明了各函数的使用方法及特点,如pcopen可用于打开文件并排队访问点,pcclose能关闭对应句柄等。
最低0.47元/天 解锁文章
9070

被折叠的 条评论
为什么被折叠?



