MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / Perspective

Method Perspective

extensions/olcPGEX_Graphics2D.h:259–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257 }
258
259 void olc::GFX2D::Transform2D::Perspective(float ox, float oy)
260 {
261 // Construct Translate Matrix
262 matrix[2][0][0] = 1.0f; matrix[2][1][0] = 0.0f; matrix[2][2][0] = 0.0f;
263 matrix[2][0][1] = 0.0f; matrix[2][1][1] = 1.0f; matrix[2][2][1] = 0.0f;
264 matrix[2][0][2] = ox; matrix[2][1][2] = oy; matrix[2][2][2] = 1.0f;
265 Multiply();
266 }
267
268 void olc::GFX2D::Transform2D::Forward(float in_x, float in_y, float &out_x, float &out_y)
269 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected