public void GetMesh() { var l = new LineShape(new Vector3(1, 2, 3), Vector3.UnitY); LineShape.MeshSize = 10; var m = l.GetMesh(0, 1); Assert.AreEqual(1, m.NumberOfTriangles); Triangle t = m.GetTriangle(0); Assert.IsTrue(l.PointOnLine - LineShape.MeshSize / 2 * Vector3.UnitY == t.Vertex0); Assert.IsTrue(l.PointOnLine + LineShape.MeshSize / 2 * Vector3.UnitY == t.Vertex2); }
public void GetMesh() { var l = new LineShape(new Vector3F(1, 2, 3), Vector3F.UnitY); LineShape.MeshSize = 10; var m = l.GetMesh(0, 1); Assert.AreEqual(1, m.NumberOfTriangles); Triangle t = m.GetTriangle(0); Assert.IsTrue(l.PointOnLine - LineShape.MeshSize / 2 * Vector3F.UnitY == t.Vertex0); Assert.IsTrue(l.PointOnLine + LineShape.MeshSize / 2 * Vector3F.UnitY == t.Vertex2); }