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/per_face_normals.h
github-classroom[bot] 5985bb8445
Initial commit
2024-10-24 10:26:51 +00:00

16 lines
410 B
C

#ifndef PER_FACE_NORMALS_H
#define PER_FACE_NORMALS_H
#include <Eigen/Core>
// Compute per-face normals for a triangle mesh
//
// Inputs:
// V #V by 3 list of vertex positions
// F #F by 3 list of mesh triangle indices into V
// Outputs:
// N #F by 3 list of per-face unit normal vectors
void per_face_normals(
const Eigen::MatrixXd & V,
const Eigen::MatrixXi & F,
Eigen::MatrixXd & N);
#endif