Definition at line 26 of file CameraHandling.h.
#include <CameraHandling.h>
|
| void | cameraSmoothShakeForceTowardsZero (const float &fFps) |
| |
| void | cameraUpdateShakeFactorXY (const float &fFps) |
| |
| void | cameraUpdatePosAndAngleToFollowPos (PureCamera &cam, const PureVector &vecFollowPos, const XHair &xhair, const float &fFps, bool bCamFollowsXHair, bool bCamTiltingAllowed) |
| |
| void | cameraUpdatePosAndAngleWhenSpectating (const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers, PureCamera &cam, XHair &xhair, const float &fFps, bool bCamFollowsXHair, bool bCamTiltingAllowed) |
| |
| void | cameraUpdatePosAndAngleWhenPlayerIsSomersaulting (PureCamera &cam, const Player &player) |
| |
| void | cameraUpdatePosAndAngleWhenPlayerIsInNormalSituation (PureCamera &cam, const Player &player, const XHair &xhair, const float &fFps, bool bCamFollowsXHair, bool bCamTiltingAllowed) |
| |
◆ SpectatingView
◆ CameraHandling() [1/3]
◆ CameraHandling() [2/3]
◆ CameraHandling() [3/3]
◆ cameraGetPlayerConnectionHandleToFollowWhenSpectating()
| const pge_network::PgeNetworkConnectionHandle & proofps_dd::CameraHandling::cameraGetPlayerConnectionHandleToFollowWhenSpectating |
( |
| ) |
const |
- Returns
- Connection handle of the player who was most recently found to be spectated. Might not be valid anymore, therefore it is advised to do a sanity check with the returned value.
Definition at line 104 of file CameraHandling.cpp.
◆ cameraGetPosToFollowWhenSpectating()
| PureVector & proofps_dd::CameraHandling::cameraGetPosToFollowWhenSpectating |
( |
| ) |
|
This is essentially controlled by cameraUpdatePosAndAngle() when we are in spectator mode, however it is allowed to be accessed by the user to update it in "free camera spectating view".
Definition at line 95 of file CameraHandling.cpp.
◆ cameraGetShakeForce()
| PureVector & proofps_dd::CameraHandling::cameraGetShakeForce |
( |
| ) |
|
|
protected |
◆ cameraGetSpectatingView()
◆ cameraInitForGameStart()
| void proofps_dd::CameraHandling::cameraInitForGameStart |
( |
| ) |
|
|
protected |
◆ cameraPositionToMapCenter()
| void proofps_dd::CameraHandling::cameraPositionToMapCenter |
( |
| ) |
|
|
protected |
◆ cameraSmoothShakeForceTowardsZero()
| void proofps_dd::CameraHandling::cameraSmoothShakeForceTowardsZero |
( |
const float & | fFps | ) |
|
|
private |
◆ cameraToggleSpectatingView()
| void proofps_dd::CameraHandling::cameraToggleSpectatingView |
( |
| ) |
|
◆ cameraUpdatePosAndAngle()
| void proofps_dd::CameraHandling::cameraUpdatePosAndAngle |
( |
pge_audio::PgeAudio & | audio, |
|
|
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | mapPlayers, |
|
|
const Player & | player, |
|
|
XHair & | xhair, |
|
|
const float & | fFps, |
|
|
bool | bCamFollowsXHair, |
|
|
bool | bCamTiltingAllowed, |
|
|
bool | bCamRollAllowed ) |
|
protected |
◆ cameraUpdatePosAndAngleToFollowPos()
| void proofps_dd::CameraHandling::cameraUpdatePosAndAngleToFollowPos |
( |
PureCamera & | cam, |
|
|
const PureVector & | vecFollowPos, |
|
|
const XHair & | xhair, |
|
|
const float & | fFps, |
|
|
bool | bCamFollowsXHair, |
|
|
bool | bCamTiltingAllowed ) |
|
private |
◆ cameraUpdatePosAndAngleWhenPlayerIsInNormalSituation()
| void proofps_dd::CameraHandling::cameraUpdatePosAndAngleWhenPlayerIsInNormalSituation |
( |
PureCamera & | cam, |
|
|
const Player & | player, |
|
|
const XHair & | xhair, |
|
|
const float & | fFps, |
|
|
bool | bCamFollowsXHair, |
|
|
bool | bCamTiltingAllowed ) |
|
private |
◆ cameraUpdatePosAndAngleWhenPlayerIsSomersaulting()
| void proofps_dd::CameraHandling::cameraUpdatePosAndAngleWhenPlayerIsSomersaulting |
( |
PureCamera & | cam, |
|
|
const Player & | player ) |
|
private |
◆ cameraUpdatePosAndAngleWhenSpectating()
| void proofps_dd::CameraHandling::cameraUpdatePosAndAngleWhenSpectating |
( |
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | mapPlayers, |
|
|
PureCamera & | cam, |
|
|
XHair & | xhair, |
|
|
const float & | fFps, |
|
|
bool | bCamFollowsXHair, |
|
|
bool | bCamTiltingAllowed ) |
|
private |
◆ cameraUpdateShakeFactorXY()
| void proofps_dd::CameraHandling::cameraUpdateShakeFactorXY |
( |
const float & | fFps | ) |
|
|
private |
◆ canSpectatePlayer()
| bool proofps_dd::CameraHandling::canSpectatePlayer |
( |
const Player & | player | ) |
|
|
static |
Use this function when iterating over players, to decide if we can spectate this player.
Requires the only one existing GameMode instance.
- Returns
- True if the given player can be spectated in PlayerFollow spectating view, false otherwise. False if there is no existing GameMode instance.
Definition at line 33 of file CameraHandling.cpp.
◆ findAnyValidPlayerToFollowInPlayerSpectatingView()
| bool proofps_dd::CameraHandling::findAnyValidPlayerToFollowInPlayerSpectatingView |
( |
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | mapPlayers, |
|
|
PureVector & | posPlayerToFollow ) |
Useful when we are toggling spectating view to player follow view, or in each frame to check if followed player is still valid in player follow view.
First checks validity of already saved player to follow (who we have been following), and finds different player only if that player is not valid anymore.
If the function returns true, the following function returns valid data:
- Parameters
-
| mapPlayers | List of all connected players where we are searching for a player to be spectated. |
| posPlayerToFollow | A valid position of the player selected to be spectated. Valid only if the function returns true. |
- Returns
- True if cameraGetPlayerConnectionHandleToFollowWhenSpectating() is still valid or another valid player has been found and cameraGetPlayerConnectionHandleToFollowWhenSpectating() has now become valid again, false otherwise. False means we cannot follow anyone, need to switch back to free camera spectating view.
Definition at line 340 of file CameraHandling.cpp.
◆ findNextValidPlayerToFollowInPlayerSpectatingView()
| bool proofps_dd::CameraHandling::findNextValidPlayerToFollowInPlayerSpectatingView |
( |
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | mapPlayers | ) |
|
◆ findPrevValidPlayerToFollowInPlayerSpectatingView()
| bool proofps_dd::CameraHandling::findPrevValidPlayerToFollowInPlayerSpectatingView |
( |
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | mapPlayers | ) |
|
◆ getConsole()
| CConsole & proofps_dd::CameraHandling::getConsole |
( |
| ) |
const |
◆ getLoggerModuleName()
| const char * proofps_dd::CameraHandling::getLoggerModuleName |
( |
| ) |
|
|
static |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ m_connHandlePlayerToFollowInSpectatingView
| pge_network::PgeNetworkConnectionHandle proofps_dd::CameraHandling::m_connHandlePlayerToFollowInSpectatingView { pge_network::ServerConnHandle } |
|
private |
◆ m_durations
| Durations& proofps_dd::CameraHandling::m_durations |
|
private |
◆ m_eSpectatingView
◆ m_fCameraMinY
| float proofps_dd::CameraHandling::m_fCameraMinY = 0.f |
|
private |
◆ m_fShakeDegree
| float proofps_dd::CameraHandling::m_fShakeDegree = 0.f |
|
private |
◆ m_fShakeFactorX
| float proofps_dd::CameraHandling::m_fShakeFactorX = 0.f |
|
private |
◆ m_fShakeFactorY
| float proofps_dd::CameraHandling::m_fShakeFactorY = 0.f |
|
private |
◆ m_maps
| Maps& proofps_dd::CameraHandling::m_maps |
|
private |
◆ m_pure
| PR00FsUltimateRenderingEngine& proofps_dd::CameraHandling::m_pure |
|
private |
◆ m_vecCamShakeForce
| PureVector proofps_dd::CameraHandling::m_vecCamShakeForce |
|
private |
◆ m_vecPosToFollowInFreeCameraView
| PureVector proofps_dd::CameraHandling::m_vecPosToFollowInFreeCameraView {} |
|
private |
The documentation for this class was generated from the following files: