06-06-2017, 11:26 AM
If you want to fly the camera around your object at a constant distance, then it is best to use TargetPositionCamera: just set the TargetPosition to the center of your object, then specify the Distance and then you can animate the Heading and Attitude properties to rotate the camera around your object.
You can also use StartRotation method on the camera object to start a rotation around the TargetPosition.
The idea of TargetPositionCamera is that you do not need to calculate the camera's position - for example if you want to look at specific object you set TargetPosition to the center of that object (or to some other part of that object). Then you want to look at your object slightly from the left (you set Heading to 30) and slightly from above (set Attitude to -20) and at a distance of 200 units. What is more, you can preview the scene in Visual Studio designer and easily adjust the angles and distance to suite your need. This way of defining the camera is much more intuitive then using Camera position and LookDirection (as with standard WPF camera).
The FreeCamera will give you full control of CameraPositon and TragetPositon, but you will not be able to use handy angles and distance to position the camera (though in the Ab3d.PowerToys v8.0+ there will be new SetCameraPosition and SetTargetPosition methods that will allow you to define the camera by the angles and distance). To create a animation with changing CameraPositon and TragetPositon were cameras flies around the object will require some math.
With FreeCamera you also do not need to define the LookDirection - this is already defined by the CameraPositon and TragetPositon properties.
The text from documentation was not correct. It was on a LookDirection property that only had a getter and is a helper property to easily retrieve LookDirection. The correct text is: "Gets a Vector3D which defines the look direction of the camera."
I am sorry for that mistake that was misleading.
I would also like to invite you to try the beta version of the new Ab3d.PowerToys v8.0. This version has a build in support for camera and object animations (and many many other great new features). I will send you a download link as a private message. If others would also like to try the new version, please contact me with PM or by email.
You can also use StartRotation method on the camera object to start a rotation around the TargetPosition.
The idea of TargetPositionCamera is that you do not need to calculate the camera's position - for example if you want to look at specific object you set TargetPosition to the center of that object (or to some other part of that object). Then you want to look at your object slightly from the left (you set Heading to 30) and slightly from above (set Attitude to -20) and at a distance of 200 units. What is more, you can preview the scene in Visual Studio designer and easily adjust the angles and distance to suite your need. This way of defining the camera is much more intuitive then using Camera position and LookDirection (as with standard WPF camera).
The FreeCamera will give you full control of CameraPositon and TragetPositon, but you will not be able to use handy angles and distance to position the camera (though in the Ab3d.PowerToys v8.0+ there will be new SetCameraPosition and SetTargetPosition methods that will allow you to define the camera by the angles and distance). To create a animation with changing CameraPositon and TragetPositon were cameras flies around the object will require some math.
With FreeCamera you also do not need to define the LookDirection - this is already defined by the CameraPositon and TragetPositon properties.
The text from documentation was not correct. It was on a LookDirection property that only had a getter and is a helper property to easily retrieve LookDirection. The correct text is: "Gets a Vector3D which defines the look direction of the camera."
I am sorry for that mistake that was misleading.
I would also like to invite you to try the beta version of the new Ab3d.PowerToys v8.0. This version has a build in support for camera and object animations (and many many other great new features). I will send you a download link as a private message. If others would also like to try the new version, please contact me with PM or by email.
Andrej Benedik

