World class reference


Class responsible for setting the space and camera in the window.

Functions documentation

Default constructor.


World(Dimension<size_t> boundary);

Constructor with space field size setting.


World(const World & copy);

Copy constructor.


virtual ~World();

Destructor.


const WorldMatrices& GetGuiMatrices() const;

Allows access to the world matrices.


const float GetRatio() const;

Returns the ratio of space field.


void Resize(Dimension<size_t> boundary);

Allows you to change the size of the space.


void SetGuiSpacePosition(Point<int> newPosition);

Sets the GUI camera in the selected location.


void ChangeGuiSpacePosition(Point<int> positionChange);

Changes the GUI location of the camera.


float CalculateRatio();

Calculates the ratio of space. Used when resizing window.


void UpdateProjectionMatrix(ContextType contextType);

Updates the projection matrix. Used when resizing window.


void UpdateViewMatrix(ContextType contextType);

Updates the view matrix. Used when resizing window or changing space position.


Variables documentation

WorldMatrices m_GuiMatrices;

Stores matrices and vectors for the GUI space.


WorldCameraProps m_GuiCamProps;

Stores camera settings for the GUI space.


Dimension<size_t> m_Boundary;

Space dimensions.


float m_fRatio;

Ratio value of space dimensions.