Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::EngineeredObject Class Reference

# Zap::EngineeredObject Class Reference

`#include <engineeredObjects.h>`

Inheritance diagram for Zap::EngineeredObject:

## Public Member Functions

| EngineeredObject (S32 team=-1, Point anchorPoint=Point(), Point anchorNormal=Point())
void | setResource (Item *resource)
bool | checkDeploymentPosition ()
void | computeExtent ()
virtual void | onDestroyed ()
virtual void | onDisabled ()
virtual void | onEnabled ()
bool | isEnabled ()
void | processArguments (S32 argc, const char **argv)
void | explode ()
bool | isDestroyed ()
void | setOwner (Ship *owner)
U32 | packUpdate (GhostConnection *connection, U32 updateMask, BitStream *stream)
| Write the object's state to a packet.
void | unpackUpdate (GhostConnection *connection, BitStream *stream)
| Unpack data written by packUpdate().
void | damageObject (DamageInfo *damageInfo)
bool | collide (GameObject *hitObject)
F32 | getHealth ()

## Protected Types

enum | MaskBits { InitialMask = BIT(0), HealthMask = BIT(1), TeamMask = BIT(2), NextFreeMask = BIT(3)
}

## Protected Attributes

F32 | mHealth
Color | mTeamColor
SafePtr< Item > | mResource
SafePtr< Ship > | mOwner
Point | mAnchorPoint
Point | mAnchorNormal
bool | mIsDestroyed
S32 | mOriginalTeam

## Private Types

typedef GameObject | Parent

## Member Typedef Documentation

typedef GameObject Zap::EngineeredObject::Parent`[private]`

Reimplemented from Zap::GameObject.

Reimplemented in Zap::ForceFieldProjector, and Zap::Turret.

## Member Enumeration Documentation

enum Zap::EngineeredObject::MaskBits`[protected]`

Enumerator:

  InitialMask |
  HealthMask |
  TeamMask |
  NextFreeMask |

## Constructor & Destructor Documentation

Zap::EngineeredObject::EngineeredObject | ( | S32 | team = `-1`,
|  | Point | anchorPoint = `Point()`,
|  | Point | anchorNormal = `Point()` |
| ) |  |  |

## Member Function Documentation

void Zap::EngineeredObject::setResource | ( | Item * | resource | ) |

bool Zap::EngineeredObject::checkDeploymentPosition | ( |  | ) |

void Zap::EngineeredObject::computeExtent | ( |  | ) |

virtual void Zap::EngineeredObject::onDestroyed | ( |  | ) | `[inline, virtual]`

virtual void Zap::EngineeredObject::onDisabled | ( |  | ) | `[inline, virtual]`

Reimplemented in Zap::ForceFieldProjector.

virtual void Zap::EngineeredObject::onEnabled | ( |  | ) | `[inline, virtual]`

Reimplemented in Zap::ForceFieldProjector.

bool Zap::EngineeredObject::isEnabled | ( |  | ) |

void Zap::EngineeredObject::processArguments | ( | S32 | argc,
|  | const char ** | argv |
| ) |  |  | `[virtual]`

Reimplemented from Zap::GameObject.

void Zap::EngineeredObject::explode | ( |  | ) |

bool Zap::EngineeredObject::isDestroyed | ( |  | ) | `[inline, virtual]`

Reimplemented from Zap::GameObject.

void Zap::EngineeredObject::setOwner | ( | Ship * | owner | ) |

U32 Zap::EngineeredObject::packUpdate | ( | GhostConnection * | connection,
|  | U32 | updateMask,
|  | BitStream * | stream |
| ) |  |  | `[virtual]`

Write the object's state to a packet.

packUpdate is called on an object when it is to be written into a packet stream for transmission to the client. The updateMask parameter contains the out-of-date state mask for the object. The initial update mask for any object to a client will always be 0xFFFFFFFF, signifying that all states are out of date. It is often useful to check for this mask, to write one-time initialization information for that object.

Reimplemented from TNL::NetObject.

Reimplemented in Zap::Turret.

void Zap::EngineeredObject::unpackUpdate | ( | GhostConnection * | connection,
|  | BitStream * | stream |
| ) |  |  | `[virtual]`

Unpack data written by packUpdate().

unpackUpdate is called on the client to read an update out of a packet's bit stream. Because the update mask is not encoded by the network system directly, each unpack update function will have to determine from the bit stream which states are being updated.

Reimplemented from TNL::NetObject.

Reimplemented in Zap::Turret.

void Zap::EngineeredObject::damageObject | ( | DamageInfo * | damageInfo | ) | `[virtual]`

Reimplemented from Zap::GameObject.

bool Zap::EngineeredObject::collide | ( | GameObject * | hitObject | ) | `[inline, virtual]`

Reimplemented from Zap::GameObject.

F32 Zap::EngineeredObject::getHealth | ( |  | ) | `[inline, virtual]`

Reimplemented from Zap::GameObject.

## Field Documentation

F32 Zap::EngineeredObject::mHealth`[protected]`

Color Zap::EngineeredObject::mTeamColor`[protected]`

SafePtr<Item> Zap::EngineeredObject::mResource`[protected]`

SafePtr<Ship> Zap::EngineeredObject::mOwner`[protected]`

Reimplemented from Zap::GameObject.

Point Zap::EngineeredObject::mAnchorPoint`[protected]`

Point Zap::EngineeredObject::mAnchorNormal`[protected]`

bool Zap::EngineeredObject::mIsDestroyed`[protected]`

S32 Zap::EngineeredObject::mOriginalTeam`[protected]`