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

22 lines
596 B
C

#ifndef CUBE_H
#define CUBE_H
#include <Eigen/Core>
// Construct the quad mesh of a cube.
//
// Outputs:
// V 8 by 3 list of 3D corner vertex positions
// F 6 by 4 list of quad face indices into rows of V
// UV 14 by 2 list of corner parameterization positions
// UF 6 by 4 list of quad face indices into rows of UV
// NV 6 by 3 list of 3D unit normal vectors
// NF 6 by 4 list of quad face indices into rows of NV
void cube(
Eigen::MatrixXd & V,
Eigen::MatrixXi & F,
Eigen::MatrixXd & UV,
Eigen::MatrixXi & UF,
Eigen::MatrixXd & NV,
Eigen::MatrixXi & NF);
#endif