This repository has been archived on 2024-12-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2024CG-project-render/include/vertex_triangle_adjacency.h
github-classroom[bot] 5985bb8445
Initial commit
2024-10-24 10:26:51 +00:00

19 lines
713 B
C++

#ifndef VERTEX_TRIANGLE_ADJACENCY_H
#define VERTEX_TRIANGLE_ADJACENCY_H
#include <Eigen/Core>
#include <vector>
// Compute a vertex-triangle adjacency list. For each vertex store a list of all
// incident faces.
//
// Inputs:
// F #F by 3 list of mesh triangle indices
// num_vertices number of vertices (i.e., V.rows(); usually ==F.maxCoeff()+1)
// Outputs:
// VF num_verticess-long list of lists so that f=VF[i][j] means that face f
// is the jth face among those incident on vertex i. Adjacency faces are
// listed in no particular order (but no duplicates).
void vertex_triangle_adjacency(
const Eigen::MatrixXi & F,
const int num_vertices,
std::vector<std::vector<int> > & VF);
#endif