چرخش و تغییر فرم دوربین
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); | |
} |