DDNet documentation
Loading...
Searching...
No Matches
CMultiView Class Reference

#include <multiview.h>

Inheritance diagram for CMultiView:
[legend]
Collaboration diagram for CMultiView:
[legend]

Classes

class  CViewedClient

Public Member Functions

 CMultiView ()
int Sizeof () const override
void OnReset () override
void OnMessage (int MsgType, void *pRawMsg) override
void UpdateActivation ()
void UpdateView ()
void CheckReset ()
bool IsActivated () const
void SetActivated (bool Activated)
bool ShowHud () const
int Team () const
bool IsViewed (int ClientId) const
void ViewPlayer (int ClientId)
void ToggleView (int ClientId)
void ClearViews ()
void AddPersonalZoom (float Amount)
void SetPersonalZoom (float Zoom)
void Reset ()
int FindFirstViewed () const
void ClearView (int ClientId)
Public Member Functions inherited from CComponent
virtual void OnStateChange (int NewState, int OldState)
virtual void OnConsoleInit ()
virtual void OnInit ()
virtual void OnShutdown ()
virtual void OnWindowResize ()
virtual void OnUpdate ()
virtual void OnRender ()
virtual void OnNewSnapshot ()
virtual void OnRelease ()
virtual void OnMapLoad ()
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
virtual bool OnInput (const IInput::CEvent &Event)
virtual bool OnTouchState (std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Public Member Functions inherited from CComponentInterfaces
virtual void OnInterfacesInit (CGameClient *pClient)
virtual ~CComponentInterfaces ()=default

Private Member Functions

void OnKillMessage (const CNetMsg_Sv_KillMsg *pKillMessage)
bool IsAnyViewed () const
bool Init (int Team)
void ClearAll ()
float CalculateMultiplier (vec2 TargetPos)
float CalculateZoom (vec2 MinPos, vec2 MaxPos, float Vel)

Private Attributes

int m_Team
float m_PersonalZoom
bool m_ShowHud
bool m_Activated
CViewedClient m_aViewedClients [MAX_CLIENTS]
bool m_Solo
bool m_IsInit
bool m_Teleported
vec2 m_OldPos
float m_OldPersonalZoom
float m_SecondChance
float m_OldCameraDistance

Additional Inherited Members

Protected Member Functions inherited from CComponentInterfaces
class CGameClient * GameClient () const
class IClient * Client () const
class IKernel * Kernel () const
class IEngine * Engine () const
class IGraphics * Graphics () const
class ITextRender * TextRender () const
class IInput * Input () const
class IStorage * Storage () const
class CUi * Ui () const
class ISound * Sound () const
class CRenderTools * RenderTools () const
class CRenderMap * RenderMap () const
class IConfigManager * ConfigManager () const
class CConfig * Config () const
class IConsole * Console () const
class IDemoPlayer * DemoPlayer () const
class IDemoRecorder * DemoRecorder (int Recorder) const
class IFavorites * Favorites () const
class IServerBrowser * ServerBrowser () const
class CLayers * Layers () const
class CCollision * Collision () const
int64_t time () const
float LocalTime () const
class IHttp * Http () const

Constructor & Destructor Documentation

◆ CMultiView()

CMultiView::CMultiView ( )

Member Function Documentation

◆ AddPersonalZoom()

void CMultiView::AddPersonalZoom ( float Amount)
inline

◆ CalculateMultiplier()

float CMultiView::CalculateMultiplier ( vec2 TargetPos)
private

◆ CalculateZoom()

float CMultiView::CalculateZoom ( vec2 MinPos,
vec2 MaxPos,
float Vel )
private

◆ CheckReset()

void CMultiView::CheckReset ( )

◆ ClearAll()

void CMultiView::ClearAll ( )
private

◆ ClearView()

void CMultiView::ClearView ( int ClientId)

◆ ClearViews()

void CMultiView::ClearViews ( )

◆ FindFirstViewed()

int CMultiView::FindFirstViewed ( ) const

◆ Init()

bool CMultiView::Init ( int Team)
private

◆ IsActivated()

bool CMultiView::IsActivated ( ) const
inline

◆ IsAnyViewed()

bool CMultiView::IsAnyViewed ( ) const
private

◆ IsViewed()

bool CMultiView::IsViewed ( int ClientId) const
inline

◆ OnKillMessage()

void CMultiView::OnKillMessage ( const CNetMsg_Sv_KillMsg * pKillMessage)
private

◆ OnMessage()

void CMultiView::OnMessage ( int Msg,
void * pRawMsg )
overridevirtual

Called when receiving a network message.

Parameters
MsgThe message type.
pRawMsgThe message data.
See also
NETMSGTYPE_SV_DDRACETIME
CNetMsg_Sv_DDRaceTime

Reimplemented from CComponent.

◆ OnReset()

void CMultiView::OnReset ( )
overridevirtual

Called to reset the component. This method is usually called on your component constructor to avoid code duplication.

See also
CHud::CHud()
CHud::OnReset()

Reimplemented from CComponent.

◆ Reset()

void CMultiView::Reset ( )

◆ SetActivated()

void CMultiView::SetActivated ( bool Activated)
inline

◆ SetPersonalZoom()

void CMultiView::SetPersonalZoom ( float Zoom)
inline

◆ ShowHud()

bool CMultiView::ShowHud ( ) const
inline

◆ Sizeof()

int CMultiView::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ Team()

int CMultiView::Team ( ) const
inline

◆ ToggleView()

void CMultiView::ToggleView ( int ClientId)

◆ UpdateActivation()

void CMultiView::UpdateActivation ( )

◆ UpdateView()

void CMultiView::UpdateView ( )

◆ ViewPlayer()

void CMultiView::ViewPlayer ( int ClientId)

Member Data Documentation

◆ m_Activated

bool CMultiView::m_Activated
private

◆ m_aViewedClients

CViewedClient CMultiView::m_aViewedClients[MAX_CLIENTS]
private

◆ m_IsInit

bool CMultiView::m_IsInit
private

◆ m_OldCameraDistance

float CMultiView::m_OldCameraDistance
private

◆ m_OldPersonalZoom

float CMultiView::m_OldPersonalZoom
private

◆ m_OldPos

vec2 CMultiView::m_OldPos
private

◆ m_PersonalZoom

float CMultiView::m_PersonalZoom
private

◆ m_SecondChance

float CMultiView::m_SecondChance
private

◆ m_ShowHud

bool CMultiView::m_ShowHud
private

◆ m_Solo

bool CMultiView::m_Solo
private

◆ m_Team

int CMultiView::m_Team
private

◆ m_Teleported

bool CMultiView::m_Teleported
private

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