#include <cglm/types.h>
Go to the source code of this file.
|
| void | CenterCameraAt (float worldspaceX, float worldspaceY, struct Transform2D *pCam, int winWidth, int winHeight) |
| |
| void | GetViewportWorldspaceTLBR (vec2 outTL, vec2 outBR, struct Transform2D *pCam, int windowW, int windowH) |
| |
| void | GetCamWorldspaceCenter (struct Transform2D *pCam, int winWidth, int winHeight, vec2 outCenter) |
| |
| void | GetWorldspacePos (int screenPosX, int screenPosY, int screenW, int screenH, struct Transform2D *pCam, vec2 outWorldspace) |
| |
| void | ScreenSpaceToWorldSpaceTransVector (vec2 screenSpaceTranslateVector, int screenW, int screenH, struct Transform2D *pCam, vec2 outWorldspace) |
| |
| void | ClampCameraToTileLayer (struct GameLayer2DData *pGameLayerData, int tileLayerNum) |
| | Make it so no matter where move the camera nothing outside the layer is visible. If the layer is smaller than the camera bounds the camera position is fixed in the centre.
|
| |
| void | UpdateCameraClamp (struct GameLayer2DData *pGameLayerData) |
| | Update the camera position to be clamped, if a clamp is set.
|
| |
◆ CenterCameraAt()
| void CenterCameraAt |
( |
float |
worldspaceX, |
|
|
float |
worldspaceY, |
|
|
struct Transform2D * |
pCam, |
|
|
int |
winWidth, |
|
|
int |
winHeight |
|
) |
| |
◆ ClampCameraToTileLayer()
| void ClampCameraToTileLayer |
( |
struct GameLayer2DData * |
pGameLayerData, |
|
|
int |
tileLayerNum |
|
) |
| |
Make it so no matter where move the camera nothing outside the layer is visible. If the layer is smaller than the camera bounds the camera position is fixed in the centre.
◆ GetCamWorldspaceCenter()
| void GetCamWorldspaceCenter |
( |
struct Transform2D * |
pCam, |
|
|
int |
winWidth, |
|
|
int |
winHeight, |
|
|
vec2 |
outCenter |
|
) |
| |
◆ GetViewportWorldspaceTLBR()
| void GetViewportWorldspaceTLBR |
( |
vec2 |
outTL, |
|
|
vec2 |
outBR, |
|
|
struct Transform2D * |
pCam, |
|
|
int |
windowW, |
|
|
int |
windowH |
|
) |
| |
◆ GetWorldspacePos()
| void GetWorldspacePos |
( |
int |
screenPosX, |
|
|
int |
screenPosY, |
|
|
int |
screenW, |
|
|
int |
screenH, |
|
|
struct Transform2D * |
pCam, |
|
|
vec2 |
outWorldspace |
|
) |
| |
◆ ScreenSpaceToWorldSpaceTransVector()
| void ScreenSpaceToWorldSpaceTransVector |
( |
vec2 |
screenSpaceTranslateVector, |
|
|
int |
screenW, |
|
|
int |
screenH, |
|
|
struct Transform2D * |
pCam, |
|
|
vec2 |
outWorldspace |
|
) |
| |
◆ UpdateCameraClamp()
Update the camera position to be clamped, if a clamp is set.