Eaagles::Simulation::Bullet Class Reference

Inherits Eaagles::Simulation::Weapon.

Inheritance diagram for Eaagles::Simulation::Bullet:

Inheritance graph
[legend]
Collaboration diagram for Eaagles::Simulation::Bullet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Bullet ()
LCreal getMuzzleVelocity () const
virtual bool burstOfBullets (const osg::Vec3 *const pos, const osg::Vec3 *const vel, const int num, const int rate, const int re)
virtual const char * getDescription () const
virtual const char * getNickname () const
virtual int getCategory () const
virtual void reset ()

Static Public Attributes

static const LCreal DEFAULT_MUZZLE_VEL
static const LCreal DEFAULT_MAX_TOF

Protected Member Functions

virtual void resetBurstTrajectories ()
virtual void updateBurstTrajectories (const LCreal dt)
virtual bool checkForTargetHit ()
PlayergetHitPlayer ()
const PlayergetHitPlayer () const
void setHitPlayer (Player *p)
virtual void weaponDynamics (const LCreal dt)
virtual void updateTOF (const LCreal dt)

Private Types

enum  { MBT = 100 }

Private Attributes

LCreal muzzleVel
SPtr< PlayerhitPlayer
int nbt
Burst bursts [MBT]

Classes

struct  Burst

Detailed Description

Player for general purpose bullets.  Provides a description of
    the bullet and provides a flyout weapon for the gun.  During flyout, the
    bullets in grouped into bursts.


Member Enumeration Documentation

anonymous enum [private]

Max number of burst trajectories.

Enumerator:
MBT 


Constructor & Destructor Documentation

Eaagles::Simulation::Bullet::Bullet (  ) 


Member Function Documentation

LCreal Eaagles::Simulation::Bullet::getMuzzleVelocity (  )  const [inline]

bool Eaagles::Simulation::Bullet::burstOfBullets ( const osg::Vec3 *const   pos,
const osg::Vec3 *const   vel,
const int  num,
const int  rate,
const int  re 
) [virtual]

Fire (add) a burst of bullets.

Parameters:
pos  Initial burst position
vel  Initial velocity of bullts
num  Number of bullets in burst
rate  Rate of fire (rounds per minute)
re  Release event id

const char * Eaagles::Simulation::Bullet::getDescription (  )  const [virtual]

Weapon interface.

Implements Eaagles::Simulation::Weapon.

const char * Eaagles::Simulation::Bullet::getNickname (  )  const [virtual]

Implements Eaagles::Simulation::Weapon.

int Eaagles::Simulation::Bullet::getCategory (  )  const [virtual]

Implements Eaagles::Simulation::Weapon.

void Eaagles::Simulation::Bullet::reset (  )  [virtual]

Component Interface.

Reimplemented from Eaagles::Simulation::Weapon.

void Eaagles::Simulation::Bullet::resetBurstTrajectories (  )  [protected, virtual]

void Eaagles::Simulation::Bullet::updateBurstTrajectories ( const LCreal  dt  )  [protected, virtual]

bool Eaagles::Simulation::Bullet::checkForTargetHit (  )  [protected, virtual]

Player* Eaagles::Simulation::Bullet::getHitPlayer (  )  [inline, protected]

const Player* Eaagles::Simulation::Bullet::getHitPlayer (  )  const [inline, protected]

void Eaagles::Simulation::Bullet::setHitPlayer ( Player p  )  [protected]

void Eaagles::Simulation::Bullet::weaponDynamics ( const LCreal  dt  )  [protected, virtual]

Weapon interface.

Reimplemented from Eaagles::Simulation::Weapon.

void Eaagles::Simulation::Bullet::updateTOF ( const LCreal  dt  )  [protected, virtual]

Reimplemented from Eaagles::Simulation::Weapon.


Member Data Documentation

const LCreal Eaagles::Simulation::Bullet::DEFAULT_MUZZLE_VEL [static]

Meters / second.

const LCreal Eaagles::Simulation::Bullet::DEFAULT_MAX_TOF [static]

Seconds.

LCreal Eaagles::Simulation::Bullet::muzzleVel [private]

Muzzle velocity (m/s).

SPtr<Player> Eaagles::Simulation::Bullet::hitPlayer [private]

Player we hit (if any).

int Eaagles::Simulation::Bullet::nbt [private]

Bullet trajectories Number of burst trajectories

Burst Eaagles::Simulation::Bullet::bursts[MBT] [private]

Bursts.


Generated on Tue Dec 19 16:28:18 2006 for Eaagles by  doxygen 1.5.0