Commit 23c4e2a5 authored by Zain Selman's avatar Zain Selman 💬
Browse files

assume triangles as given. should not serve as a complete working example

parent 31fccb3e
......@@ -47,21 +47,12 @@ Add Triangle Faces to Mesh
::
// given:
// std::vector<tg::triangle3> tris;
pm::Mesh m;
auto pos = pm::vertex_attribute<tg::pos3>(m);
const auto n = 10;
std::vector<tg::triangle3> tris;
tris.reserve(n);
// some box to sample random positions
const auto box = tg::box3(tg::aabb3({-n, -n, -n}, {n, n, n}));
tg::rng rng;
// create random triangles
for (auto i = 0u; i < n; ++i)
tris.emplace_back(tg::triangle3(tg::uniform(rng, box), tg::uniform(rng, box), tg::uniform(rng, box)));
for (auto const& tri : tris)
{
/// add vertices to topology
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment