dmurdoch / rgl

rgl is a 3D visualization system based on OpenGL. It provides a medium to high level interface for use in R, currently modelled on classic R graphics, with extensions to allow for interaction.
https://dmurdoch.github.io/rgl/
GNU General Public License v2.0
84 stars 20 forks source link

uchar color export in writePLY() #426

Closed aidanmorales closed 2 weeks ago

aidanmorales commented 2 weeks ago

Fixes #425

I looked over the writePLY branch (thanks for looking into this!), and there were some issues with the little and big endian formats when withColors was set to FALSE (ascii was working fine). I modified the function to explicitly check for withColors to fix this. I tested locally, and writePLY builds and runs without issues and passes devtools::check(). I tested all export formats and normals/color combinations and it works as expected. Besides these changes, I made the header new lines and withColors explicit explicit to help me debug the function, but the code style is unchanged.

dmurdoch commented 2 weeks ago

Please remove all the formatting changes. Only include the substantive changes.

dmurdoch commented 2 weeks ago

I've looked through the PR, and I can't spot any changes that would affect the output.