protected override void CreateScenery() { // Bundling group bounds Min: -1,162461, -1,895607, -1,119851 Max: 1,143143, 3,227034, 1,15625 var parser = ObjFileParser.ParseFromFile("ObjFileParsing\\ObjFiles\\lowpolytree.obj"); AddShapesToWorld(parser.BundlingGroup); }
public void Converting_an_OBJ_file_to_a_group() { var path = Path.Combine(_objFilesDir, "triangles.obj"); var parser = ObjFileParser.ParseFromFile(path); var bundlingGroup = parser.BundlingGroup; bundlingGroup.Shapes.Should().Contain(parser.GetGroup("FirstGroup")); bundlingGroup.Shapes.Should().Contain(parser.GetGroup("SecondGroup")); }
public void Triangles_in_named_groups() { var path = Path.Combine(_objFilesDir, "triangles.obj"); var parser = ObjFileParser.ParseFromFile(path); var group1 = parser.GetGroup("FirstGroup"); var triangle1 = (Triangle)group1.Shapes[0]; triangle1.P1.Should().Be(parser.Vertices[1]); triangle1.P2.Should().Be(parser.Vertices[2]); triangle1.P3.Should().Be(parser.Vertices[3]); var group2 = parser.GetGroup("SecondGroup"); var triangle2 = (Triangle)group2.Shapes[0]; triangle2.P1.Should().Be(parser.Vertices[1]); triangle2.P2.Should().Be(parser.Vertices[3]); triangle2.P3.Should().Be(parser.Vertices[4]); }
protected override void CreateScenery() { var parser = ObjFileParser.ParseFromFile("ObjFileParsing\\ObjFiles\\cow-nonormals.obj"); AddShapesToWorld(parser.BundlingGroup); }