Commit 428ea3ad authored by Philip Trettner's avatar Philip Trettner
Browse files

.of functions for converting indices to handles

parent 13d60d7c
......@@ -37,6 +37,10 @@ struct primitive_index
explicit operator int() const { return value; }
/// creates a handle from this idx and the given mesh
handle_t of(Mesh const& m) const { return handle_t(&m, index_t(value)); }
handle_t of(Mesh const* m) const { return handle_t(m, index_t(value)); }
/// indexes this primitive by a functor
/// also works for attributes
/// - e.g. v[position] or f[area]
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