Creating and using the IonCamera class. More...
Detailed Description
Creating and using the IonCamera class.
The user is able to create and load their own custom Cameras via the IonCamera class. This base class acts as a wrapper for the Camera class and allows the user to set up code to be executed every frame via the IonCamera::Update() function. This class contains:
- A pointer to a Camera object pCamera
- The pure virtual IonCamera::Update() function
- The IonCamera::GetCamera() function
- All function's of Azule's Camera class to use on pCamera
For example implementation, lets make a simple Ion Camera class that rotates around a given point on creation:
RotateCam.h:
RotateCam.cpp:
UserScene.cpp:
This IonCamera is given a Vector to look at, sets up the pCamera Orientation and Position, then updates its position every frame in the IonCamera::Update() function.
To enable the IonCamera, the user creates a new RotateCam in their Scene and uses the Scene::SetCamera() function.
Classes | |
class | IonCamera |
Camera wrapper base class for making custom cameras. More... | |