45 using VertexType = MeshType::VertexType;
46 using CoordType = VertexType::CoordType;
47 using ScalarType = CoordType::ScalarType;
51 const ScalarType
fi = (1 + std::sqrt(5)) / 2;
52 const ScalarType
s0 = 0;
53 const ScalarType
s1 =
fi;
54 const ScalarType
s2 = std::pow(
fi, 2);
55 const ScalarType
s3 = 1;
57 log.log(0,
"Adding vertices to PolyMesh...");
81 log.log(50,
"Vertices added to PolyMesh.");
82 log.log(50,
"Adding faces to PolyMesh...");
84 mesh.reserveFaces(12);
85 mesh.addFace(14, 11, 18, 2, 1);
86 mesh.addFace(2, 17, 7, 13, 1);
87 mesh.addFace(15, 8, 19, 4, 3);
88 mesh.addFace(4, 0, 12, 16, 3);
89 mesh.addFace(16, 5, 6, 15, 3);
90 mesh.addFace(13, 6, 5, 14, 1);
91 mesh.addFace(18, 10, 9, 17, 2);
92 mesh.addFace(19, 9, 10, 0, 4);
93 mesh.addFace(17, 9, 19, 8, 7);
94 mesh.addFace(13, 7, 8, 15, 6);
95 mesh.addFace(16, 12, 11, 14, 5);
96 mesh.addFace(18, 11, 12, 0, 10);
98 log.log(100,
"Faces added to PolyMesh.");
std::vector< uint > earCut(Iterator begin, Iterator end)
Triangulates a simple polygon with no holes using the ear-cutting algorithm.
Definition ear_cut.h:92
MeshType createDodecahedron(LogType &log=nullLogger)
Creates and returns a Polygon Mesh containing a Dodecahedron.
Definition dodecahedron.h:43