12 const size_t size = opt.
size;
14 auto mptr = std::make_shared<TriMesh>();
18 tris.rowwise() =
Vector3l(0, 1, 2).transpose();
19 auto mut = tris.rightCols<2>();
20 for (
int j = 0; j < size; ++j) {
21 mut.row(j).array() += j;
24 tris(size - 1, 2) = 1;
28 int vertex_size = size + 1;
29 double radius = csettings.radius;
30 const auto& name = csettings.name;
31 double dtheta = 2.0 * M_PI / size;
32 double theta0 = M_PI * csettings.degree_offset / 180.0;
35 Eigen::Matrix<double, Eigen::Dynamic, 2> P(vertex_size, 2);
37 for (
int j = 0; j < size; ++j) {
38 double theta = theta0 + dtheta * j;
39 double c = std::cos(theta);
40 double s = std::sin(theta);
43 Eigen::Vector2d::ConstMapType o(csettings.center.data());
44 P.rowwise() += o.transpose();
void initialize(Eigen::Ref< const RowVectors3l > FV, Eigen::Ref< const RowVectors3l > FE, Eigen::Ref< const RowVectors3l > FF, Eigen::Ref< const VectorXl > VF, Eigen::Ref< const VectorXl > EF)
std::optional< Coordinates > coordinates
std::shared_ptr< TriMesh > make_mesh(const DiskOptions &opt)
attribute::MeshAttributeHandle set_matrix_attribute(const Mat &data, const std::string &name, const PrimitiveType &type, Mesh &mesh)
Vector< int64_t, 3 > Vector3l
RowVectors< int64_t, 3 > RowVectors3l