Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | List of all members
GridSystem Class Reference

#include <ECS_Systems.h>

+ Inheritance diagram for GridSystem:
+ Collaboration diagram for GridSystem:

Public Member Functions

 GridSystem ()
 
virtual void Render () override
 
void RenderForCamera (const CameraTransform &cam)
 
const GridSettings_dataFindSettings () const
 
void DrawLineWorld (const CameraTransform &cam, const Vector &aWorld, const Vector &bWorld, const SDL_Color &c)
 
void DrawFilledRectWorld (const CameraTransform &cam, const Vector &worldPos, float width, float height, const SDL_Color &c)
 
SDL_FRect GetWorldVisibleBounds (const CameraTransform &cam)
 
void RenderOrtho (const CameraTransform &cam, const GridSettings_data &s)
 
void RenderIso (const CameraTransform &cam, const GridSettings_data &s)
 
void RenderHex (const CameraTransform &cam, const GridSettings_data &s)
 
void RenderCollisionOverlay (const CameraTransform &cam, const GridSettings_data &s)
 
void RenderNavigationOverlay (const CameraTransform &cam, const GridSettings_data &s)
 
void DrawIsometricTileOverlay (float centerX, float centerY, float width, float height, const SDL_Color &color)
 
void DrawHexagonOverlay (float centerX, float centerY, float radius, const SDL_Color &color)
 
- Public Member Functions inherited from ECS_System
 ECS_System ()
 
virtual void Process ()
 
virtual void RenderDebug ()
 
void AddEntity (EntityID entity)
 
void RemoveEntity (EntityID entity)
 

Additional Inherited Members

- Public Attributes inherited from ECS_System
ComponentSignature requiredSignature
 
std::set< EntityIDm_entities
 

Detailed Description

Definition at line 177 of file ECS_Systems.h.

Constructor & Destructor Documentation

◆ GridSystem()

GridSystem::GridSystem ( )

Definition at line 1678 of file ECS_Systems.cpp.

Member Function Documentation

◆ DrawFilledRectWorld()

void GridSystem::DrawFilledRectWorld ( const CameraTransform cam,
const Vector worldPos,
float  width,
float  height,
const SDL_Color c 
)

Definition at line 2012 of file ECS_Systems.cpp.

References GetComponentTypeID_Static(), GameEngine::renderer, renderer, Vector::x, and Vector::y.

+ Here is the call graph for this function:

◆ DrawHexagonOverlay()

void GridSystem::DrawHexagonOverlay ( float  centerX,
float  centerY,
float  radius,
const SDL_Color color 
)

Definition at line 2081 of file ECS_Systems.cpp.

References GetComponentTypeID_Static(), k_PI, GameEngine::renderer, and renderer.

Referenced by RenderCollisionOverlay(), and RenderNavigationOverlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawIsometricTileOverlay()

void GridSystem::DrawIsometricTileOverlay ( float  centerX,
float  centerY,
float  width,
float  height,
const SDL_Color color 
)

Definition at line 2033 of file ECS_Systems.cpp.

References GetComponentTypeID_Static(), GameEngine::renderer, and renderer.

Referenced by RenderCollisionOverlay(), and RenderNavigationOverlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawLineWorld()

void GridSystem::DrawLineWorld ( const CameraTransform cam,
const Vector aWorld,
const Vector bWorld,
const SDL_Color c 
)

Definition at line 1692 of file ECS_Systems.cpp.

References GetComponentTypeID_Static(), GameEngine::renderer, renderer, Vector::x, and Vector::y.

Referenced by RenderHex(), RenderIso(), and RenderOrtho().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindSettings()

const GridSettings_data * GridSystem::FindSettings ( ) const

Definition at line 1680 of file ECS_Systems.cpp.

References World::Get(), World::GetComponent(), GetComponentTypeID_Static(), World::HasComponent(), and World::m_entitySignatures.

Referenced by Render(), and RenderForCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWorldVisibleBounds()

SDL_FRect GridSystem::GetWorldVisibleBounds ( const CameraTransform cam)

Definition at line 1705 of file ECS_Systems.cpp.

References GetComponentTypeID_Static().

Referenced by RenderCollisionOverlay(), RenderHex(), RenderIso(), RenderNavigationOverlay(), and RenderOrtho().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Render()

void GridSystem::Render ( )
overridevirtual

◆ RenderCollisionOverlay()

void GridSystem::RenderCollisionOverlay ( const CameraTransform cam,
const GridSettings_data s 
)

◆ RenderForCamera()

void GridSystem::RenderForCamera ( const CameraTransform cam)

Definition at line 1797 of file ECS_Systems.cpp.

References FindSettings(), GetComponentTypeID_Static(), HexAxial, Iso, Ortho, GameEngine::renderer, renderer, RenderHex(), RenderIso(), and RenderOrtho().

Referenced by RenderingSystem::Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderHex()

void GridSystem::RenderHex ( const CameraTransform cam,
const GridSettings_data s 
)

Definition at line 1948 of file ECS_Systems.cpp.

References DrawLineWorld(), GetComponentTypeID_Static(), GetWorldVisibleBounds(), and k_PI.

Referenced by Render(), and RenderForCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderIso()

void GridSystem::RenderIso ( const CameraTransform cam,
const GridSettings_data s 
)

Definition at line 1861 of file ECS_Systems.cpp.

References DrawLineWorld(), GetComponentTypeID_Static(), and GetWorldVisibleBounds().

Referenced by Render(), and RenderForCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderNavigationOverlay()

void GridSystem::RenderNavigationOverlay ( const CameraTransform cam,
const GridSettings_data s 
)

◆ RenderOrtho()

void GridSystem::RenderOrtho ( const CameraTransform cam,
const GridSettings_data s 
)

Definition at line 1818 of file ECS_Systems.cpp.

References DrawLineWorld(), GetComponentTypeID_Static(), and GetWorldVisibleBounds().

Referenced by Render(), and RenderForCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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