Browse our Products

Aspose.3D for .NET 22.3 Notes de Libération

Améliorations et changements

CléRésuméCatégorie
THREEDNET-1103Améliorez le maillage important en U3D/PDF d’exportation de fichiersAmélioration
THREEDNET-1081Ajouter des fonctions simplifiées pour la fusion de scènesAmélioration
THREEDNET-1077Le glTF généré ne peut pas passer le validateur glTF lorsque la compression draco est activée.Correction de bogue

API changements

Ajout de nouvelles méthodes statiques à la classe Aspose.ThreeD.Scene:

        /// <summary>
        /// Opens the scene from given stream using specified file format.
        /// </summary>
        /// <param name="stream">Input stream, user is responsible for closing the stream.</param>
        /// <param name="format">File format.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromStream(Stream stream, FileFormat format, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        /// Opens the scene from given stream using specified IO config.
        /// </summary>
        /// <param name="stream">Input stream, user is responsible for closing the stream.</param>
        /// <param name="options">More detailed configuration to open the stream.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromStream(Stream stream, LoadOptions options, CancellationToken cancellationToken = default(CancellationToken));
        /// <summary>
        ///  Opens the scene from given stream
        /// </summary>
        /// <param name="stream">Input stream, user is responsible for closing the stream.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromStream(Stream stream, CancellationToken cancellationToken = default(CancellationToken));

Ces surcharges permettent de construire une scène directement à partir d’un flux, avec plus d’options héritées du Scene.Open.

        //Before 22.3, load a scene from stream:
        //var scene = new Scene();
        //scene.Open(stream);

        //Now we load a scene from stream
        var scene = Scene.FromStream(stream);

Ajout de nouvelles méthodes statiques à la classe Aspose.ThreeD.Scene:

        /// <summary>
        /// Opens the scene from given path using specified file format.
        /// </summary>
        /// <param name="fileName">File name.</param>
        /// <param name="format">File format.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromFile(string fileName, FileFormat format, CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// Opens the scene from given path using specified file format.
        /// </summary>
        /// <param name="fileName">File name.</param>
        /// <param name="options">More detailed configuration to open the stream.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromFile(string fileName, LoadOptions options, CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// Opens the scene from given path
        /// </summary>
        /// <param name="fileName">File name.</param>
        /// <param name="cancellationToken">Cancellation token to the load task</param>
        public static Scene FromFile(string fileName, CancellationToken cancellationToken = default(CancellationToken));

Ces surcharges permettent de construire une scène directement à partir du nom de fichier, avec plus d’options héritées du Scene.Open.

L’ancien constructeur de Scene avec un paramter FileName est maintenant marqué comme obsolète et sera supprimé à l’avenir.

        //Before 22.3, load a scene from file:
        //var scene = new Scene();
        //scene.Open("fileName");

        //Now we load a scene from file
        var scene = Scene.FromFile("fileName");

Ajout de nouvelles méthodes statiques à la classe Aspose.ThreeD.Node:

        /// <summary>
        /// Detach everything under the node and attach them to current node.
        /// </summary>
        /// <param name="node"></param>
        public void Merge(Aspose.ThreeD.Node node);

Cette nouvelle méthode permet de tout fusionner d’un autre nœud au nœud actuel.

Exemple de code pour fusionner file1 et file2:

        var scene1 = Scene.FromFile("file1");
        var scene2 = Scene.FromFile("file2");
        scene1.RootNode.Merge(scene2.RootNode);
        scene1.Save("output.fbx", FileFormat.FBX7700Binary);


 
 Français