PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
Loading...
Searching...
No Matches
proofps_dd::Explosion Class Reference

Detailed Description

Definition at line 21 of file Explosion.h.

#include <Explosion.h>

Classes

struct  ExplosionRefData
 

Public Types

typedef uint32_t ExplosionId
 

Public Member Functions

 Explosion (PGE &pge, const pge_network::PgeNetworkConnectionHandle &connHandle, const ExplosionObjRefId &refId, const PureVector &pos, const TPureFloat &fDamageAreaSize)
 Ctor to be used by PGE server instance: explosion id will be assigned within the ctor.
 
 Explosion (PGE &pge, const ExplosionId &id, const pge_network::PgeNetworkConnectionHandle &connHandle, const ExplosionObjRefId &refId, const PureVector &pos, const TPureFloat &fDamageAreaSize)
 Ctor to be used by PGE client instance: explosion id as received from server.
 
 Explosion (const Explosion &other)
 
Explosionoperator= (const Explosion &other)=delete
 
virtual ~Explosion ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
ExplosionId getId () const
 
pge_network::PgeNetworkConnectionHandle getOwner () const
 
bool & isCreateSentToClients ()
 
void update (const unsigned int &nFactor)
 
PureObject3D & getPrimaryObject3D ()
 
const PureObject3D & getPrimaryObject3D () const
 
PureObject3D & getSecondaryObject3D ()
 
const PureObject3D & getSecondaryObject3D () const
 
const float & getDamageAreaSize () const
 
float getDamageAtDistance (const float &fDistance, const Bullet::DamageAreaEffect &eDamageAreaEffect, const int &nDamage) const
 
bool shouldBeDeleted () const
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
static ExplosionId getGlobalExplosionId ()
 
static void resetGlobalExplosionId ()
 
static bool updateReferenceExplosions (PGE &pge, const std::string &filenameWithRelPath, const std::string &soundFilenameWithRelPath)
 
static void destroyReferenceExplosions ()
 

Private Attributes

ExplosionId m_id
 Unique explosion id for identifying.
 
PGE & m_pge
 
pge_network::PgeNetworkConnectionHandle m_connHandle
 Owner (caused by) of this explosion.
 
ExplosionObjRefId m_refId
 Explosion object reference id, used to search in m_explosionRefObjects.
 
TPureFloat m_fDamageAreaSize
 Originating bullet's fDamageAreaSize.
 
PureObject3D * m_objPrimary
 Associated Primary Pure object to be rendered.
 
PureObject3D * m_objSecondary
 Associated Secondary Pure object to be rendered.
 
TPureFloat m_fScalingPrimary
 To be increased during animation.
 
TPureFloat m_fScalingSecondary
 To be increased during animation.
 
bool m_bCreateSentToClients
 Server should send update to clients about creation of new explosions.
 
SoLoud::handle m_sndHandle {}
 

Static Private Attributes

static ExplosionId m_globalExplosionId = 0
 Next unique explosion id for identifying.
 
static std::map< ExplosionObjRefId, ExplosionRefDatam_explosionRefObjects
 

Member Typedef Documentation

◆ ExplosionId

Definition at line 26 of file Explosion.h.

Constructor & Destructor Documentation

◆ Explosion() [1/3]

proofps_dd::Explosion::Explosion ( PGE & pge,
const pge_network::PgeNetworkConnectionHandle & connHandle,
const ExplosionObjRefId & refId,
const PureVector & pos,
const TPureFloat & fDamageAreaSize )

Ctor to be used by PGE server instance: explosion id will be assigned within the ctor.

Definition at line 91 of file Explosion.cpp.

◆ Explosion() [2/3]

proofps_dd::Explosion::Explosion ( PGE & pge,
const ExplosionId & id,
const pge_network::PgeNetworkConnectionHandle & connHandle,
const ExplosionObjRefId & refId,
const PureVector & pos,
const TPureFloat & fDamageAreaSize )

Ctor to be used by PGE client instance: explosion id as received from server.

Definition at line 143 of file Explosion.cpp.

◆ Explosion() [3/3]

proofps_dd::Explosion::Explosion ( const Explosion & other)

Definition at line 192 of file Explosion.cpp.

◆ ~Explosion()

proofps_dd::Explosion::~Explosion ( )
virtual

Definition at line 315 of file Explosion.cpp.

Member Function Documentation

◆ destroyReferenceExplosions()

void proofps_dd::Explosion::destroyReferenceExplosions ( )
static

Definition at line 74 of file Explosion.cpp.

◆ getConsole()

CConsole & proofps_dd::Explosion::getConsole ( ) const

Returns access to console preset with logger module name as this class.

Definition at line 330 of file Explosion.cpp.

◆ getDamageAreaSize()

const float & proofps_dd::Explosion::getDamageAreaSize ( ) const

Definition at line 430 of file Explosion.cpp.

◆ getDamageAtDistance()

float proofps_dd::Explosion::getDamageAtDistance ( const float & fDistance,
const Bullet::DamageAreaEffect & eDamageAreaEffect,
const int & nDamage ) const

Definition at line 435 of file Explosion.cpp.

◆ getGlobalExplosionId()

