Costruisci dati tangenti e binormali per tutte le maglie nel modello 3D
Contents
[
Hide
]
Utilizzando Aspose.3D for .NET API, gli sviluppatori possono creare dati tangenti e binormali per tutte le mesh in qualsiasi file 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
// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET | |
// Load an existing 3D file | |
Scene scene = new Scene(RunExamples.GetDataFilePath("document.fbx")); | |
// Triangulate a scene | |
PolygonModifier.BuildTangentBinormal(scene); | |
// Save 3D scene | |
scene.Save(RunExamples.GetOutputFilePath("BuildTangentAndBinormalData_out.fbx"), FileFormat.FBX7400ASCII); |