カメラの回転と変換
Contents
[
Hide
]カメラの回転と変換を変更する方法
問題: カメラの回転と変換をどのように変更するか。
ヒント: これを行うには、ダウンロードメソッドを使用してファイルを取得し、VectorRasterizationOptionsプロパティを使用してカメラの位置と回転を変更します。
注意: このコードスニペットは、カメラビューの回転と変換を変更する例を示しています。この方法でカメラの位置を変更できます。
例:
This file contains hidden or 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
var file = GetFileFromDesktop(@"cube_edges.step"); | |
var stp = Image.Load(file); | |
for (var x = 0; x < 360; x += 90) | |
for (var y = 0; y < 360; y += 90) | |
for (var z = 0; z < 360; z += 90) | |
{ | |
var opts = new PngOptions(); | |
opts.VectorRasterizationOptions = new CadRasterizationOptions() | |
{ | |
ObserverPoint = new ObserverPoint() | |
{ | |
AngleRotateX = x, | |
AngleRotateY = y, | |
AngleRotateZ = z, | |
} | |
}; | |
stp.Save($"stp_{x}_{y}_{z}.png", opts); | |
} |