Skip to content

Commit

Permalink
Update to latest plyodine
Browse files Browse the repository at this point in the history
  • Loading branch information
BradleyMarie committed Jan 14, 2025
1 parent a3104e4 commit 4d964f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ bazel_dep(name = "plyodine")
git_override(
module_name = "plyodine",
remote = "https://github.com/bradleymarie/plyodine.git",
commit = "7323685df340b61df0e8a6d4427ae31d2eb2273b",
commit = "d4d4912a97201126eb8870fa5a645e685f5e9581",
)
9 changes: 3 additions & 6 deletions frontends/pbrt/shapes/plymesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class TriangleMeshReader final
TriangleMeshReader(const Matrix& model_to_world)
: model_to_world_(model_to_world) {}

void Start() override {}

void AddVertex(const std::array<geometric, 3>& position,
const std::array<geometric, 3>* maybe_normal,
const std::array<geometric, 2>* maybe_uv) override {
Expand Down Expand Up @@ -54,7 +52,7 @@ class TriangleMeshReader final
}
}

void AddFace(const std::array<uint32_t, 3>& face) override {
void AddTriangle(const std::array<uint32_t, 3>& face) override {
faces.emplace_back(face[0], face[1], face[2]);
}

Expand Down Expand Up @@ -117,10 +115,9 @@ PlyMeshBuilder::Build(
}

TriangleMeshReader reader(model_to_world);
auto result = reader.ReadFrom(file_stream);
if (!result) {
if (std::error_code error = reader.ReadFrom(file_stream); error) {
std::cerr << "ERROR: PLY file parsing failed with message: "
<< result.error() << std::endl;
<< error.message() << std::endl;
exit(EXIT_FAILURE);
}

Expand Down

0 comments on commit 4d964f3

Please sign in to comment.