Konvertera alla polygoner till trianglar i 3D Modell
Contents
[
Hide
]
Aspose.3D for Java API has support of converting all polygons to triangles in any supported 3D document.
Konvertera alla polygoner till triangler
Vi har lagt till en annan överbelastning av triangulerat metod i klassen PolygonModifier
som tar ett Scene
klassobjekt som en parameter som visas i den här co. Exempel:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The path to the documents directory. | |
String MyDir = RunExamples.getDataDir(); | |
// Load an existing 3D file | |
Scene scene = new Scene(MyDir + "document.fbx"); | |
// Triangulate a scene | |
PolygonModifier.triangulate(scene); | |
// Save 3D scene | |
scene.save(MyDir + "triangulated_out.fbx", FileFormat.FBX7400ASCII); |