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

22 lines
575 B
C

#ifndef CATMULL_CLARK_H
#define CATMULL_CLARK_H
#include <Eigen/Core>
// Conduct num_iters iterations of Catmull-Clark subdivision on a **pure quad**
// mesh (V,F).
//
// Inputs:
// V #V by 3 list of vertex positions
// F #F by 4 list of quad mesh indices into V
// num_iters number of iterations
// Outputs:
// SV #SV by 3 list of vertex positions
// SF #SF by 4 list of quad mesh indices into SV
//
void catmull_clark(
const Eigen::MatrixXd & V,
const Eigen::MatrixXi & F,
const int num_iters,
Eigen::MatrixXd & SV,
Eigen::MatrixXi & SF);
#endif