Skip to content

Conversation

@rezural
Copy link
Contributor

@rezural rezural commented Jun 27, 2021

Add mesh reconstruction from ply files,

This depends on the output format from blender:

element vertex 24
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float s
property float t
element face 12
property list uchar uint vertex_indices

@w1th0utnam3
Copy link
Member

Thanks!

I think I'll make some small changes, e.g. I would use a for loop for the vertices and normals to directly push to two separate vectors. I think avoiding that extra copy is worth the raw for loop.

@w1th0utnam3 w1th0utnam3 merged commit d1152ed into InteractiveComputerGraphics:master Jul 5, 2021
@w1th0utnam3 w1th0utnam3 changed the title mesh from ply file Read surface mesh from PLY file Jul 5, 2021
Comment on lines +154 to +155
.map(|e| e.unwrap())
.collect();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw. this can be replaced with a simple

.collect::<Result<Vec<_>, _>>()?;

You can collect Result<T, E>s into a Result<Vec<T>, E> which stops on first error.

@w1th0utnam3 w1th0utnam3 added the enhancement New feature or request label Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants