MochiEngine
Loading...
Searching...
No Matches
Mochi::Graphics::Camera Class Reference

The Camera class allows conversion between a engine-defined world space and screen space. This class doesn't do any special process with the renderer, it just transforms positions of points and rects between world and screen. More...

#include <Camera.h>

Public Member Functions

 Camera (Vector2f startingPosition, float startingZoom, Vector2f logicalPresentation)
void SetPosition (const float &x, const float &y)
void SetPosition (const Vector2f &point)
void SetZoom (const float &zoom)
Vector2f GetPosition () const
float GetZoom () const
void Move (const float &horizontal, const float &vertical)
Rectf WorldToScreen (const Rectf &dstRect) const
Rectf ScreenToWorld (const Rectf &dstRect) const
Vector2f WorldToScreen (const Vector2f &position) const
Vector2f ScreenToWorld (const Vector2f &position) const
bool IsOnScreen (const Rectf &dstRect) const
Vector2f GetLogicalPresentation () const

Detailed Description

The Camera class allows conversion between a engine-defined world space and screen space. This class doesn't do any special process with the renderer, it just transforms positions of points and rects between world and screen.


The documentation for this class was generated from the following files:
  • Engine/src/Graphics/Camera.h
  • Engine/src/Graphics/Camera.cpp