If you want to use the keyboard, additional to the buttons,
Add the following to your HelixViewPort:
IsMoveEnabled="False" IsPanEnabled="False" IsRotationEnabled="False"
On your button left click:
(repeat for the other buttons, lookdirection an updirection)
PerspectiveCamera cam = ((PerspectiveCamera)h3d.DefaultCamera);
h3d.Camera.AnimateTo(new Point3D()
{
X = cam.Position.X - ViewPortScale * 2,
Y = cam.Position.Y,
Z = cam.Position.Z
},
cam.LookDirection,
cam.UpDirection,
1000);
You need some kind of scale for your model.
(How much does the camera have to move)
Try experimenting with this.
double ViewPortScale = GetViewPortScale(Visual3DHelper.FindBounds(myModelVisual3D, Transform3D.Identity));
private double GetViewPortScale(Rect3D bounds)
{
double biggestSize = 0;
if (bounds.SizeX > biggestSize) biggestSize = bounds.SizeX;
if (bounds.SizeY > biggestSize) biggestSize = bounds.SizeY;
if (bounds.SizeZ > biggestSize) biggestSize = bounds.SizeZ;
ViewPortScale = biggestSize / 100;
return biggestSize / 100;
}