Skip to content

Commit

Permalink
Fixed writing binary PLY file
Browse files Browse the repository at this point in the history
  • Loading branch information
hochshi committed Jun 19, 2024
1 parent 9e485e9 commit 935e718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4434,7 +4434,7 @@ bool Surface::savePLYMesh(int format, bool revert, const char* fileName,
}

struct double3 { double x, y, z; };
struct int3 { int32_t x, y, z; };
struct int3 { int x, y, z; };

std::vector<double3> vertStructVec;
for (double* ptr : vertList) {
Expand All @@ -4456,7 +4456,7 @@ bool Surface::savePLYMesh(int format, bool revert, const char* fileName,
tinyply::Type::UINT8, 3);
if (normalsList.size() != 0) {
std::vector<double3> normalsStructVec;
for (double* ptr : vertList) {
for (double* ptr : normalsList) {
normalsStructVec.push_back(*reinterpret_cast<double3*>(ptr));
}
mesh_ply.add_properties_to_element("vertex", { "nx", "ny", "nz" },
Expand Down

0 comments on commit 935e718

Please sign in to comment.