main.cc 340 Bytes
Newer Older
Philip Trettner's avatar
Philip Trettner committed
1
2
3
#include <polymesh/Mesh.hh>
#include <polymesh/objects.hh>

Philip Trettner's avatar
Philip Trettner committed
4
#include <typed-geometry/tg.hh>
Philip Trettner's avatar
Philip Trettner committed
5
6
7
8
9
10
11
12
13
14
15
16
17

int main()
{
    using namespace pm;

    Mesh m;
    auto pos = m.vertices().make_attribute<tg::pos3>();

    objects::add_cube(m, [&](vertex_handle v, float x, float y, float z) {
        // assign position
        pos[v] = {x, y, z};
    });
}