AwV4::Zone Class Reference

A wrapper class defining a 'zone' object type. More...

#include <AwV4.h>

List of all members.

Public Member Functions

aw_type_vector & Size ()
 Determine this zone's size.
unsigned char & Shape ()
 Determine the shape of this zone.
char & Priority ()
 Determine this zone's priority value.
float & Gravity ()
 Determine the gravity of this zone.
float & Friction ()
 Determine the friction value in this zone.
unsigned short & Flags ()
 Return the bitfield containing zone options.
unsigned long & Color ()
 Determine the fog and water color for this zone.
unsigned short & FogMin ()
 Determine the zone's 'near' fog setting.
unsigned short & FogMax ()
 Determine the zone's 'far' fog setting.
SimpleStringFootstepSound ()
 Determine this zone's footstep sound, if any.
SimpleStringAmbientSound ()
 Determine this zone's ambient sound, if any.
SimpleStringCameraTag ()
 Determine this zone's camera tag, if any.
SimpleStringTargetCursor ()
 Determine this zone's target cursor, if any.
aw_object_data_zone * GetObjectData ()
 Create an aw_object_data_zone structure.
 Zone ()
 Default constructor.
void Assign (const aw_object_data_zone *data)
 Assign zone data from an SDK structure.


Detailed Description

A wrapper class defining a 'zone' object type.

This class encapsulates a zone object. The methods return references to various fields, which may be used to update them.

For example:

float& zgrav = myzone.Gravity();

Will allow you to update the zone's gravity by assigning a value to the 'zgrav' reference.

Examples:

example.cpp.


Constructor & Destructor Documentation

AwV4::Zone::Zone (  ) 

Default constructor.

Constructor which initializes the zone wrapper class.


Member Function Documentation

aw_type_vector& AwV4::Zone::Size (  )  [inline]

Determine this zone's size.

This defines the size of the zone. See "Volume Shape" above for details on how these values are used.

unsigned char& AwV4::Zone::Shape (  )  [inline]

Determine the shape of this zone.

This controls the shape of the area. There are 3 types:

1) AW_ZONE_TYPE_CUBE - The zone is a rectangular area in size as defined by the Size values.

2) AW_ZONE_TYPE_CYLINDER - The zone is a cylindrical area. The X Size defines the radius of the cylinder, the Y Size defines the height, and the Z Size is unused.

3) AW_ZONE_TYPE_SPHERE - The zone is a sphere whose radius is defined by the X Size value. The Y and Z values are not used.

char& AwV4::Zone::Priority (  )  [inline]

Determine this zone's priority value.

When two zones intersect, there needs to be some way to define which zone supersedes the other. When you stand in a spot where two zones intersect, which zone are you really in? The priority value defines how important this zone is in relation to others. The lower the number, the more important the zone is.

float& AwV4::Zone::Gravity (  )  [inline]

Determine the gravity of this zone.

This controls how fast users will fall when in this zone. A value of 1.00 is "normal" gravity.

float& AwV4::Zone::Friction (  )  [inline]

Determine the friction value in this zone.

This controls how fast users will stop when walking in this zone. A value of 1.00 is considered "normal" friction. Lower values will make walking "slippery", while higher values will slow walking speed and cause the user to stop more quickly.

unsigned short& AwV4::Zone::Flags (  )  [inline]

Return the bitfield containing zone options.

This value is a bitfield which contains all of the active zone options.

Zone flags are defined in AW_ZONE_FLAGS. Examples follow.

To determine if the 'AW_ZONE_FLAG_VISIBLE' flag is set:

bool bIsZoneVisible = (myzone.Flags() & AW_ZONE_FLAG_VISIBLE)? true : false;

To remove a flag:

unsigned short& opts = myzone.Flags(); opts &= ~AW_ZONE_FLAG_VISIBLE;

To add a flag:

unsigned short& opts = myzone.Flags(); opts |= AW_ZONE_FLAG_VISIBLE;

Examples:
example.cpp.

unsigned long& AwV4::Zone::Color (  )  [inline]

Determine the fog and water color for this zone.

This controls the color of the fog in this zone, and the color of the water (if applicable).

SimpleString& AwV4::Zone::FootstepSound (  )  [inline]

Determine this zone's footstep sound, if any.

This sound is used if the avatar's feet are in this zone while walking or running.

If no sound is specified, NULL is returned.

SimpleString& AwV4::Zone::AmbientSound (  )  [inline]

Determine this zone's ambient sound, if any.

This sound (if specified) will repeat in the background when the camera (usually the avatar's head) is in this zone.

If no sound is specified, NULL is returned.

SimpleString& AwV4::Zone::CameraTag (  )  [inline]

Determine this zone's camera tag, if any.

This specifies that name of a particular camera object within the scene. When the user enters this zone, their camera will switch to the camera matching the given name, and will return to the previous setting when they leave.

If no tag is specified, NULL is returned.

Examples:
example.cpp.

SimpleString& AwV4::Zone::TargetCursor (  )  [inline]

Determine this zone's target cursor, if any.

This specifies the texture that will be used as the center cursor in Move Mode (mouselook).

If no cursor is specified, NULL is returned.

aw_object_data_zone * AwV4::Zone::GetObjectData (  ) 

Create an aw_object_data_zone structure.

Creates and returns an aw_object_data_zone 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::Zone::Assign ( const aw_object_data_zone *  data  ) 

Assign zone data from an SDK structure.

Constructor which initializes the zone wrapper class from an existing aw_object_data_zone structure.


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