ShotBounce Class Reference

#include <ShotBounce.h>

Inheritance diagram for ShotBounce:

PhysicsParticleReferenced PhysicsParticle Action PhysicsParticleObjectHandler

List of all members.

Public Member Functions

 ShotBounce (WeaponRoller *weapon, FixedVector &startPosition, FixedVector &velocity, WeaponFireContext &weaponContext)
virtual ~ShotBounce ()
virtual void simulate (fixed frameTime, bool &remove)
virtual void init ()
virtual void draw ()
virtual void collision (PhysicsParticleObject &position, ScorchedCollisionId collisionId)
virtual std::string getActionDetails ()
unsigned int getPlayerId ()
WeaponRollergetWeapon ()

Protected Member Functions

void doCollision ()

Protected Attributes

ViewPoints::ViewPointvPoint_
FixedVector startPosition_
FixedVector velocity_
FixedVector lookFrom_
WeaponRollerweapon_
WeaponFireContext weaponContext_
fixed totalTime_
ModelRendererSimulatormodel_

Private Member Functions

 ShotBounce (const ShotBounce &)
const ShotBounceoperator= (const ShotBounce &)


Detailed Description

Definition at line 30 of file ShotBounce.h.


Constructor & Destructor Documentation

ShotBounce::ShotBounce ( WeaponRoller weapon,
FixedVector startPosition,
FixedVector velocity,
WeaponFireContext weaponContext 
)

Definition at line 37 of file ShotBounce.cpp.

ShotBounce::~ShotBounce (  )  [virtual]

Definition at line 63 of file ShotBounce.cpp.

References Action::context_, ScorchedContext::getViewPoints(), model_, ViewPoints::releaseViewPoint(), and vPoint_.

ShotBounce::ShotBounce ( const ShotBounce  )  [private]


Member Function Documentation

void ShotBounce::simulate ( fixed  frameTime,
bool &  remove 
) [virtual]

Reimplemented from PhysicsParticle.

Definition at line 89 of file ShotBounce.cpp.

References Action::context_, doCollision(), WeaponRoller::getTime(), PhysicsParticle::simulate(), totalTime_, and weapon_.

void ShotBounce::init (  )  [virtual]

Implements Action.

Definition at line 47 of file ShotBounce.cpp.

References ActionController::addAction(), Action::context_, ScorchedContext::getActionController(), ViewPoints::getNewViewPoint(), WeaponFireContext::getPlayerId(), WeaponRoller::getRoll(), ViewPoints::getValues(), ScorchedContext::getViewPoints(), WeaponRoller::getWindFactor(), lookFrom_, ParticleTypeBounce, PhysicsParticle::setPhysics(), startPosition_, velocity_, vPoint_, weapon_, and weaponContext_.

void ShotBounce::draw (  )  [virtual]

Reimplemented from Action.

Definition at line 101 of file ShotBounce.cpp.

References Action::context_, ModelRendererSimulator::draw(), PhysicsParticle::getCurrentPosition(), Model::getMin(), ModelRenderer::getModel(), FixedVector4::getOpenGLRotationMatrix(), ModelRendererSimulator::getRenderer(), PhysicsParticle::getRotationQuat(), ScorchedContext::getServerMode(), glMultMatrixf(), glPopMatrix(), glPushMatrix(), glScalef(), glTranslatef(), ModelRendererStore::instance(), lookFrom_, model_, ViewPoints::ViewPoint::setLookFrom(), ViewPoints::ViewPoint::setPosition(), LangStringUtil::strcmp(), GLState::TEXTURE_OFF, vPoint_, and weapon_.

void ShotBounce::collision ( PhysicsParticleObject position,
ScorchedCollisionId  collisionId 
) [virtual]

Reimplemented from PhysicsParticle.

Definition at line 79 of file ShotBounce.cpp.

References PhysicsParticle::collision(), PhysicsParticle::collision_, and doCollision().

std::string ShotBounce::getActionDetails (  )  [virtual]

Reimplemented from Action.

Definition at line 71 of file ShotBounce.cpp.

References S3D::formatStringBuffer(), Accessory::getName(), AccessoryPart::getParent(), startPosition_, velocity_, and weapon_.

unsigned int ShotBounce::getPlayerId (  )  [inline]

Definition at line 47 of file ShotBounce.h.

References WeaponFireContext::getPlayerId(), and weaponContext_.

WeaponRoller* ShotBounce::getWeapon (  )  [inline]

Definition at line 48 of file ShotBounce.h.

References weapon_.

Referenced by PhysicsParticleActionObject::bounceShieldHit().

void ShotBounce::doCollision (  )  [protected]

Definition at line 139 of file ShotBounce.cpp.

References Action::context_, Weapon::fireWeapon(), WeaponRoller::getCollisionAction(), PhysicsParticle::getCurrentPosition(), PhysicsParticle::getCurrentVelocity(), weapon_, and weaponContext_.

Referenced by collision(), and simulate().

const ShotBounce& ShotBounce::operator= ( const ShotBounce  )  [private]


Member Data Documentation

ViewPoints::ViewPoint* ShotBounce::vPoint_ [protected]

Definition at line 51 of file ShotBounce.h.

Referenced by draw(), init(), and ~ShotBounce().

FixedVector ShotBounce::startPosition_ [protected]

Definition at line 52 of file ShotBounce.h.

Referenced by getActionDetails(), and init().

FixedVector ShotBounce::velocity_ [protected]

Definition at line 52 of file ShotBounce.h.

Referenced by getActionDetails(), and init().

FixedVector ShotBounce::lookFrom_ [protected]

Definition at line 53 of file ShotBounce.h.

Referenced by draw(), and init().

WeaponRoller* ShotBounce::weapon_ [protected]

Definition at line 54 of file ShotBounce.h.

Referenced by doCollision(), draw(), getActionDetails(), getWeapon(), init(), and simulate().

WeaponFireContext ShotBounce::weaponContext_ [protected]

Definition at line 55 of file ShotBounce.h.

Referenced by doCollision(), getPlayerId(), and init().

fixed ShotBounce::totalTime_ [protected]

Definition at line 56 of file ShotBounce.h.

Referenced by simulate().

ModelRendererSimulator* ShotBounce::model_ [protected]

Definition at line 57 of file ShotBounce.h.

Referenced by draw(), and ~ShotBounce().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:06 2009 for Scorched3D by  doxygen 1.5.3