torque Torque Game Engine Documentation
TGE Version 1.5.2

FlyingVehicle Class Reference

#include <flyingVehicle.h>

Inheritance diagram for FlyingVehicle:

Inheritance graph
[legend]

Public Member Functions

 DECLARE_CONOBJECT (FlyingVehicle)
 FlyingVehicle ()
 ~FlyingVehicle ()
bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
void advanceTime (F32 dt)
 Advances simulation time for animations.
void writePacketData (GameConnection *conn, BitStream *stream)
 Write state information necessary to perform client side prediction of an object.
void readPacketData (GameConnection *conn, BitStream *stream)
 Read data written with writePacketData() and update the object state.
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream)
 Instructs this object to pack its state for transfer over the network.
void unpackUpdate (NetConnection *conn, BitStream *stream)
 Instructs this object to read state data previously packed with packUpdate.
void useCreateHeight (bool val)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Private Types

enum  NetMaskBits {
  InitMask = BIT(0),
  HoverHeight = BIT(1)
}
enum  ThrustDirection {
  ThrustForward,
  ThrustBackward,
  ThrustDown,
  NumThrustDirections,
  NumThrustBits = 3
}
enum  Jets {
  BackActivate,
  BackMaintain,
  BottomActivate,
  BottomMaintain,
  JetAnimCount
}
typedef Vehicle Parent

Private Member Functions

bool onNewDataBlock (GameBaseData *dptr)
 Called when a new datablock is set.
void updateMove (const Move *move)
void updateForces (F32)
F32 getHeight ()
void updateJet (F32 dt)
void updateEngineSound (F32 level)
void updateEmitter (bool active, F32 dt, ParticleEmitterData *emitter, S32 idx, S32 count)
U32 getCollisionMask ()

Private Attributes

FlyingVehicleDatamDataBlock
 Datablock.
AUDIOHANDLE mJetSound
AUDIOHANDLE mEngineSound
bool createHeightOn
F32 mCeilingFactor
Point2F mThrust
ThrustDirection mThrustDirection
TSThreadmJetThread [JetAnimCount]
S32 mJetSeq [JetAnimCount]
bool mBackMaintainOn
bool mBottomMaintainOn
SimObjectPtr< ParticleEmittermJetEmitter [FlyingVehicleData::MaxJetNodes]

Static Private Attributes

static const char * sJetSequence [FlyingVehicle::JetAnimCount]
static JetActivation sJetActivation [NumThrustDirections]

Data Structures

struct  JetActivation

Member Typedef Documentation

typedef Vehicle FlyingVehicle::Parent [private]

Reimplemented from Vehicle.


Member Enumeration Documentation

Enumerator:
InitMask 
HoverHeight 

Enumerator:
ThrustForward 
ThrustBackward 
ThrustDown 
NumThrustDirections 
NumThrustBits 

enum FlyingVehicle::Jets [private]

Enumerator:
BackActivate 
BackMaintain 
BottomActivate 
BottomMaintain 
JetAnimCount 


Constructor & Destructor Documentation

FlyingVehicle::FlyingVehicle (  ) 

FlyingVehicle::~FlyingVehicle (  ) 


Member Function Documentation

bool FlyingVehicle::onNewDataBlock ( GameBaseData dptr  )  [private, virtual]

Called when a new datablock is set.

This allows subclasses to appropriately handle new datablocks.

See also:
setDataBlock()
Parameters:
dptr New datablock

Reimplemented from Vehicle.

void FlyingVehicle::updateMove ( const Move move  )  [private, virtual]

Reimplemented from Vehicle.

void FlyingVehicle::updateForces ( F32   )  [private, virtual]

Reimplemented from Vehicle.

F32 FlyingVehicle::getHeight (  )  [private]

void FlyingVehicle::updateJet ( F32  dt  )  [private]

void FlyingVehicle::updateEngineSound ( F32  level  )  [private]

void FlyingVehicle::updateEmitter ( bool  active,
F32  dt,
ParticleEmitterData emitter,
S32  idx,
S32  count 
) [private]

U32 FlyingVehicle::getCollisionMask (  )  [private, virtual]

Reimplemented from Vehicle.

FlyingVehicle::DECLARE_CONOBJECT ( FlyingVehicle   ) 

static void FlyingVehicle::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from Vehicle.

bool FlyingVehicle::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from Vehicle.

void FlyingVehicle::onRemove (  )  [virtual]

Called when the object is removed from the sim.

Reimplemented from Vehicle.

void FlyingVehicle::advanceTime ( F32  dt  )  [virtual]

Advances simulation time for animations.

This is called every frame.

Parameters:
dt Time since last advance call

Reimplemented from Vehicle.

void FlyingVehicle::writePacketData ( GameConnection conn,
BitStream stream 
) [virtual]

Write state information necessary to perform client side prediction of an object.

This information is sent only to the controling object. For example, if you are a client controlling a Player, the server uses writePacketData() instead of packUpdate() to generate the data you receive.

Parameters:
conn Connection for which we're generating this data.
stream Bitstream for output.

Reimplemented from Vehicle.

void FlyingVehicle::readPacketData ( GameConnection conn,
BitStream stream 
) [virtual]

Read data written with writePacketData() and update the object state.

Parameters:
conn Connection for which we're generating this data.
stream Bitstream to read.

Reimplemented from Vehicle.

U32 FlyingVehicle::packUpdate ( NetConnection conn,
U32  mask,
BitStream stream 
) [virtual]

Instructs this object to pack its state for transfer over the network.

Parameters:
conn Net connection being used
mask Mask indicating fields to transmit.
stream Bitstream to pack data to
Returns:
Any bits which were not dealt with. The value is stored by the networking system. Don't set bits you weren't passed.

Reimplemented from Vehicle.

void FlyingVehicle::unpackUpdate ( NetConnection conn,
BitStream stream 
) [virtual]

Instructs this object to read state data previously packed with packUpdate.

Parameters:
conn Net connection being used
stream stream to read from

Reimplemented from Vehicle.

void FlyingVehicle::useCreateHeight ( bool  val  ) 


Field Documentation

Datablock.

Reimplemented from Vehicle.

const char* FlyingVehicle::sJetSequence[FlyingVehicle::JetAnimCount] [static, private]

TSThread* FlyingVehicle::mJetThread[JetAnimCount] [private]

S32 FlyingVehicle::mJetSeq[JetAnimCount] [private]

JetActivation FlyingVehicle::sJetActivation[NumThrustDirections] [static, private]

SimObjectPtr<ParticleEmitter> FlyingVehicle::mJetEmitter[FlyingVehicleData::MaxJetNodes] [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen