1.PointXYZ
成员: float x,y,z
最常见的结构,只表示的3D的xyz坐标信息:
union
{
float data[4];
struct
{
float x;
float y;
float z;
};
};
可以通过points[i].data[0]
和points[i].x
方式访问其中每个点的x坐标数据。
2.PointXYZI
成员: float x,y,z,intensity(强度)
在存储方面效率低下,但在内存对齐方面很好。(Inefficient in terms of storage, but good in terms of memory alignment.)intensity为0~1之间的数,不能和x,y,z进行同样的存储方式。
union
{
float data[4];
struct
{
float x;
float y;
float z;
};
};
union
{
struct
{
float intensity;
};
float data_c[4];
};
3.PointXYZRGBA
4.PointXYZRGB 和3是一样的
成员: float x,y,z; std::uint32_t rgba;
和PointXYZI是一样的,不过intensity变为了RGB channel【看文档不太明白一个变量怎么表示rgb信息的?】
union
{
float data[4];
struct
{
float x;
float y;
float z;
};
};
union
{
union
{
struct
{
std::uint8_t b;
std::uint8_t g;
std::uint8_t r;
std::uint8_t a;
};
float rgb;
};
std::uint32_t rgba;
};
5.PointXY
成员:float x, y;
Simple 2D x-y point structure.
struct
{
float x;
float y;
};
6.Normal
成员:float normal[3], curvature(曲率)
法线结构表示给定点处的曲面法线和曲率度量
union
{
float data_n[4];
float normal[3];
struct
{
float normal_x;
float normal_y;
float normal_z;
};
}
union
{
struct
{
float curvature;
};
float data_c[4];
};
7.PointNormal
成员: float x, y, z; float normal[3], curvature;
8.PointXYZRGBNormal
成员:float x, y, z, normal[3], curvature; std::uint32_t rgba;
9.PointXYZINormal
成员:float x, y, z, intensity, normal[3], curvature;
都是6结构的扩展