Closed YoHoSo closed 3 months ago
Also for PointXyzRgba, we have talked about this before over email. It is better to create a new data structure for the normals. Consider changing into this, and implement the from/to so that PointXyzRgbaWithNormal can convert from/to PointXyzRgba
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct PointXyzRgbaWithNormal {
pub x: f32,
pub y: f32,
pub z: f32,
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
pub nx: f32,
pub ny: f32,
pub nz: f32,
}
or alternatively with Option
for nx, ny, nz.
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct PointXyzRgbaWithNormal {
pub x: f32,
pub y: f32,
pub z: f32,
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
pub nx: Option<f32>,
pub ny: Option<f32>,
pub nz: Option<f32>,
}
Let me know your thoughts
Changing the original data structure will generate a lot of incompatibility like this.
WeiQiang said he has implemented a more proper class to store points containing normals. I plan on using his new class to replace mine after you have approved his finalised version
maybe it is better to add a new pipeline message enum for your TriangleFace. e.g.
IndexedPointCloudWithTriangleFace(PointCloud<PointXyzRgba>, u32, Option<Vec<TriangleFace>>)
I think this is better than my current implementation, I will do this
WeiQiang said he has implemented a more proper class to store points containing normals. I plan on using his new class to replace mine after you have approved his finalised version
Sure, let's see his idea later
maybe it is better to add a new pipeline message enum for your TriangleFace. e.g.
Since it is not clear yet if TriangleFace will be used elsewhere. Also, adding a new message enum will not interfere with the original functionality.
Let me know your thoughts on this.