public void Traversal_of_TransformedPolysurface_follows_traversal_of_original_IPolysurface() { var origSurface = MockPolysurface(); var transSurface = new TransformedPolysurface(origSurface, RotoTranslation3.Id); var vertex = transSurface.Vertices.ElementAt(1).Edges.ElementAt(1).LeftFace.Edges.ElementAt(0).RightFace.Edges.ElementAt(0).Source.Edges.ElementAt(1).Target; Expect(vertex.Order, Is.EqualTo(5)); }
public void TransformedPolysurface_Face_normals_result_from_original_IPolysurface_Face_normals_by_applying_Rotation3() { var origSurface = MockPolysurface(); var transformation = new RotoTranslation3(new Rotation3(new Quaternion(1.1, -2.2, 3.3, -4.4)), new Vector3(4.1, -2.4, 1.3)); var transSurface = new TransformedPolysurface(origSurface, transformation); var normal = transSurface.Faces.ElementAt(1).Normal; Expect(Vector3.Distance(normal, transformation.Rotation * MockFaceNormal(1)), Is.LessThan(_tolerance)); }
public void TransformedPolysurface_Vertex_points_result_from_original_IPolysurface_Vertex_points_by_applying_RotoTranslation3() { var origSurface = MockPolysurface(); var transformation = new RotoTranslation3(new Rotation3(new Quaternion(1.1, -2.2, 3.3, -4.4)), new Vector3(4.1, -2.4, 1.3)); var transSurface = new TransformedPolysurface(origSurface, transformation); var point = transSurface.Vertices.ElementAt(1).Point; Expect(Vector3.Distance(point, transformation.Apply(MockVertexPoint(1))), Is.LessThan(_tolerance)); }
public void TransformedPolysurface_Face_polygons_result_from_original_IPolysurface_Face_polygons_by_applying_RotoTranslation3() { var origSurface = MockPolysurface(); var transformation = new RotoTranslation3(new Rotation3(new Quaternion(1.1, -2.2, 3.3, -4.4)), new Vector3(4.1, -2.4, 1.3)); var transSurface = new TransformedPolysurface(origSurface, transformation); var polygon = transSurface.Faces.ElementAt(1).Polygon; var actualVertex = polygon.Contours().First().Vertices.First(); var expectedVertex = transformation.Apply(MockFacePolygon(1)).Contours().First().Vertices.First(); Expect(Vector3.Distance(actualVertex, expectedVertex), Is.LessThan(_tolerance)); }
public UndirectedEdgeComparerImpl(TransformedPolysurface parent) { _parent = parent; }
public TransformedFace(IPolysurfaceFace localFace, TransformedPolysurface parent) { _localFace = localFace; _parent = parent; }
public TransformedEdge(IPolysurfaceEdge localEdge, TransformedPolysurface parent) { _localEdge = localEdge; _parent = parent; }
public TransformedVertex(IPolysurfaceVertex localVertex, TransformedPolysurface parent) { _localVertex = localVertex; _parent = parent; }
public FaceCollection(TransformedPolysurface parent) { _parent = parent; }
public VertexCollection(TransformedPolysurface parent) { _parent = parent; }