Skip to content

Commit

Permalink
Fix load_mesh.cpp and conda-env.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ManifoldFR committed May 19, 2024
1 parent 5131ff9 commit 5f720e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conda/conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- gtest
- pinocchio
- eigen
- rerun-sdk'>=0.16'
- librerun-sdk'>=0.16'
- rerun-sdk>=0.16.0
- librerun-sdk>=0.16.0
- fmt
- example-robot-data
9 changes: 3 additions & 6 deletions src/load_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,14 @@ MeshDescription loadMesh(const std::string &meshPath, Vector3f scale,
rerun::archetypes::Mesh3D meshDescriptionToRerun(MeshDescription &&mesh) {
size_t numTris = mesh.faceTriangles.size();

vector<uint32_t> indices;
vector<rerun::components::TriangleIndices> indices;
for (size_t i = 0; i < numTris; i++) {
Vector3u &tri = mesh.faceTriangles[i];
indices.push_back(tri[0]);
indices.push_back(tri[1]);
indices.push_back(tri[2]);
indices.emplace_back(tri[0], tri[1], tri[2]);
}

auto rmesh = rerun::archetypes::Mesh3D(std::move(mesh.vertices))
.with_mesh_properties(
rerun::components::MeshProperties(std::move(indices)))
.with_triangle_indices(std::move(indices))
.with_vertex_normals(std::move(mesh.normals))
.with_vertex_colors(std::move(mesh.colors));
return rmesh;
Expand Down

0 comments on commit 5f720e6

Please sign in to comment.