![]() |
olcPixelGameEngine v2.29
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
|
#include <olcPGEX_TransformedView.h>
Public Member Functions | |
| TransformedView ()=default | |
| virtual void | Initialise (const olc::vi2d &vViewArea, const olc::vf2d &vPixelScale={ 1.0f, 1.0f }) |
| olc::PixelGameEngine * | GetPGE () |
| void | SetWorldOffset (const olc::vf2d &vOffset) |
| void | MoveWorldOffset (const olc::vf2d &vDeltaOffset) |
| void | SetWorldScale (const olc::vf2d &vScale) |
| void | SetViewArea (const olc::vi2d &vViewArea) |
| olc::vf2d | GetWorldTL () const |
| olc::vf2d | GetWorldBR () const |
| olc::vf2d | GetWorldVisibleArea () const |
| void | ZoomAtScreenPos (const float fDeltaZoom, const olc::vi2d &vPos) |
| void | SetZoom (const float fZoom, const olc::vf2d &vPos) |
| void | StartPan (const olc::vi2d &vPos) |
| void | UpdatePan (const olc::vi2d &vPos) |
| void | EndPan (const olc::vi2d &vPos) |
| const olc::vf2d & | GetWorldOffset () const |
| const olc::vf2d & | GetWorldScale () const |
| virtual olc::vf2d | WorldToScreen (const olc::vf2d &vWorldPos) const |
| virtual olc::vf2d | ScreenToWorld (const olc::vf2d &vScreenPos) const |
| virtual olc::vf2d | ScaleToWorld (const olc::vf2d &vScreenSize) const |
| virtual olc::vf2d | ScaleToScreen (const olc::vf2d &vWorldSize) const |
| virtual bool | IsPointVisible (const olc::vf2d &vPos) const |
| virtual bool | IsRectVisible (const olc::vf2d &vPos, const olc::vf2d &vSize) const |
| virtual void | HandlePanAndZoom (const int nMouseButton=2, const float fZoomRate=0.1f, const bool bPan=true, const bool bZoom=true) |
| void | SetScaleExtents (const olc::vf2d &vScaleMin, const olc::vf2d &vScaleMax) |
| void | EnableScaleClamp (const bool bEnable) |
| virtual bool | Draw (float x, float y, olc::Pixel p=olc::WHITE) |
| bool | Draw (const olc::vf2d &pos, olc::Pixel p=olc::WHITE) |
| void | DrawLine (float x1, float y1, float x2, float y2, olc::Pixel p=olc::WHITE, uint32_t pattern=0xFFFFFFFF) |
| void | DrawLine (const olc::vf2d &pos1, const olc::vf2d &pos2, olc::Pixel p=olc::WHITE, uint32_t pattern=0xFFFFFFFF) |
| void | DrawCircle (float x, float y, float radius, olc::Pixel p=olc::WHITE, uint8_t mask=0xFF) |
| void | DrawCircle (const olc::vf2d &pos, float radius, olc::Pixel p=olc::WHITE, uint8_t mask=0xFF) |
| void | FillCircle (float x, float y, float radius, olc::Pixel p=olc::WHITE) |
| void | FillCircle (const olc::vf2d &pos, float radius, olc::Pixel p=olc::WHITE) |
| void | DrawRect (float x, float y, float w, float h, olc::Pixel p=olc::WHITE) |
| void | DrawRect (const olc::vf2d &pos, const olc::vf2d &size, olc::Pixel p=olc::WHITE) |
| void | FillRect (float x, float y, float w, float h, olc::Pixel p=olc::WHITE) |
| void | FillRect (const olc::vf2d &pos, const olc::vf2d &size, olc::Pixel p=olc::WHITE) |
| void | DrawTriangle (float x1, float y1, float x2, float y2, float x3, float y3, olc::Pixel p=olc::WHITE) |
| void | DrawTriangle (const olc::vf2d &pos1, const olc::vf2d &pos2, const olc::vf2d &pos3, olc::Pixel p=olc::WHITE) |
| void | FillTriangle (float x1, float y1, float x2, float y2, float x3, float y3, olc::Pixel p=olc::WHITE) |
| void | FillTriangle (const olc::vf2d &pos1, const olc::vf2d &pos2, const olc::vf2d &pos3, olc::Pixel p=olc::WHITE) |
| void | DrawSprite (float x, float y, olc::Sprite *sprite, float scalex=1, float scaley=1, uint8_t flip=olc::Sprite::NONE) |
| void | DrawSprite (const olc::vf2d &pos, olc::Sprite *sprite, const olc::vf2d &scale={ 1.0f, 1.0f }, uint8_t flip=olc::Sprite::NONE) |
| void | DrawPartialSprite (float x, float y, Sprite *sprite, int32_t ox, int32_t oy, int32_t w, int32_t h, float scalex=1, float scaley=1, uint8_t flip=olc::Sprite::NONE) |
| void | DrawPartialSprite (const olc::vf2d &pos, Sprite *sprite, const olc::vi2d &sourcepos, const olc::vi2d &size, const olc::vf2d &scale={ 1.0f, 1.0f }, uint8_t flip=olc::Sprite::NONE) |
| void | DrawString (float x, float y, const std::string &sText, Pixel col, const olc::vf2d &scale) |
| void | DrawString (const olc::vf2d &pos, const std::string &sText, const Pixel col, const olc::vf2d &scale) |
| void | DrawDecal (const olc::vf2d &pos, olc::Decal *decal, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialDecal (const olc::vf2d &pos, olc::Decal *decal, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialDecal (const olc::vf2d &pos, const olc::vf2d &size, olc::Decal *decal, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE) |
| void | DrawExplicitDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::vf2d *uv, const olc::Pixel *col, uint32_t elements=4) |
| void | DrawWarpedDecal (olc::Decal *decal, const olc::vf2d(&pos)[4], const olc::Pixel &tint=olc::WHITE) |
| void | DrawWarpedDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::Pixel &tint=olc::WHITE) |
| void | DrawWarpedDecal (olc::Decal *decal, const std::array< olc::vf2d, 4 > &pos, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialWarpedDecal (olc::Decal *decal, const olc::vf2d(&pos)[4], const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialWarpedDecal (olc::Decal *decal, const olc::vf2d *pos, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialWarpedDecal (olc::Decal *decal, const std::array< olc::vf2d, 4 > &pos, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::Pixel &tint=olc::WHITE) |
| void | DrawRotatedDecal (const olc::vf2d &pos, olc::Decal *decal, const float fAngle, const olc::vf2d ¢er={ 0.0f, 0.0f }, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE) |
| void | DrawPartialRotatedDecal (const olc::vf2d &pos, olc::Decal *decal, const float fAngle, const olc::vf2d ¢er, const olc::vf2d &source_pos, const olc::vf2d &source_size, const olc::vf2d &scale={ 1.0f, 1.0f }, const olc::Pixel &tint=olc::WHITE) |
| void | DrawStringDecal (const olc::vf2d &pos, const std::string &sText, const olc::Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f }) |
| void | DrawStringPropDecal (const olc::vf2d &pos, const std::string &sText, const olc::Pixel col=olc::WHITE, const olc::vf2d &scale={ 1.0f, 1.0f }) |
| void | FillRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel col=olc::WHITE) |
| void | DrawRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel col=olc::WHITE) |
| void | GradientFillRectDecal (const olc::vf2d &pos, const olc::vf2d &size, const olc::Pixel colTL, const olc::Pixel colBL, const olc::Pixel colBR, const olc::Pixel colTR) |
| void | DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const olc::Pixel tint=olc::WHITE) |
| void | DrawLineDecal (const olc::vf2d &pos1, const olc::vf2d &pos2, Pixel p=olc::WHITE) |
| void | DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const std::vector< olc::Pixel > &tint) |
| void | DrawPolygonDecal (olc::Decal *decal, const std::vector< olc::vf2d > &pos, const std::vector< olc::vf2d > &uv, const std::vector< olc::Pixel > &colours, const olc::Pixel tint) |
Public Member Functions inherited from olc::PGEX | |
| PGEX (bool bHook=false) | |
Protected Attributes | |
| olc::vf2d | m_vWorldOffset = { 0.0f, 0.0f } |
| olc::vf2d | m_vWorldScale = { 1.0f, 1.0f } |
| olc::vf2d | m_vRecipPixel = { 1.0f, 1.0f } |
| olc::vf2d | m_vPixelScale = { 1.0f, 1.0f } |
| bool | m_bPanning = false |
| olc::vf2d | m_vStartPan = { 0.0f, 0.0f } |
| olc::vi2d | m_vViewArea |
| bool | m_bZoomClamp = false |
| olc::vf2d | m_vMaxScale = { 0.0f, 0.0f } |
| olc::vf2d | m_vMinScale = { 0.0f, 0.0f } |
Additional Inherited Members | |
Protected Member Functions inherited from olc::PGEX | |
| virtual void | OnBeforeUserCreate () |
| virtual void | OnAfterUserCreate () |
| virtual bool | OnBeforeUserUpdate (float &fElapsedTime) |
| virtual void | OnAfterUserUpdate (float fElapsedTime) |
Static Protected Attributes inherited from olc::PGEX | |
| static PixelGameEngine * | pge |
|
default |
| bool olc::TransformedView::Draw | ( | const olc::vf2d & | pos, |
| olc::Pixel | p = olc::WHITE ) |
|
virtual |
| void olc::TransformedView::DrawCircle | ( | const olc::vf2d & | pos, |
| float | radius, | ||
| olc::Pixel | p = olc::WHITE, | ||
| uint8_t | mask = 0xFF ) |
| void olc::TransformedView::DrawCircle | ( | float | x, |
| float | y, | ||
| float | radius, | ||
| olc::Pixel | p = olc::WHITE, | ||
| uint8_t | mask = 0xFF ) |
| void olc::TransformedView::DrawDecal | ( | const olc::vf2d & | pos, |
| olc::Decal * | decal, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawExplicitDecal | ( | olc::Decal * | decal, |
| const olc::vf2d * | pos, | ||
| const olc::vf2d * | uv, | ||
| const olc::Pixel * | col, | ||
| uint32_t | elements = 4 ) |
| void olc::TransformedView::DrawLine | ( | const olc::vf2d & | pos1, |
| const olc::vf2d & | pos2, | ||
| olc::Pixel | p = olc::WHITE, | ||
| uint32_t | pattern = 0xFFFFFFFF ) |
| void olc::TransformedView::DrawLine | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| olc::Pixel | p = olc::WHITE, | ||
| uint32_t | pattern = 0xFFFFFFFF ) |
| void olc::TransformedView::DrawLineDecal | ( | const olc::vf2d & | pos1, |
| const olc::vf2d & | pos2, | ||
| Pixel | p = olc::WHITE ) |
| void olc::TransformedView::DrawPartialDecal | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| olc::Decal * | decal, | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPartialDecal | ( | const olc::vf2d & | pos, |
| olc::Decal * | decal, | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPartialRotatedDecal | ( | const olc::vf2d & | pos, |
| olc::Decal * | decal, | ||
| const float | fAngle, | ||
| const olc::vf2d & | center, | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPartialSprite | ( | const olc::vf2d & | pos, |
| Sprite * | sprite, | ||
| const olc::vi2d & | sourcepos, | ||
| const olc::vi2d & | size, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| uint8_t | flip = olc::Sprite::NONE ) |
| void olc::TransformedView::DrawPartialSprite | ( | float | x, |
| float | y, | ||
| Sprite * | sprite, | ||
| int32_t | ox, | ||
| int32_t | oy, | ||
| int32_t | w, | ||
| int32_t | h, | ||
| float | scalex = 1, | ||
| float | scaley = 1, | ||
| uint8_t | flip = olc::Sprite::NONE ) |
| void olc::TransformedView::DrawPartialWarpedDecal | ( | olc::Decal * | decal, |
| const olc::vf2d * | pos, | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPartialWarpedDecal | ( | olc::Decal * | decal, |
| const olc::vf2d(&) | pos[4], | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPartialWarpedDecal | ( | olc::Decal * | decal, |
| const std::array< olc::vf2d, 4 > & | pos, | ||
| const olc::vf2d & | source_pos, | ||
| const olc::vf2d & | source_size, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPolygonDecal | ( | olc::Decal * | decal, |
| const std::vector< olc::vf2d > & | pos, | ||
| const std::vector< olc::vf2d > & | uv, | ||
| const olc::Pixel | tint = olc::WHITE ) |
| void olc::TransformedView::DrawPolygonDecal | ( | olc::Decal * | decal, |
| const std::vector< olc::vf2d > & | pos, | ||
| const std::vector< olc::vf2d > & | uv, | ||
| const std::vector< olc::Pixel > & | colours, | ||
| const olc::Pixel | tint ) |
| void olc::TransformedView::DrawPolygonDecal | ( | olc::Decal * | decal, |
| const std::vector< olc::vf2d > & | pos, | ||
| const std::vector< olc::vf2d > & | uv, | ||
| const std::vector< olc::Pixel > & | tint ) |
| void olc::TransformedView::DrawRect | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::DrawRect | ( | float | x, |
| float | y, | ||
| float | w, | ||
| float | h, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::DrawRectDecal | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| const olc::Pixel | col = olc::WHITE ) |
| void olc::TransformedView::DrawRotatedDecal | ( | const olc::vf2d & | pos, |
| olc::Decal * | decal, | ||
| const float | fAngle, | ||
| const olc::vf2d & | center = { 0.0f, 0.0f }, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawSprite | ( | const olc::vf2d & | pos, |
| olc::Sprite * | sprite, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f }, | ||
| uint8_t | flip = olc::Sprite::NONE ) |
| void olc::TransformedView::DrawSprite | ( | float | x, |
| float | y, | ||
| olc::Sprite * | sprite, | ||
| float | scalex = 1, | ||
| float | scaley = 1, | ||
| uint8_t | flip = olc::Sprite::NONE ) |
| void olc::TransformedView::DrawString | ( | const olc::vf2d & | pos, |
| const std::string & | sText, | ||
| const Pixel | col, | ||
| const olc::vf2d & | scale ) |
| void olc::TransformedView::DrawString | ( | float | x, |
| float | y, | ||
| const std::string & | sText, | ||
| Pixel | col, | ||
| const olc::vf2d & | scale ) |
| void olc::TransformedView::DrawStringDecal | ( | const olc::vf2d & | pos, |
| const std::string & | sText, | ||
| const olc::Pixel | col = olc::WHITE, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f } ) |
| void olc::TransformedView::DrawStringPropDecal | ( | const olc::vf2d & | pos, |
| const std::string & | sText, | ||
| const olc::Pixel | col = olc::WHITE, | ||
| const olc::vf2d & | scale = { 1.0f, 1.0f } ) |
| void olc::TransformedView::DrawTriangle | ( | const olc::vf2d & | pos1, |
| const olc::vf2d & | pos2, | ||
| const olc::vf2d & | pos3, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::DrawTriangle | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::DrawWarpedDecal | ( | olc::Decal * | decal, |
| const olc::vf2d * | pos, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawWarpedDecal | ( | olc::Decal * | decal, |
| const olc::vf2d(&) | pos[4], | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::DrawWarpedDecal | ( | olc::Decal * | decal, |
| const std::array< olc::vf2d, 4 > & | pos, | ||
| const olc::Pixel & | tint = olc::WHITE ) |
| void olc::TransformedView::EnableScaleClamp | ( | const bool | bEnable | ) |
| void olc::TransformedView::EndPan | ( | const olc::vi2d & | vPos | ) |
| void olc::TransformedView::FillCircle | ( | const olc::vf2d & | pos, |
| float | radius, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::FillCircle | ( | float | x, |
| float | y, | ||
| float | radius, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::FillRect | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::FillRect | ( | float | x, |
| float | y, | ||
| float | w, | ||
| float | h, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::FillRectDecal | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| const olc::Pixel | col = olc::WHITE ) |
| void olc::TransformedView::FillTriangle | ( | const olc::vf2d & | pos1, |
| const olc::vf2d & | pos2, | ||
| const olc::vf2d & | pos3, | ||
| olc::Pixel | p = olc::WHITE ) |
| void olc::TransformedView::FillTriangle | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| olc::Pixel | p = olc::WHITE ) |
| olc::PixelGameEngine * olc::TransformedView::GetPGE | ( | ) |
| olc::vf2d olc::TransformedView::GetWorldBR | ( | ) | const |
| const olc::vf2d & olc::TransformedView::GetWorldOffset | ( | ) | const |
| const olc::vf2d & olc::TransformedView::GetWorldScale | ( | ) | const |
| olc::vf2d olc::TransformedView::GetWorldTL | ( | ) | const |
| olc::vf2d olc::TransformedView::GetWorldVisibleArea | ( | ) | const |
| void olc::TransformedView::GradientFillRectDecal | ( | const olc::vf2d & | pos, |
| const olc::vf2d & | size, | ||
| const olc::Pixel | colTL, | ||
| const olc::Pixel | colBL, | ||
| const olc::Pixel | colBR, | ||
| const olc::Pixel | colTR ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
| void olc::TransformedView::MoveWorldOffset | ( | const olc::vf2d & | vDeltaOffset | ) |
| void olc::TransformedView::SetScaleExtents | ( | const olc::vf2d & | vScaleMin, |
| const olc::vf2d & | vScaleMax ) |
| void olc::TransformedView::SetViewArea | ( | const olc::vi2d & | vViewArea | ) |
| void olc::TransformedView::SetWorldOffset | ( | const olc::vf2d & | vOffset | ) |
| void olc::TransformedView::SetWorldScale | ( | const olc::vf2d & | vScale | ) |
| void olc::TransformedView::SetZoom | ( | const float | fZoom, |
| const olc::vf2d & | vPos ) |
| void olc::TransformedView::StartPan | ( | const olc::vi2d & | vPos | ) |
| void olc::TransformedView::UpdatePan | ( | const olc::vi2d & | vPos | ) |
| void olc::TransformedView::ZoomAtScreenPos | ( | const float | fDeltaZoom, |
| const olc::vi2d & | vPos ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |