Advanced Mesh Editing Codebase for CPSC 524 by Shayan Hoshyari

minimesh n.w
1 / 18
Embed
Share

"Explore the intricate code structure of minimesh, a versatile mesh editing tool developed for CPSC 524 by Shayan Hoshyari. Dive into the core mesh data structure, I/O functionalities, and mesh editing algorithms. Discover the Half-Edge Methodology for mesh traversal and detailed storage structures for vertex, face, and half-edge data. Enhance your understanding of mesh connectivity and traversal techniques within the codebase."

  • Mesh Editing
  • Code Structure
  • CPSC 524
  • Mesh Data
  • Advanced Algorithms

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. minimesh Mesh editing codebase for CPSC 524 Shayan Hoshyari

  2. Code Structure minimesh/core: Mesh Data Structure + I/O minimesh/cli: empty executable for testing and playing around minmiesh/gui: a very basic viewer

  3. Code Structure minimesh/core: Mesh Data Structure + I/O + Mesh Editting Algs minimesh/cli: empty executable for testing and playing around minmiesh/gui: a very basic viewer -- Your code mainly goes into ``core . Feel free to add your own files

  4. Code Structure minimesh/core: Mesh Data Structure + I/O + Mesh Editting Algs minimesh/cli: empty executable for testing and playing around minmiesh/gui: a very basic viewer -- Your code mainly goes into ``core . Feel free to add your own files. -- Your tests go into ``cli . Strongly recommended. -- Add functionality to ``gui to Demo your code.

  5. Half-Edge Methodology Data structure Mesh traversal mechanism We use it for both

  6. Storage struct Vertex_data { int half_edge; Eigen::Vector3d xyz; bool is_active; }

  7. Storage struct Face_data { int half_edge; bool is_active; }

  8. Storage struct Half_Edge_data { int next; int prev; int twin; int face; int origin; bool is_active; }

  9. Storage Struct Mesh_connectivity { std::vector<Vertex_data> _vertices; std::stack<int> _inactive_vertices; std::vector<Half_edge_data> _half_edges; std::stack<int> _inactive_half_edges; std::vector<Face_data> _faces; std::stack<int> _inactive_faces; }

  10. Traversal for(int face_id = 0 ; face_id < mesh.n_total_faces() ; ++face_id) { Mesh_connectivty::Face_iterator face_handle = mesh.face_at if( face_handle.is_active() ) { Mesh_connectivty::Half_edge_iterator he_handle = face.half_edge } } .face_at( face_id ); half_edge();

  11. Deleting Entities Mesh_connectivity::Face_iterator = mesh.face_at( some_id ); face.deactivate deactivate(); ();

  12. Adding Entities // Add a new face Mesh_connectivity::Face_iterator = mesh.add_face(); Mesh_connectivity::Half_edge_iterator = mesh.add_half_edge();

  13. Connectivity Modification // Add a new face Mesh_connectivity::Face_iterator = mesh.add_face(); Mesh_connectivity::Half_edge_iterator = mesh.add_half_edge(); // Modify Connectivity face.data data(). ().half_edge = half_edge.index .index(); ();

  14. Connectivity Modification // Add a new face Mesh_connectivity::Face_iterator = mesh.add_face(); Mesh_connectivity::Half_edge_iterator = mesh.add_half_edge(); // Modify Connectivity face.data data(). ().half_edge = half_edge.index face.data data(). ().half_edge = half_edge.index .index(); (); index() ();

  15. Example Flipping An Edge The command line executable contains a simple example that reads a mesh and flips one of its edges. Look into: minimesh/cli/main.cpp minimesh/cli/edge-flip.svg

  16. Setting up the environment Read the readme.txt carefully. cmake-example.txt is your friend. Ask questions on Piazza.

  17. Setting up the environment Read the readme.txt carefully. cmake-example.txt is your friend. Ask questions on Piazza. Be specific. So I can reproduce.

  18. Setting up the environment Demo

More Related Content