Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CGameView Class Reference

#include <GameView.h>

Inheritance diagram for CGameView:
Collaboration diagram for CGameView:

Public Member Functions

 CGameView (Renderer::Backend::IDevice *device, CGame *pGame)
 
 ~CGameView () override
 
void SetViewport (const SViewPort &vp)
 
void RegisterInit ()
 
void Update (const float deltaRealTime)
 Updates all the view information (i.e. More...
 
void BeginFrame ()
 
void Prepare (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void Render (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void RenderOverlays (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
InReaction HandleEvent (const SDL_Event_ *ev)
 
CVector3D GetCameraPivot () const
 
CVector3D GetCameraPosition () const
 
CVector3D GetCameraRotation () const
 
float GetCameraZoom () const
 
void SetCamera (const CVector3D &pos, float rotX, float rotY, float zoom)
 
void MoveCameraTarget (const CVector3D &target)
 
void ResetCameraTarget (const CVector3D &target)
 
void FollowEntity (entity_id_t entity, bool firstPerson)
 
entity_id_t GetFollowedEntity ()
 
 DECLARE_BOOLEAN_SETTING (Culling)
 
 DECLARE_BOOLEAN_SETTING (LockCullCamera)
 
 DECLARE_BOOLEAN_SETTING (ConstrainCamera)
 
CCameraGetCamera ()
 
CCinemaManagerGetCinema ()
 
CObjectManagerGetObjectManager ()
 
void EnumerateObjects (const CFrustum &frustum, SceneCollector *c) override
 Send all objects that can be seen when rendering the given frustum to the scene collector. More...
 
CLOSTextureGetLOSTexture () override
 Return the LOS texture to be used for rendering this scene. More...
 
CTerritoryTextureGetTerritoryTexture () override
 Return the territory texture to be used for rendering this scene. More...
 
CMiniMapTextureGetMiniMapTexture () override
 Return the minimap texture to be used for rendering this scene. More...
 

Private Member Functions

 NONCOPYABLE (CGameView)
 
void UnloadResources ()
 
- Private Member Functions inherited from Scene
virtual ~Scene ()
 
virtual void EnumerateObjects (const CFrustum &frustum, SceneCollector *c)=0
 Send all objects that can be seen when rendering the given frustum to the scene collector. More...
 
virtual CLOSTextureGetLOSTexture ()=0
 Return the LOS texture to be used for rendering this scene. More...
 
virtual CTerritoryTextureGetTerritoryTexture ()=0
 Return the territory texture to be used for rendering this scene. More...
 
virtual CMiniMapTextureGetMiniMapTexture ()=0
 Return the minimap texture to be used for rendering this scene. More...
 

Private Attributes

CGameViewImplm
 

Constructor & Destructor Documentation

◆ CGameView()

CGameView::CGameView ( Renderer::Backend::IDevice device,
CGame pGame 
)

◆ ~CGameView()

CGameView::~CGameView ( )
override

Member Function Documentation

◆ BeginFrame()

void CGameView::BeginFrame ( )

◆ DECLARE_BOOLEAN_SETTING() [1/3]

CGameView::DECLARE_BOOLEAN_SETTING ( ConstrainCamera  )

◆ DECLARE_BOOLEAN_SETTING() [2/3]

CGameView::DECLARE_BOOLEAN_SETTING ( Culling  )

◆ DECLARE_BOOLEAN_SETTING() [3/3]

CGameView::DECLARE_BOOLEAN_SETTING ( LockCullCamera  )

◆ EnumerateObjects()

void CGameView::EnumerateObjects ( const CFrustum frustum,
SceneCollector c 
)
overridevirtual

Send all objects that can be seen when rendering the given frustum to the scene collector.

Parameters
frustumThe frustum that will be used for rendering.
cThe scene collector that should receive objects inside the frustum that are visible.

Implements Scene.

◆ FollowEntity()

void CGameView::FollowEntity ( entity_id_t  entity,
bool  firstPerson 
)

◆ GetCamera()

CCamera * CGameView::GetCamera ( )

◆ GetCameraPivot()

CVector3D CGameView::GetCameraPivot ( ) const

◆ GetCameraPosition()

CVector3D CGameView::GetCameraPosition ( ) const

◆ GetCameraRotation()

CVector3D CGameView::GetCameraRotation ( ) const

◆ GetCameraZoom()

float CGameView::GetCameraZoom ( ) const

◆ GetCinema()

CCinemaManager * CGameView::GetCinema ( )

◆ GetFollowedEntity()

entity_id_t CGameView::GetFollowedEntity ( )

◆ GetLOSTexture()

CLOSTexture & CGameView::GetLOSTexture ( )
overridevirtual

Return the LOS texture to be used for rendering this scene.

Implements Scene.

◆ GetMiniMapTexture()

CMiniMapTexture & CGameView::GetMiniMapTexture ( )
overridevirtual

Return the minimap texture to be used for rendering this scene.

Implements Scene.

◆ GetObjectManager()

CObjectManager & CGameView::GetObjectManager ( )

◆ GetTerritoryTexture()

CTerritoryTexture & CGameView::GetTerritoryTexture ( )
overridevirtual

Return the territory texture to be used for rendering this scene.

Implements Scene.

◆ HandleEvent()

InReaction CGameView::HandleEvent ( const SDL_Event_ ev)

◆ MoveCameraTarget()

void CGameView::MoveCameraTarget ( const CVector3D target)

◆ NONCOPYABLE()

CGameView::NONCOPYABLE ( CGameView  )
private

◆ Prepare()

void CGameView::Prepare ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)

◆ RegisterInit()

void CGameView::RegisterInit ( )

◆ Render()

void CGameView::Render ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)

◆ RenderOverlays()

void CGameView::RenderOverlays ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)

◆ ResetCameraTarget()

void CGameView::ResetCameraTarget ( const CVector3D target)

◆ SetCamera()

void CGameView::SetCamera ( const CVector3D pos,
float  rotX,
float  rotY,
float  zoom 
)

◆ SetViewport()

void CGameView::SetViewport ( const SViewPort vp)

◆ UnloadResources()

void CGameView::UnloadResources ( )
private

◆ Update()

void CGameView::Update ( const float  deltaRealTime)

Updates all the view information (i.e.

rotate camera, scroll, whatever). This will not change any World information - only the presentation.

Parameters
deltaRealTimeElapsed real time since the last frame.

Member Data Documentation

◆ m

CGameViewImpl* CGameView::m
private

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