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();