GCP Assignment 1
Public Member Functions | Private Attributes | List of all members
MainStateUI Class Reference

A UI for the MainState using my old PGG2 UI classes. More...

#include <MainStateUI.h>

Inheritance diagram for MainStateUI:
Inheritance graph
Collaboration diagram for MainStateUI:
Collaboration graph

Public Member Functions

 MainStateUI (std::unordered_map< std::string, Shader *> &shaders)
 Constructs the MainStateUI. More...
 
 ~MainStateUI ()
 Destructs the MainStateUI object. More...
 
void update (float dt)
 A function to update the MainStateUI. More...
 
void draw ()
 A function to draw to the screen. More...
 
void drawLoading ()
 A function to draw to the loading text to the screen. More...
 
void drawPerformance ()
 A function to draw to the performance text to the screen. More...
 
void updateTime (float time)
 A function to update the time text. More...
 
void updateAxis (char axis)
 A function to update the axis. More...
 
void updateMethod (char method)
 A function to update the method. More...
 
void updateNumberOfRotations (int rotations)
 A function to update the number of rotations. More...
 
void updateMemory (int memory)
 A function to update the memory text. More...
 
char getAxis ()
 A function to get the current axis. More...
 
int getRotations ()
 A function to get the current number of rotations. More...
 
char getMethod ()
 A function to get the current method. More...
 
void setHelp (bool state)
 A function to set the help state. More...
 
bool getHelp ()
 A function to get the current help state. More...
 
- Public Member Functions inherited from UI
 UI (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders)
 Constructs the UI object. More...
 
 UI (std::unordered_map< std::string, Shader *> &shaders)
 Constructs the UI object. More...
 
 ~UI ()
 Destructs the UI object. More...
 

Private Attributes

UIObjectbackground
 The Title Image. More...
 
UIObjecthelp
 The help image. More...
 
UIObjectaxisText
 Info Text. More...
 
UIObjectnumberOfRotationsText
 
UIObjectrotationMethodText
 
UIObjectmatrixText
 
UIObjectquatText
 
UIObjectxText
 
UIObjectyText
 
UIObjectzText
 
UIObjectset10Text
 
UIObjectset100Text
 
UIObjectset1000Text
 
UIObjectset10000Text
 
UIObjecthelpText
 
UIObjecttimeText
 The performance texts. More...
 
UIObjectmemoryText
 
UIObjectloadingText
 The loading text. More...
 
UIObjectperformanceText
 
char axis
 the current axis More...
 
int rotations
 
char method
 
bool helpState
 if the help should be displayed More...
 

Additional Inherited Members

- Protected Member Functions inherited from UI
void initialiseShaders (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders)
 Initialise the shaders. More...
 
- Protected Attributes inherited from UI
Shadershader
 The shader for the UI. More...
 

Detailed Description

A UI for the MainState using my old PGG2 UI classes.

Constructor & Destructor Documentation

◆ MainStateUI()

MainStateUI::MainStateUI ( std::unordered_map< std::string, Shader *> &  shaders)

Constructs the MainStateUI.

Parameters
shadersA reference to the loaded Shader files
Here is the call graph for this function:

◆ ~MainStateUI()

MainStateUI::~MainStateUI ( )

Destructs the MainStateUI object.

Member Function Documentation

◆ draw()

void MainStateUI::draw ( )
virtual

A function to draw to the screen.

Implements UI.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLoading()

void MainStateUI::drawLoading ( )
inline

A function to draw to the loading text to the screen.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPerformance()

void MainStateUI::drawPerformance ( )
inline

A function to draw to the performance text to the screen.

Here is the call graph for this function:

◆ getAxis()

char MainStateUI::getAxis ( )
inline

A function to get the current axis.

Returns
The current axis.
Here is the caller graph for this function:

◆ getHelp()

bool MainStateUI::getHelp ( )
inline

A function to get the current help state.

Returns
The current help state.
Here is the caller graph for this function:

◆ getMethod()

char MainStateUI::getMethod ( )
inline

A function to get the current method.

Returns
The current method.
Here is the caller graph for this function:

◆ getRotations()

int MainStateUI::getRotations ( )
inline

A function to get the current number of rotations.

Returns
The current number of rotations.
Here is the caller graph for this function:

◆ setHelp()

void MainStateUI::setHelp ( bool  state)
inline

A function to set the help state.

Parameters
stateThe state of help.
Here is the caller graph for this function:

◆ update()

void MainStateUI::update ( float  dt)
virtual

A function to update the MainStateUI.

Parameters
dtThe delta time.

Implements UI.

◆ updateAxis()

void MainStateUI::updateAxis ( char  axis)

A function to update the axis.

Parameters
axisThe axis to switch to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMemory()

void MainStateUI::updateMemory ( int  memory)

A function to update the memory text.

Parameters
memoryThe memory to update the text to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMethod()

void MainStateUI::updateMethod ( char  method)

A function to update the method.

Parameters
methodThe method to switch to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNumberOfRotations()

void MainStateUI::updateNumberOfRotations ( int  rotations)

A function to update the number of rotations.

Parameters
rotationsThe number of rotations to switch to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTime()

void MainStateUI::updateTime ( float  time)

A function to update the time text.

Parameters
timeThe time to update the text to.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ axis

char MainStateUI::axis
private

the current axis

◆ axisText

UIObject* MainStateUI::axisText
private

Info Text.

◆ background

UIObject* MainStateUI::background
private

The Title Image.

◆ help

UIObject* MainStateUI::help
private

The help image.

◆ helpState

bool MainStateUI::helpState
private

if the help should be displayed

◆ helpText

UIObject* MainStateUI::helpText
private

◆ loadingText

UIObject* MainStateUI::loadingText
private

The loading text.

◆ matrixText

UIObject* MainStateUI::matrixText
private

◆ memoryText

UIObject* MainStateUI::memoryText
private

◆ method

char MainStateUI::method
private

◆ numberOfRotationsText

UIObject* MainStateUI::numberOfRotationsText
private

◆ performanceText

UIObject* MainStateUI::performanceText
private

◆ quatText

UIObject* MainStateUI::quatText
private

◆ rotationMethodText

UIObject* MainStateUI::rotationMethodText
private

◆ rotations

int MainStateUI::rotations
private

◆ set10000Text

UIObject* MainStateUI::set10000Text
private

◆ set1000Text

UIObject* MainStateUI::set1000Text
private

◆ set100Text

UIObject* MainStateUI::set100Text
private

◆ set10Text

UIObject* MainStateUI::set10Text
private

◆ timeText

UIObject* MainStateUI::timeText
private

The performance texts.

◆ xText

UIObject* MainStateUI::xText
private

◆ yText

UIObject* MainStateUI::yText
private

◆ zText

UIObject* MainStateUI::zText
private

The documentation for this class was generated from the following files: