Giter Site home page Giter Site logo

meshview's Introduction

C++ mesh + point cloud visualizer

A basic OpenGL visualizer for meshes and pointclouds. Uses Eigen matrices to store data, which is convenient for projects already using Eigen.

Example of visualizer created using meshview: Screenshot of smplx-viewer Code: https://github.com/sxyu/smplxpp/blob/master/main_viewer.cpp

Azure Kinect camera point cloud visualization: Screenshot of pcview (depth map viewer)

Scene from example.cpp: Screenshot of example

Features

  • Drawing meshes (using phong lighting model)
    • Coloring mesh via texture mapping
      • Diffuse and specular textures
    • Alternatively, coloring mesh by interpolating vertex color
    • Automated vertex normal computation
  • Drawing point clouds
  • Drawing poly-lines (as point clouds with .line=true)
  • Drawing several geometric objects (line, cube, square, [UV] sphere) directly
  • Controlling camera and lighting
  • RGB/XYZ axes
  • Optionally includes Dear ImGUI which can be used without any additional setup, by writing ImGui calls (like ImGui::Begin()) in the viewer.on_gui event handler

Note this project does not support importing/exporting models, and is mostly intended for visualizing programmatically generated objects. For model I/O please look into integrating assimp.

#include "meshview/meshview.hpp"
...

meshview::Viewer viewer;
// do drawing
viewer.add_xyz(args);
// handle events
viewer.on_xyz = [&](args) {
}
viewer.show();

See example.cpp for usage examples.

Installation

External dependencies

  • OpenGL 3+
  • C++14
  • Eigen 3.3 or 3.4 beta

Build

Use CMake in the usual way. mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release

  • Unix: make -j<threads> && make install
  • Windows: cmake --build . --target Release

Options:

  • -DMESHVIEW_BUILD_IMGUI=OFF to disable Dear ImGui GUI system
  • -DMESHVIEW_BUILD_EXAMPLE=OFF to disable building the (very simple) example program

meshview's People

Contributors

sxyu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.