add quadmesh
This commit is contained in:
@@ -155,6 +155,18 @@ class TestMathNewTypes(unittest.TestCase):
|
||||
# SetValue(id, value) sets At(id).Value = value
|
||||
self.assertAlmostEqual(img.GetValue([0, 0, 0]), 10.5)
|
||||
|
||||
def test_quad_mesh(self):
|
||||
mesh = uLib.Math.QuadMesh()
|
||||
mesh.AddPoint(uLib.Math.Vector3f([0, 0, 0]))
|
||||
mesh.AddPoint(uLib.Math.Vector3f([1, 0, 0]))
|
||||
mesh.AddPoint(uLib.Math.Vector3f([1, 1, 0]))
|
||||
mesh.AddPoint(uLib.Math.Vector3f([0, 1, 0]))
|
||||
|
||||
mesh.AddQuad(uLib.Math.Vector4i([0, 1, 2, 3]))
|
||||
|
||||
self.assertEqual(len(mesh.Points()), 4)
|
||||
self.assertEqual(len(mesh.Quads()), 1)
|
||||
|
||||
class TestMathVoxRaytracer(unittest.TestCase):
|
||||
def test_raytracer(self):
|
||||
grid = uLib.Math.StructuredGrid([10, 10, 10])
|
||||
|
||||
Reference in New Issue
Block a user