浏览我们的产品

Aspose.3D for .NET 21.2发行说明

改进和变更

钥匙摘要类别
THREEDNET-825添加USDZ导入支持。新功能
THREEDNET-824在USDZ中添加纹理支持任务
THREEDNET-811在API中实现与评估版本相关的异常改进
THREEDNET-813材料和纹理API限制需要技术细节-API没有提供一种方法来发现材料上的纹理改进
THREEDNET-817在glb,gltf,obj的情况下添加对纹理字节 [] 的支持改进
THREEDAPP-80提高网页渲染器的页面加载速度改进
THREEDNET-814三角形指数不正确错误修复
THREEDNET-809FBX保存异常: 不支持的属性类型错误修复
THREEDNET-810文件大小越来越大,同时重复使用相同的纹理错误修复
THREEDNET-816加载OBJ时网格不正确错误修复
THREEDNET-807导出的FBX中没有纹理错误修复
THREEDNET-815着色器模型 = 未知的材质将无法渲染。错误修复
THREEDNET-823附加到同一节点的多个网格未呈现。错误修复
THREEDNET-647在web渲染器中添加缩放控件UI。任务
THREEDNET-646在web渲染器中添加旋转控制UI。任务

API更改

添加了类Aspose.ThreeD.着色.TextureSlot

这暴露了材料中的内部纹理插槽,为了从材料中访问所有可用的纹理插槽,请使用foreach语句:

var mat = new PbrMaterial();
foreach(var textureSlot in mat)
{
    Console.WriteLine(textureSlot.SlotName);
    Console.WriteLine(textureSlot.Texture);
}

添加了类Aspose.ThreeD.TrialException

从21.2开始,当未许可使用达到许可限制时,将引发TrialException来通知许可限制,以及如何申请临时许可。

您可以通过在保存/打开操作上的环绕try/catch块来忽略此异常,或者通过以下方式关闭此异常:

TrialException.SuppressTrialException = true;

关闭此消息不会解除限制 (如exporter/importer忽略额外的节点)。

为了获得所有完整功能,请申请临时许可证或购买完整功能许可证。

向Aspose.ThreeD.Entities.TriMesh添加了方法

public Aspose.ThreeD.Utilities.Vector4 ReadVector4(int idx, Aspose.ThreeD.Utilities.VertexField field);
public Aspose.ThreeD.Utilities.FVector4 ReadFVector4(int idx, Aspose.ThreeD.Utilities.VertexField field);
public Aspose.ThreeD.Utilities.Vector3 ReadVector3(int idx, Aspose.ThreeD.Utilities.VertexField field);
public Aspose.ThreeD.Utilities.FVector3 ReadFVector3(int idx, Aspose.ThreeD.Utilities.VertexField field);
public Aspose.ThreeD.Utilities.Vector2 ReadVector2(int idx, Aspose.ThreeD.Utilities.VertexField field);
public Aspose.ThreeD.Utilities.FVector2 ReadFVector2(int idx, Aspose.ThreeD.Utilities.VertexField field);
public double ReadDouble(int idx, Aspose.ThreeD.Utilities.VertexField field);
public float ReadFloat(int idx, Aspose.ThreeD.Utilities.VertexField field);

这些方法允许您在不分配额外内存的情况下读取vertex的字段,从TriMesh访问vertex的传统方式实际上生成了很多临时对象,这些可以提供快速且低内存占用的访问。

场景s = 新场景 (@ "test.STL")
var mesh = (Mesh)s.RootNode.ChildNodes[0].实体;

// 创建一个新的VertexDeclaration,因此我们稍后构建的TriMesh将使用此内存布局。
var vd = VertexDeclaration()
var pos = vd.AddField(VertexFieldDataType.FVector3, VertexFieldSemantic.Position);
var normal = vd.AddField(VertexFieldDataType.FVector3, VertexFieldSemantic.Normal);
var uv = vd.AddField(VertexFieldDataType.FVector2, VertexFieldSemantic.UV);
// 使用手动指定的顶点声明从网格实例创建一个TriMesh实例
var m = TriMesh.FromMesh(vd,网格)
对于 (int i = 0; i< m.VerticesCount; i++)
{
    //access each field
    var v_pos = m.ReadFVector3(i, pos);
    var v_normal = m.ReadFVector3(i, normal);
    var v_uv = m.ReadFVector3(i, uv);
    Console.WriteLine($"({v_pos}), ({v_uv}), ({v_normal})");
}

在Aspose.ThreeD.FileFormat中添加了新的文件格式

/// <summary>
/// Compressed Universal Scene Description
/// </summary>
public static readonly FileFormat USDZ;

Aspose.3D 21.2现在可以加载USDZ格式。

修复了不一致的api:

这些旧类会保留一段时间,并引入新的类来取代它们:

老班新课
Aspose.ThreeD.Formats.A3DWSaveOptionsAspose.ThreeD.Formats.A3dwSaveOptions
Aspose.ThreeD.Formats.AMFSaveOptionsAspose.ThreeD.Formats.AmfSaveOptions
Aspose.ThreeD.Formats.Discreet3dsloadoponsAspose.ThreeD.Formats.Discreet3dsloadopions
Aspose.ThreeD.Formats.Discreet3DSSaveOptionsAspose.ThreeD.Formats.Discreet3dsSaveOptions
Aspose.ThreeD.Formats.FbxloadopionsAspose.ThreeD.Formats.Fbxloadopions
Aspose.ThreeD.Formats.FBXSaveOptionsAspose.ThreeD.Formats.FbxSaveOptions
Aspose.ThreeD.Formats.GltfloadoponsAspose.ThreeD.Formats.Gltfloadopons
Aspose.ThreeD.Formats.GLTFSaveOptionsAspose.ThreeD.Formats.GltfSaveOptions
Aspose.ThreeD.Formats.HTML5SaveOptionsAspose.ThreeD.Formats.Html5SaveOptions
Aspose.ThreeD.Formats.StlloadoponsAspose.ThreeD.Formats.Stlloadopons
Aspose.ThreeD.Formats.STLSaveOptionsAspose.ThreeD.Formats.StlSaveOptions
Aspose.ThreeD.Formats.U3DLoadOptionsAspose.ThreeD.Formats.U3dloadopons


 
 简体中文