Add tests for mesh manifold check

This commit is contained in:
James Smith committed 2024-04-02 12:48:01 +01:00
1 parent 8acb81ca90
commit 79e3e73dcb
1 file changed
+15
+15
View File
@@ -0,0 +1,15 @@
require "rails_helper"
RSpec.describe "MeshAnalysis" do
it "verifies that meshes are manifold (i.e. do not have holes)" do
geometry = Mittsu::SphereGeometry.new(2.0, 32, 16)
expect(geometry.manifold?).to be true
end
it "detects meshes that are non-manifold (i.e. do have holes)" do
geometry = Mittsu::PlaneBufferGeometry.new(1.0, 1.0)
expect(geometry.manifold?).to be false
end
end