![]() |
PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
|
Finally a dedicated class for crosshair was needed, because from PRooFPS-dd v0.2.5, the crosshair becomes smarter and smarter, and for the related functionalities we should keep some logic separate. More...
Finally a dedicated class for crosshair was needed, because from PRooFPS-dd v0.2.5, the crosshair becomes smarter and smarter, and for the related functionalities we should keep some logic separate.
#include <XHair.h>
Public Member Functions | |
CConsole & | getConsole () const |
XHair (PGE &pge) | |
~XHair () | |
PureObject3D & | getObject3D () |
void | show () |
void | showInCenter () |
void | hide () |
bool | visible () const |
void | updateUnprojectedCoords (PureCamera &cam) |
const PureVector & | getUnprojectedCoords () const |
void | showIdText (const std::string &sText) |
void | hideIdText () |
const std::string & | getIdText () const |
void | startBlinking () |
void | stopBlinking () |
void | handleMagEmpty () |
void | handleMagLoaded () |
void | handleCooldownStart () |
void | handleCooldownEnd () |
void | setBaseScaling (float scaleFactor) |
Sets the base/initial scaling for the crosshair. | |
void | setRelativeScaling (float relativeScaleFactor) |
Sets the relative scaling for the crosshair. | |
void | updateVisuals () |
Static Public Member Functions | |
static const char * | getLoggerModuleName () |
Static Public Attributes | |
static constexpr char * | szCvarGuiXHairIdentifiesPlayers = "gui_xhair_identifies_players" |
Protected Member Functions | |
XHair (const XHair &)=delete | |
XHair & | operator= (const XHair &)=delete |
XHair (XHair &&)=delete | |
XHair && | operator= (XHair &&)=delete |
Private Types | |
enum class | HighlightRect { Upper = 0 , Lower , Left , Right } |
Private Member Functions | |
void | adjustHighlightSize (const bool &bCanShowHighlightPerXHairMovement) |
void | updateHighlight () |
Private Attributes | |
PGE & | m_pge |
PureObject3D * | m_pObjXHair |
TPURE_XY | m_prevXHairPos |
PureVector | m_vecUnprojected |
PureObject3D * | m_pObjDebugCube |
PureObject3D * | m_vHLightRects [4] = {} |
std::string | m_sIdText |
std::chrono::time_point< std::chrono::steady_clock > | m_timeStartedBlinking |
bool | m_bVisible = false |
bool | m_bBlinking = false |
float | m_fBaseScaling = 1.f |
float | m_fRelativeScaleFactor = 1.f |
|
strongprivate |
|
protecteddelete |
|
protecteddelete |
|
private |
const std::string & proofps_dd::XHair::getIdText | ( | ) | const |
|
static |
const PureVector & proofps_dd::XHair::getUnprojectedCoords | ( | ) | const |
void proofps_dd::XHair::setBaseScaling | ( | float | scaleFactor | ) |
void proofps_dd::XHair::setRelativeScaling | ( | float | relativeScaleFactor | ) |
Sets the relative scaling for the crosshair.
This relative scaling basically represents the current weapon's momentary accuracy, you can directly pass it. Value of 1.f represents the base scaling which represents the weapon's base accuracy i.e. when the player is standing still and recoil factor is not considered. Passing negative value is considered as programming error.
void proofps_dd::XHair::showIdText | ( | const std::string & | sText | ) |
void proofps_dd::XHair::updateUnprojectedCoords | ( | PureCamera & | cam | ) |
|
private |
|
private |
|
private |
|
staticconstexpr |