Inheritance diagram for Eaagles::Simulation::Gun:


Public Member Functions | |
| Gun () | |
| int | getRoundsRemaining () const |
| int | getMaxRounds () const |
| virtual bool | setMaxRounds (const int value) |
| bool | isUnlimited () const |
| virtual bool | setUnlimited (const bool flg) |
| int | getRoundsPerMinute () const |
| virtual bool | setRoundsPerMinute (const int value) |
| bool | isGunArmed () const |
| virtual bool | setGunArmed (const bool flg) |
| bool | isGunFiring () const |
| virtual bool | fireControl (const bool trigger, const bool burst=false) |
| virtual void | reload () |
| Bullet * | getBulletType () |
| const Bullet * | getBulletType () const |
| virtual bool | setBulletType (Bullet *const b) |
| const osg::Vec3 & | getPosition () const |
| const osg::Vec3 & | getAngles () const |
| const osg::Matrix & | getRotationalMatrix () const |
| LCreal | getRoll () const |
| LCreal | getPitch () const |
| LCreal | getYaw () const |
| bool | setPosition (const LCreal x, const LCreal y, const LCreal z) |
| bool | setAngles (const LCreal r, const LCreal p, const LCreal y) |
| virtual bool | setSlotNumRounds (const Basic::LcNumber *const num) |
| virtual bool | setSlotUnlimited (const Basic::LcNumber *const num) |
| virtual bool | setSlotRate (const Basic::LcNumber *const num) |
| virtual bool | setSlotBurstRate (const Basic::LcNumber *const num) |
| virtual bool | setSlotPosition (Basic::LcList *const numList) |
| virtual bool | setSlotRoll (const Basic::LcNumber *const num) |
| virtual bool | setSlotPitch (const Basic::LcNumber *const num) |
| virtual bool | setSlotYaw (const Basic::LcNumber *const num) |
| virtual void | updateTC (const LCreal dt=0.0f) |
| virtual void | reset () |
Static Public Attributes | |
| static const int | DEFAULT_ROUNDS_PER_MINUTE |
| static const int | DEFAULT_NUM_ROUNDS |
| static const int | DEFAULT_BURST_RATE |
Protected Member Functions | |
| virtual LCreal | computeBulletRatePerSecond () |
| virtual void | initBullet () |
| virtual void | burstFrame () |
| virtual osg::Vec3 | computeInitBulletPosition () |
| virtual osg::Vec3 | computeInitBulletVelocity () |
Private Attributes | |
| Bullet * | bullet |
| LCreal | shortBurstTimer |
| LCreal | shortBurstTime |
| LCreal | burstFrameTimer |
| LCreal | burstFrameTime |
| LCreal | rcount |
| int | rounds |
| int | initRounds |
| int | rpm |
| bool | fire |
| bool | armed |
| bool | unlimited |
| osg::Vec3 | posVec |
| osg::Vec3 | angles |
| osg::Matrix | rm |
Generic purpose gun model
| yaw Eaagles::Simulation::Gun::Gun | ( | ) |
| int Eaagles::Simulation::Gun::getRoundsRemaining | ( | ) | const [inline] |
| int Eaagles::Simulation::Gun::getMaxRounds | ( | ) | const [inline] |
| bool Eaagles::Simulation::Gun::setMaxRounds | ( | const int | value | ) | [virtual] |
| bool Eaagles::Simulation::Gun::isUnlimited | ( | ) | const [inline] |
| bool Eaagles::Simulation::Gun::setUnlimited | ( | const bool | flg | ) | [virtual] |
| int Eaagles::Simulation::Gun::getRoundsPerMinute | ( | ) | const [inline] |
| bool Eaagles::Simulation::Gun::setRoundsPerMinute | ( | const int | value | ) | [virtual] |
| bool Eaagles::Simulation::Gun::isGunArmed | ( | ) | const [inline] |
Gun arming.
| bool Eaagles::Simulation::Gun::setGunArmed | ( | const bool | flg | ) | [virtual] |
| bool Eaagles::Simulation::Gun::isGunFiring | ( | ) | const [inline] |
Gun fire.
| bool Eaagles::Simulation::Gun::fireControl | ( | const bool | trigger, | |
| const bool | burst = false | |||
| ) | [virtual] |
| void Eaagles::Simulation::Gun::reload | ( | ) | [virtual] |
Reload the gun & bullets.
| Bullet* Eaagles::Simulation::Gun::getBulletType | ( | ) | [inline] |
| const Bullet* Eaagles::Simulation::Gun::getBulletType | ( | ) | const [inline] |
| bool Eaagles::Simulation::Gun::setBulletType | ( | Bullet *const | b | ) | [virtual] |
| const osg::Vec3& Eaagles::Simulation::Gun::getPosition | ( | ) | const [inline] |
Gun posiiton relative to ownship player.
| const osg::Vec3& Eaagles::Simulation::Gun::getAngles | ( | ) | const [inline] |
| const osg::Matrix& Eaagles::Simulation::Gun::getRotationalMatrix | ( | ) | const [inline] |
| LCreal Eaagles::Simulation::Gun::getRoll | ( | ) | const [inline] |
| LCreal Eaagles::Simulation::Gun::getPitch | ( | ) | const [inline] |
| LCreal Eaagles::Simulation::Gun::getYaw | ( | ) | const [inline] |
| bool Eaagles::Simulation::Gun::setSlotNumRounds | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Slot functions Number of rounds
| bool Eaagles::Simulation::Gun::setSlotUnlimited | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Unlimited rounds flag.
| bool Eaagles::Simulation::Gun::setSlotRate | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Rate of fire (rds per min).
| bool Eaagles::Simulation::Gun::setSlotBurstRate | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Burst rate.
| bool Eaagles::Simulation::Gun::setSlotPosition | ( | Basic::LcList *const | numList | ) | [virtual] |
Gun position relative to ownship.
| bool Eaagles::Simulation::Gun::setSlotRoll | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Gun roll angle to ownship.
| bool Eaagles::Simulation::Gun::setSlotPitch | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Gun pitch angle to ownship.
| bool Eaagles::Simulation::Gun::setSlotYaw | ( | const Basic::LcNumber *const | num | ) | [virtual] |
Gun heading angle to ownship.
| void Eaagles::Simulation::Gun::updateTC | ( | const LCreal | dt = 0.0f |
) | [virtual] |
| void Eaagles::Simulation::Gun::reset | ( | ) | [virtual] |
Reinitialize this component to its state at the beginning of the simulation.
Reimplemented from Eaagles::Basic::LcComponent.
| LCreal Eaagles::Simulation::Gun::computeBulletRatePerSecond | ( | ) | [protected, virtual] |
| void Eaagles::Simulation::Gun::initBullet | ( | ) | [protected, virtual] |
| void Eaagles::Simulation::Gun::burstFrame | ( | ) | [protected, virtual] |
| osg::Vec3 Eaagles::Simulation::Gun::computeInitBulletPosition | ( | ) | [protected, virtual] |
| osg::Vec3 Eaagles::Simulation::Gun::computeInitBulletVelocity | ( | ) | [protected, virtual] |
const int Eaagles::Simulation::Gun::DEFAULT_ROUNDS_PER_MINUTE [static] |
Default rate (rds per min).
const int Eaagles::Simulation::Gun::DEFAULT_NUM_ROUNDS [static] |
Default load.
const int Eaagles::Simulation::Gun::DEFAULT_BURST_RATE [static] |
Default subburst frame rate.
Bullet* Eaagles::Simulation::Gun::bullet [private] |
Type of bullet.
Single short burst timer (when firing a single burst) (sec).
Length of the single short burst (sec).
Timer used to generate small bursts bullets (sec).
Length of a small burst of bullets (sec).
LCreal Eaagles::Simulation::Gun::rcount [private] |
Rounds being fired this burst.
int Eaagles::Simulation::Gun::rounds [private] |
Number of rounds remaining.
int Eaagles::Simulation::Gun::initRounds [private] |
Initial rounds.
int Eaagles::Simulation::Gun::rpm [private] |
Rounds per minute.
bool Eaagles::Simulation::Gun::fire [private] |
Gun is firing.
bool Eaagles::Simulation::Gun::armed [private] |
Armed flag.
bool Eaagles::Simulation::Gun::unlimited [private] |
Unlimited bullets (aka old western movie mode).
osg::Vec3 Eaagles::Simulation::Gun::posVec [private] |
Position vector; relative to ownship body axis (m).
osg::Vec3 Eaagles::Simulation::Gun::angles [private] |
(Euler) angles; relative to ownship body axis (rad)
osg::Matrix Eaagles::Simulation::Gun::rm [private] |
Rotational Matrix; relative to ownship body axis.
1.5.0