3D文檔管理控件Aspose.3D v19.6發佈上線!增強氣缸的建立!

Aspose.3D for .NET是一個功能豐富的遊戲軟件和計算機輔助設計(CAD)API,用於處理3D文檔格式,無需任何3D建模和渲染軟件依賴。支持Discreet3DS、WavefrontOBJ、FBX(ASCII,二進制)、STL(ASCII,二進制)、Universal3D、Collada、glTF、GLB、PLY、DirectX、Google Draco文件格式等。less

Aspose.3D for .NET更新至v19.6,增強了對氣缸的建立!>>下載Aspose.3D for .NET最新試用版ide

具體更新內容

key 概述 類別
THREEDNET-511 加強圓筒的創造 新功能
THREEDNET-507 打開RVM文件時丟失一些材料 Bug
THREEDNET-508 系統可能沒法在Vulkan渲染器中分配描述符集 Bug

 

Aspose.3D v19.6中的公共API更改


▲在類Aspose.ThreeD.Entities.Cylinder中添加了新的屬性OffsetTop

////// Gets or sets the vertices transformation offset of the top side.
///public Vector3 OffsetTop
{
     get ;
     set ;
}

▲在類Aspose.ThreeD.Entities.Cylinder中添加新屬性OffsetBottom

////// Gets or sets the vertices transformation offset of the bottom side.
///public Vector3 OffsetBottom
{
     get ;
     set ;
}

生成帶有自定義偏移量的圓柱體的示例代碼:spa

Scene scene =  new  Scene();
var  fan =  new  Cylinder( 2 2 10 20 1 false );
fan.OffsetTop =  new  Vector3( 5 3 0 );
scene.RootNode.CreateChildNode(fan).Transform.Translation =  new  Vector3( 10 0 0 );
var  nonfan =  new  Cylinder( 2 2 10 20 1 false );
scene.RootNode.CreateChildNode(nonfan);
scene.Save( "test.obj" , FileFormat.WavefrontOBJ);

1562309721.png

左邊的一個將OffsetTop設置爲(5,3,0),很容易看到頂蓋已經移動,整個軀幹也受到影響。設計

▲在Aspose.ThreeD.Entities.Cylinder類中添加了新屬性GenerateFanCylinder

////// Gets or sets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
///public bool GenerateFanCylinder
{
     get ; set ;
}

用於生成風扇式氣缸和非風扇式氣缸的示例代碼:code

Scene scene =  new  Scene();
var  fan =  new  Cylinder( 2 2 10 20 1 false );
fan.GenerateFanCylinder =  true ;
fan.ThetaLength = MathUtils.ToRadian( 270 );
scene.RootNode.CreateChildNode(fan).Transform.Translation =  new  Vector3( 10 0 0 );
var  nonfan =  new  Cylinder( 2 2 10 20 1 false );
nonfan.GenerateFanCylinder =  false ;
nonfan.ThetaLength = MathUtils.ToRadian( 270 );
scene.RootNode.CreateChildNode(nonfan);
scene.Save( "test.obj" , FileFormat.WavefrontOBJ);

1562309747.png

左側圓柱體具備GenerateFanCylinder = false,右側圓柱體具備GenerateFanCylinder = true。orm

▲在類Aspose.ThreeD.Entities.Cylinder中添加了新的屬性ShearTop

////// Gets or sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
///public Vector2 ShearTop
{
     get ;
     set ;
}

▲在類Aspose.ThreeD.Entities.Cylinder中添加了新的屬性ShearBottom

////// Gets or sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
///public Vector2 ShearBottom
{
     get ;
     set ;
}

顯示ShearBottom(ShearTop)用法的示例代碼:blog

Scene scene =  new  Scene();
var  cylinder1 =  new  Cylinder( 2 2 10 20 1 false );
cylinder1.ShearBottom =  new  Vector2( 0 0.83 ); // shear 47.5deg in xy plane(z-axis)
scene.RootNode.CreateChildNode(cylinder1).Transform.Translation =  new  Vector3( 10 0 0 );
var  cylinder2 =  new  Cylinder( 2 2 10 20 1 false );
scene.RootNode.CreateChildNode(cylinder2);
scene.Save( "test.obj" , FileFormat.WavefrontOBJ);

1562309767.png

左邊的圓柱體爲剪切底部到(0,0.83),而右邊的圓柱體爲序數圓柱體。遊戲


歡迎加入ASPOSE技術交流QQ羣(642018183),各種資源及時分享,歡迎交流討論!ci

相關文章
相關標籤/搜索