-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ply reader #1
Ply reader #1
Conversation
BTW, this worked straight up amazing on 3 million point ply files. Resulting in this rendering: https://www.youtube.com/watch?v=BbkCnsKESJU Thankyou very much! |
b01a543
to
d3b303b
Compare
Thanks! I'll make some small changes to the code |
If you have the time, maybe consider rewriting it using custom structs instead of using the HashMap based access? See e.g. https://github.com/Fluci/ply-rs/blob/master/examples/read_ply_to_structs.rs |
Yeah, OK. I was going to do this, but couldn't implement the trait on na::Vector3 directly (I wonder if there is a workaround for this?), and it seemed kinda invasive to add those structs just for one file format. I will look at this in the next couple of days. Thanks! |
Yeah, right. I think one could work around this by introducing a transparent newtype: use nalgebra::Vector3;
#[repr(transparent)]
struct Vec3r(Vector3<Real>); implementing the trait on this and then just transmuting the result of the parser from Although in general, I don't really like that the One thing we should make sure later though is to give meaningful errors if you try reading e.g. a file with doubles as a |
This adds support for reading from ply files, of the format:
ply
format ascii 1.0
comment ...
element vertex 2440181
property float x
property float y
property float z
property float nx
property float ny
property float nz
end_header