06-01-2017, 10:20 PM
Ab3d.PowerToys library comes with many types of cameras.
You can see a sample of each camera type in the "Cameras/Main Cameras Sample" samples project.
You can also see a quick overview of cameras in the following pdf (though FreeCamera is missing here):
https://www.ab4d.com/Documents/Ab3d%20Ca...0sheet.pdf
In many cases you want that the camera is looking at a specified position and then the user can rotate the camera around that position.
In this case it is best to use TargetPositionCamera - you can specify TargetPosition to a center of a 3D object. Then user can change angles at which he watches the TargetPosition and the distance of the camera from that position.
You can move the TargetPositionCamera with changing the TargetPosition - if you change it by (100, 0, 0), then the camera will also move by this amount. Note that the camera position can also move with changing heading, attitude, bank or distance.
You can also use Move... methods to move the camera - for example MoveLeft strafes the camera into the left side.
If you want to have a camera that is similar to third-person shooter game where you watch the scene from the eyes of the main character, then you can use FirstPersonCamera. In this case you set the Position property - this defines the position of the camera (eyes of the main character). In this case heading, attitude and bank define the angles of the camera (head) at which camera is watching the world.
You have the most control of the camera when you use FreeCamera - there you define the TargetPosition and CameraPosition (you can also set UpDirection).
If you want to create a fly-by effect where you will present a specified 3D object, I would recommend you to use TargetPositionCamera and animate heading, attitude, distance and TargetPosition.
The next version of Ab3d.PowerToys will have great support for camera and object animations with using key frames. This way you will be able to easily create camera animations. If everything will go according to plan, then the next version can be released at the end of next week.
If you want to try the pre-release version, please write me a PM and I will send you a download link.
You can see a sample of each camera type in the "Cameras/Main Cameras Sample" samples project.
You can also see a quick overview of cameras in the following pdf (though FreeCamera is missing here):
https://www.ab4d.com/Documents/Ab3d%20Ca...0sheet.pdf
In many cases you want that the camera is looking at a specified position and then the user can rotate the camera around that position.
In this case it is best to use TargetPositionCamera - you can specify TargetPosition to a center of a 3D object. Then user can change angles at which he watches the TargetPosition and the distance of the camera from that position.
You can move the TargetPositionCamera with changing the TargetPosition - if you change it by (100, 0, 0), then the camera will also move by this amount. Note that the camera position can also move with changing heading, attitude, bank or distance.
You can also use Move... methods to move the camera - for example MoveLeft strafes the camera into the left side.
If you want to have a camera that is similar to third-person shooter game where you watch the scene from the eyes of the main character, then you can use FirstPersonCamera. In this case you set the Position property - this defines the position of the camera (eyes of the main character). In this case heading, attitude and bank define the angles of the camera (head) at which camera is watching the world.
You have the most control of the camera when you use FreeCamera - there you define the TargetPosition and CameraPosition (you can also set UpDirection).
If you want to create a fly-by effect where you will present a specified 3D object, I would recommend you to use TargetPositionCamera and animate heading, attitude, distance and TargetPosition.
The next version of Ab3d.PowerToys will have great support for camera and object animations with using key frames. This way you will be able to easily create camera animations. If everything will go according to plan, then the next version can be released at the end of next week.
If you want to try the pre-release version, please write me a PM and I will send you a download link.
Andrej Benedik

