olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
Loading...
Searching...
No Matches
olc::rcw::Engine Class Referenceabstract

#include <olcPGEX_RayCastWorld.h>

Inheritance diagram for olc::rcw::Engine:
olc::PGEX

Public Types

enum class  CellSide {
  North , East , South , West ,
  Top , Bottom
}
 

Public Member Functions

 Engine (const int screen_w, const int screen_h, const float fov)
 
void SetCamera (const olc::vf2d &pos, const float heading)
 
virtual void Update (float fElapsedTime)
 
void Render ()
 
- Public Member Functions inherited from olc::PGEX
 PGEX (bool bHook=false)
 

Public Attributes

std::unordered_map< uint32_t, std::shared_ptr< olc::rcw::Object > > mapObjects
 

Protected Member Functions

virtual olc::Pixel SelectSceneryPixel (const int tile_x, const int tile_y, const olc::rcw::Engine::CellSide side, const float sample_x, const float sample_y, const float distance)=0
 
virtual bool IsLocationSolid (const float tile_x, const float tile_y)=0
 
virtual float GetObjectWidth (const uint32_t id)=0
 
virtual float GetObjectHeight (const uint32_t id)=0
 
virtual olc::Pixel SelectObjectPixel (const uint32_t id, const float sample_x, const float sample_y, const float distance, const float angle)=0
 
virtual void HandleObjectVsScenery (std::shared_ptr< olc::rcw::Object > object, const int tile_x, const int tile_y, const olc::rcw::Engine::CellSide side, const float offset_x, const float offset_y)
 
virtual void HandleObjectVsObject (std::shared_ptr< olc::rcw::Object > object1, std::shared_ptr< olc::rcw::Object > object2)
 
- Protected Member Functions inherited from olc::PGEX
virtual void OnBeforeUserCreate ()
 
virtual void OnAfterUserCreate ()
 
virtual bool OnBeforeUserUpdate (float &fElapsedTime)
 
virtual void OnAfterUserUpdate (float fElapsedTime)
 

Additional Inherited Members

- Static Protected Attributes inherited from olc::PGEX
static PixelGameEnginepge
 

Member Enumeration Documentation

◆ CellSide

enum class olc::rcw::Engine::CellSide
strong
Enumerator
North 
East 
South 
West 
Top 
Bottom 

Constructor & Destructor Documentation

◆ Engine()

olc::rcw::Engine::Engine ( const int screen_w,
const int screen_h,
const float fov )

Member Function Documentation

◆ GetObjectHeight()

virtual float olc::rcw::Engine::GetObjectHeight ( const uint32_t id)
protectedpure virtual

◆ GetObjectWidth()

virtual float olc::rcw::Engine::GetObjectWidth ( const uint32_t id)
protectedpure virtual

◆ HandleObjectVsObject()

virtual void olc::rcw::Engine::HandleObjectVsObject ( std::shared_ptr< olc::rcw::Object > object1,
std::shared_ptr< olc::rcw::Object > object2 )
protectedvirtual

◆ HandleObjectVsScenery()

virtual void olc::rcw::Engine::HandleObjectVsScenery ( std::shared_ptr< olc::rcw::Object > object,
const int tile_x,
const int tile_y,
const olc::rcw::Engine::CellSide side,
const float offset_x,
const float offset_y )
protectedvirtual

◆ IsLocationSolid()

virtual bool olc::rcw::Engine::IsLocationSolid ( const float tile_x,
const float tile_y )
protectedpure virtual

◆ Render()

void olc::rcw::Engine::Render ( )

◆ SelectObjectPixel()

virtual olc::Pixel olc::rcw::Engine::SelectObjectPixel ( const uint32_t id,
const float sample_x,
const float sample_y,
const float distance,
const float angle )
protectedpure virtual

◆ SelectSceneryPixel()

virtual olc::Pixel olc::rcw::Engine::SelectSceneryPixel ( const int tile_x,
const int tile_y,
const olc::rcw::Engine::CellSide side,
const float sample_x,
const float sample_y,
const float distance )
protectedpure virtual

◆ SetCamera()

void olc::rcw::Engine::SetCamera ( const olc::vf2d & pos,
const float heading )

◆ Update()

virtual void olc::rcw::Engine::Update ( float fElapsedTime)
virtual

Member Data Documentation

◆ mapObjects

std::unordered_map<uint32_t, std::shared_ptr<olc::rcw::Object> > olc::rcw::Engine::mapObjects

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