AwV4::Camera Class Reference

A wrapper class defining a 'camera' object. More...

#include <AwV4.h>

List of all members.

Public Member Functions

unsigned short & Flags ()
 Return the bitfield containing camera options.
float & Zoom ()
 Determine the camera's zoom factor.
SimpleStringTagName ()
 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.


Detailed Description

A wrapper class defining a 'camera' object.

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.


Constructor & Destructor Documentation

AwV4::Camera::Camera (  ) 

Default constructor.

Constructor which initializes the camera wrapper class.


Member Function Documentation

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.


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 05:45:58 2007 for AwV4 by  doxygen 1.5.1-p1