proofps_dd::Explosion::ExplosionId proofps_dd::Explosion::getGlobalExplosionId ( )
static

Definition at line 29 of file Explosion.cpp.

◆ getId()

proofps_dd::Explosion::ExplosionId proofps_dd::Explosion::getId ( ) const

Definition at line 335 of file Explosion.cpp.

◆ getLoggerModuleName()

const char * proofps_dd::Explosion::getLoggerModuleName ( )
static

Returns the logger module name of this class.

Definition at line 24 of file Explosion.cpp.

◆ getOwner()

pge_network::PgeNetworkConnectionHandle proofps_dd::Explosion::getOwner ( ) const

Definition at line 340 of file Explosion.cpp.

◆ getPrimaryObject3D() [1/2]

PureObject3D & proofps_dd::Explosion::getPrimaryObject3D ( )

Definition at line 410 of file Explosion.cpp.

◆ getPrimaryObject3D() [2/2]

const PureObject3D & proofps_dd::Explosion::getPrimaryObject3D ( ) const

Definition at line 415 of file Explosion.cpp.

◆ getSecondaryObject3D() [1/2]

PureObject3D & proofps_dd::Explosion::getSecondaryObject3D ( )

Definition at line 420 of file Explosion.cpp.

◆ getSecondaryObject3D() [2/2]

const PureObject3D & proofps_dd::Explosion::getSecondaryObject3D ( ) const

Definition at line 425 of file Explosion.cpp.

◆ isCreateSentToClients()

bool & proofps_dd::Explosion::isCreateSentToClients ( )

Definition at line 345 of file Explosion.cpp.

◆ operator=()

Explosion & proofps_dd::Explosion::operator= ( const Explosion & other)
delete

◆ resetGlobalExplosionId()

void proofps_dd::Explosion::resetGlobalExplosionId ( )
static

Definition at line 34 of file Explosion.cpp.

◆ shouldBeDeleted()

bool proofps_dd::Explosion::shouldBeDeleted ( ) const

Definition at line 453 of file Explosion.cpp.

◆ update()

void proofps_dd::Explosion::update ( const unsigned int & nFactor)

Definition at line 350 of file Explosion.cpp.

◆ updateReferenceExplosions()

bool proofps_dd::Explosion::updateReferenceExplosions ( PGE & pge,
const std::string & filenameWithRelPath,
const std::string & soundFilenameWithRelPath )
static

Definition at line 39 of file Explosion.cpp.

Member Data Documentation

◆ m_bCreateSentToClients

bool proofps_dd::Explosion::m_bCreateSentToClients
private

Server should send update to clients about creation of new explosions.

By default false.

Definition at line 108 of file Explosion.h.

◆ m_connHandle

pge_network::PgeNetworkConnectionHandle proofps_dd::Explosion::m_connHandle
private

Owner (caused by) of this explosion.

Used by PGE server instance only.

Definition at line 100 of file Explosion.h.

◆ m_explosionRefObjects

std::map< proofps_dd::ExplosionObjRefId, proofps_dd::Explosion::ExplosionRefData > proofps_dd::Explosion::m_explosionRefObjects
staticprivate

Definition at line 96 of file Explosion.h.

◆ m_fDamageAreaSize

TPureFloat proofps_dd::Explosion::m_fDamageAreaSize
private

Originating bullet's fDamageAreaSize.

Used by PGE server and client instances.

Definition at line 102 of file Explosion.h.

◆ m_fScalingPrimary

TPureFloat proofps_dd::Explosion::m_fScalingPrimary
private

To be increased during animation.

Definition at line 106 of file Explosion.h.

◆ m_fScalingSecondary

TPureFloat proofps_dd::Explosion::m_fScalingSecondary
private

To be increased during animation.

Definition at line 107 of file Explosion.h.

◆ m_globalExplosionId

proofps_dd::Explosion::ExplosionId proofps_dd::Explosion::m_globalExplosionId = 0
staticprivate

Next unique explosion id for identifying.

Used by PGE server instance only.

Definition at line 94 of file Explosion.h.

◆ m_id

ExplosionId proofps_dd::Explosion::m_id
private

Unique explosion id for identifying.

Used by PGE server and client instances.

Definition at line 98 of file Explosion.h.

◆ m_objPrimary

PureObject3D* proofps_dd::Explosion::m_objPrimary
private

Associated Primary Pure object to be rendered.

Used by PGE server and client instances. TODO: shared ptr.

Definition at line 104 of file Explosion.h.

◆ m_objSecondary

PureObject3D* proofps_dd::Explosion::m_objSecondary
private

Associated Secondary Pure object to be rendered.

Used by PGE server and client instances. TODO: shared ptr.

Definition at line 105 of file Explosion.h.

◆ m_pge

PGE& proofps_dd::Explosion::m_pge
private

Definition at line 99 of file Explosion.h.

◆ m_refId

ExplosionObjRefId proofps_dd::Explosion::m_refId
private

Explosion object reference id, used to search in m_explosionRefObjects.

Used by PGE server and client instances.

Definition at line 101 of file Explosion.h.

◆ m_sndHandle

SoLoud::handle proofps_dd::Explosion::m_sndHandle {}
private

Definition at line 109 of file Explosion.h.


The documentation for this class was generated from the following files: