#include <AwV4.h>
Public Member Functions | |
| unsigned short & | Flags () |
| Return the bitfield containing camera options. | |
| float & | Zoom () |
| Determine the camera's zoom factor. | |
| SimpleString & | TagName () |
| Determine the camera's tag name. | |
| aw_object_data_camera * | GetObjectData () |
| Create an aw_object_data_camera structure. | |
| Camera () | |
| Default constructor. | |
| void | Assign (const aw_object_data_camera *data) |
| Assign camera data from an SDK structure. | |
This class encapsulates a camera object. The methods return references to various fields, which may be used to update them.
For example:
float& zoom = cam.Zoom();
Will allow you to update the camera's zoom by assigning a value to the 'zoom' reference.
| AwV4::Camera::Camera | ( | ) |
Default constructor.
Constructor which initializes the camera wrapper class.
| unsigned short& AwV4::Camera::Flags | ( | ) | [inline] |
Return the bitfield containing camera options.
This value is a bitfield which contains all of the active camera options.
Camera flags are defined in AW_CAMERA_FLAGS. Examples follow.
To determine if the 'AW_CAMERA_FLAG_TRACK_USER' flag is set:
bool bTrackUser = (cam.Flags() & AW_CAMERA_FLAG_TRACK_USER)? true : false;
To remove a flag:
unsigned short& opts = cam.Flags(); opts &= ~AW_CAMERA_FLAG_TRACK_USER;
To add a flag:
unsigned short& opts = cam.Flags(); opts |= AW_CAMERA_FLAG_TRACK_USER;
| float& AwV4::Camera::Zoom | ( | ) | [inline] |
Determine the camera's zoom factor.
Enter 1 for a normal ninety-degree view. Lower values will produce a wide-angle lens, while higher values will produce a zoom effect.
| SimpleString& AwV4::Camera::TagName | ( | ) | [inline] |
Determine the camera's tag name.
Use this to assign a name to the camera. A camera must have a name to be used.
| aw_object_data_camera * AwV4::Camera::GetObjectData | ( | ) |
Create an aw_object_data_camera structure.
Creates and returns an aw_object_data_camera structure using the data from this wrapper class.
Note that it is up to the caller to appropriately use free() to delete the memory associated with this structure.
| void AwV4::Camera::Assign | ( | const aw_object_data_camera * | data | ) |
Assign camera data from an SDK structure.
Constructor which initializes the camera wrapper class from an existing aw_object_data_camera structure.
1.5.1-p1