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 |
////// Gets or sets the vertices transformation offset of the top side.
///public Vector3 OffsetTop
{
get
;
set
;
}
|
////// 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);
|
左邊的一個將OffsetTop設置爲(5,3,0),很容易看到頂蓋已經移動,整個軀幹也受到影響。設計
////// 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);
|
左側圓柱體具備GenerateFanCylinder = false,右側圓柱體具備GenerateFanCylinder = true。orm
////// 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
;
}
|
////// 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);
|
左邊的圓柱體爲剪切底部到(0,0.83),而右邊的圓柱體爲序數圓柱體。遊戲
歡迎加入ASPOSE技術交流QQ羣(642018183),各種資源及時分享,歡迎交流討論!ci