1 #ifndef LICORNEA_POINT_H_ 2 #define LICORNEA_POINT_H_ 11 static_assert(
sizeof(
float) == 4,
"point cloud requires 32 bit float type");
15 float x = 0.0,
y = 0.0,
z = 0.0,
w = 0.0;
20 x(x_),
y(y_),
z(z_),
w(1.0) { }
29 { x = pos[0];
y = pos[1];
z = pos[2];
w = 1.0; }
35 explicit operator bool ()
const {
return !
is_null(); }
37 static_assert(
sizeof(
point_xyz) == 16,
"point_xyz must be 16 byte");
54 static_assert(
sizeof(
point_full) == 32,
"point_full must be 32 byte");
point_xyz & operator=(const vec3 &pos)
point_xyz(float x_, float y_, float z_)
point_full(const point_xyz &pt, const rgb_color &col=rgb_color::white)
point_xyz(const vec3 &pos)
static const rgb_color white
point_xyz & operator=(const point_xyz &)=default
void set_position(const vec3 &pos)
point_full & operator=(const vec3 &pos)
point_full & operator=(const point_xyz &pt)