Bygg Tangent- och Binormaldata för alla meshes i 3D Modell
Contents
[
Hide
]
Med Aspose. 3D for Java API, utvecklare kan bygga tangent- och binormal data för alla maskor i ett dokument som stöds 3D.
Bygg Tangent och Binormal data för mesh
Vi har lagt till två buildTangentBinormal
-metoder i PolygonModifier
klassen. En metod tar Scene
klassobjektet som en parameter och en annan tar Mesh
klassobjektet som en parameter som visas i den här co. Exempel:
This file contains 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.buildTangentBinormal(scene); | |
// Save 3D scene | |
scene.save(MyDir + "BuildTangentAndBinormalData_out.fbx", FileFormat.FBX7400ASCII); |