0

Camera LookDirection Automatically

Ardahan 8 years ago updated by anonymous 7 years ago 2

I adding to my viewport3d a model (STL file) using ModelImport function but first nothing show up. To see added 3DModel I have to do zoom out. My question is, are there any way to do dynamically/programmatically zoom out or rotate camera to the newly added model or anything needed to show it immediately.

I am using C# WPF.

+2

To zoom Extents:


CameraHelper.ZoomExtents(helix.Camera, helix.Viewport, 1000)


To change Camera:


cameraPerspective.LookDirection = New Vector3D(0, -10, 0)

cameraPerspective.UpDirection = New Vector3D(0, 0, 1)
cameraPerspective.Position = New Point3D(0, 10, 0)
cameraPerspective.FieldOfView = 45