카메라 뷰 회전 및 변환
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); | |
} |