Skip to content

Commit

Permalink
Merge pull request #6 from ManifoldFR/topic/rerun-0.16
Browse files Browse the repository at this point in the history
Upgrade to rerun 0.16
  • Loading branch information
ManifoldFR authored May 19, 2024
2 parents c1f3e4e + 5f720e6 commit 65568e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 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
- librerun-sdk
- rerun-sdk>=0.16.0
- librerun-sdk>=0.16.0
- fmt
- example-robot-data
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ add_project_dependency(pinocchio REQUIRED)
add_project_dependency(pinocchio_visualizers REQUIRED)
add_project_dependency(assimp REQUIRED)
add_project_dependency(fmt 10.0 REQUIRED)
add_project_dependency(rerun_sdk REQUIRED)
add_project_dependency(rerun_sdk 0.16.0 REQUIRED)

set(INSTALL_DOCUMENTATION OFF)
set(CMAKE_VERBOSE_MAKEFILE OFF)
Expand Down
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 65568e5

Please sign in to comment.