Commit 32c0c330 authored by TheNumbat's avatar TheNumbat
Browse files

fix halfedge edge normals

parent 6c09f13a
......@@ -28,6 +28,11 @@ GL::Mesh cone_mesh(float bradius, float tradius, float height, int sides, bool c
return Gen::dedup({std::move(cone.verts), std::move(cone.elems)});
}
GL::Mesh cyl_mesh_disjoint(float radius, float height, int sides) {
Gen::Data cone = Gen::cone(radius, radius, height, sides, false);
return GL::Mesh(std::move(cone.verts), std::move(cone.elems));
}
GL::Mesh torus_mesh(float iradius, float oradius, int segments, int sides) {
Gen::Data torus = Gen::torus(iradius, oradius, segments, sides);
return Gen::dedup({std::move(torus.verts), std::move(torus.elems)});
......
......@@ -11,6 +11,7 @@ GL::Mesh cube_mesh(float radius);
GL::Mesh square_mesh(float radius);
GL::Mesh quad_mesh(float x, float y);
GL::Mesh cyl_mesh(float radius, float height, int sides = 12, bool cap = true);
GL::Mesh cyl_mesh_disjoint(float radius, float height, int sides = 12);
GL::Mesh torus_mesh(float iradius, float oradius, int segments = 48, int sides = 24);
GL::Mesh sphere_mesh(float r, int subdivsions);
GL::Mesh hemi_mesh(float r);
......
......@@ -13,7 +13,7 @@
namespace Gui {
Model::Model()
: spheres(Util::sphere_mesh(0.05f, 1)), cylinders(Util::cyl_mesh(0.05f, 1.0f)),
: spheres(Util::sphere_mesh(0.05f, 1)), cylinders(Util::cyl_mesh_disjoint(0.05f, 1.0f)),
arrows(Util::arrow_mesh(0.05f, 0.1f, 1.0f)) {
}
......
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