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

Detailed Description

Definition at line 19 of file Explosion.h.

#include <Explosion.h>

Public Types

typedef uint32_t ExplosionId
 

Public Member Functions

 Explosion (PR00FsUltimateRenderingEngine &gfx, const pge_network::PgeNetworkConnectionHandle &connHandle, const PureVector &pos, const TPureFloat &fDamageAreaSize)
 Ctor to be used by PGE server instance: bullet id will be assigned within the ctor.
 
 Explosion (PR00FsUltimateRenderingEngine &gfx, const ExplosionId &id, const pge_network::PgeNetworkConnectionHandle &connHandle, const PureVector &pos, const TPureFloat &fDamageAreaSize)
 Ctor to be used by PGE client instance: bullet id as received from server.
 
 Explosion (const Explosion &other)
 
Explosionoperator= (const Explosion &other)
 
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 initExplosionsReference (PGE &pge)
 
static void destroyExplosionsReference ()
 

Private Attributes

ExplosionId m_id
 Unique explosion id for identifying.
 
PR00FsUltimateRenderingEngine & m_gfx
 
pge_network::PgeNetworkConnectionHandle m_connHandle
 Owner (caused by) of this explosion.
 
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.
 

Static Private Attributes

static ExplosionId m_globalExplosionId = 0
 Next unique explosion id for identifying.
 
static PureObject3D * m_pReferenceObjExplosion = nullptr
 

Member Typedef Documentation

◆ ExplosionId

Definition at line 24 of file Explosion.h.

Constructor & Destructor Documentation

◆ Explosion() [1/3]

proofps_dd::Explosion::Explosion ( PR00FsUltimateRenderingEngine & gfx,
const pge_network::PgeNetworkConnectionHandle & connHandle,
const PureVector & pos,
const TPureFloat & fDamageAreaSize )

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

Definition at line 73 of file Explosion.cpp.

◆ Explosion() [2/3]

proofps_dd::Explosion::Explosion ( PR00FsUltimateRenderingEngine & gfx,
const ExplosionId & id,
const pge_network::PgeNetworkConnectionHandle & connHandle,
const PureVector & pos,
const TPureFloat & fDamageAreaSize )

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

Definition at line 101 of file Explosion.cpp.

◆ Explosion() [3/3]

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

Definition at line 127 of file Explosion.cpp.

◆ ~Explosion()

proofps_dd::Explosion::~Explosion ( )
virtual

Definition at line 200 of file Explosion.cpp.

Member Function Documentation

◆ destroyExplosionsReference()

void proofps_dd::Explosion::destroyExplosionsReference ( )
static

Definition at line 61 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 212 of file Explosion.cpp.

◆ getDamageAreaSize()

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

Definition at line 312 of file Explosion.cpp.

◆ getDamageAtDistance()

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

Definition at line 317 of file Explosion.cpp.

◆ getGlobalExplosionId()

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

Definition at line 26 of file Explosion.cpp.

◆ getId()

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

Definition at line 217 of file Explosion.cpp.

◆ getLoggerModuleName()

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

Returns the logger module name of this class.

Definition at line 21 of file Explosion.cpp.

◆ getOwner()

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

Definition at line 222 of file Explosion.cpp.

◆ getPrimaryObject3D() [1/2]

PureObject3D & proofps_dd::Explosion::getPrimaryObject3D ( )

Definition at line 292 of file Explosion.cpp.

◆ getPrimaryObject3D() [2/2]

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

Definition at line 297 of file Explosion.cpp.

◆ getSecondaryObject3D() [1/2]

PureObject3D & proofps_dd::Explosion::getSecondaryObject3D ( )

Definition at line 302 of file Explosion.cpp.

◆ getSecondaryObject3D() [2/2]

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

Definition at line 307 of file Explosion.cpp.

◆ initExplosionsReference()

bool proofps_dd::Explosion::initExplosionsReference ( PGE & pge)
static

Definition at line 36 of file Explosion.cpp.

◆ isCreateSentToClients()

bool & proofps_dd::Explosion::isCreateSentToClients ( )

Definition at line 227 of file Explosion.cpp.

◆ operator=()

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

Definition at line 162 of file Explosion.cpp.

◆ resetGlobalExplosionId()

void proofps_dd::Explosion::resetGlobalExplosionId ( )
static

Definition at line 31 of file Explosion.cpp.

◆ shouldBeDeleted()

bool proofps_dd::Explosion::shouldBeDeleted ( ) const

Definition at line 335 of file Explosion.cpp.

◆ update()

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

Definition at line 232 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 96 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 89 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 90 of file Explosion.h.

◆ m_fScalingPrimary

TPureFloat proofps_dd::Explosion::m_fScalingPrimary
private

To be increased during animation.

Definition at line 94 of file Explosion.h.

◆ m_fScalingSecondary

TPureFloat proofps_dd::Explosion::m_fScalingSecondary
private

To be increased during animation.

Definition at line 95 of file Explosion.h.

◆ m_gfx

PR00FsUltimateRenderingEngine& proofps_dd::Explosion::m_gfx
private

Definition at line 88 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 84 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 87 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 92 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 93 of file Explosion.h.

◆ m_pReferenceObjExplosion

PureObject3D * proofps_dd::Explosion::m_pReferenceObjExplosion = nullptr
staticprivate

Definition at line 85 of file Explosion.h.


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