Bygg Tangent- och Binormaldata för alla meshes i 3D Modell
Contents
[
Hide
]
Genom att använda Aspose.3D for .NET API kan utvecklare bygga tangent och binormal data för alla maskor i vilken 3D-fil som stöds.
Bygg Tangent och Binormal data för mesh
Vi har lagt till två BuildTangentBinormal metoder i klassen PolygonModifier
. 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
// 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); |