Camera view rotation and transform
How to change camera rotation and transform
Issue: How to change camera rotation and transform.
Tips: To do this, you can get the file using the download method, change the camera position and rotations using the VectorRasterizationOptions property.
Note: This code snippet shows an example of changing the rotation and transformation of the camera view. This way you can change the position of the camera.
Example:
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); | |
} |