Costruisci dati tangente e binormale per tutte le maglie nel modello 3D
Contents
[
Hide
]
Con Aspose.3D for Java API, gli sviluppatori possono creare dati tangenti e binormali per tutte le mesh in qualsiasi documento 3D supportato.
Costruisci dati Tangenti e Binormal per Mesh
Abbiamo aggiunto due metodi buildTangentBinormal
nella classe PolygonModifier
. Un metodo prende l’oggetto della classe Scene
come parametro e un altro prende l’oggetto della classe Mesh
come parametro, come mostrato in questo esempio di codice:
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); |