5 #include <unordered_map> 9 #include "../PGGAssignment2Code/StateManager.h" 10 #include "../PGGAssignment2Code/Camera.h" 11 #include "../PGGAssignment2Code/State.h" 12 #include "../Core/Logging.h" 13 #include "../Core/PerformanceTest.h" 14 #include "../Maths/Vec2.h" 15 #include "../Maths/Vec4.h" 16 #include "../Maths/Mat4.h" 17 #include "../Maths/Quaternion.h" 18 #include "../Maths/Convert.h" 62 std::unordered_map<std::string, Object*>
objects;
65 std::unordered_map<std::string, Shader*>
shaders;
75 std::vector<Maths::Quaternion>
quats;
Sam * sam
The 3D model.
Definition: MainState.h:69
The main state of the program.
Definition: MainState.h:25
void draw()
A function to draw to the screen.
Definition: MainState.cpp:132
void loadingScreen()
Draws a LoadingScreen.
Definition: MainState.cpp:144
void yAxisQuatRotationTest()
Runs the quat performance test of the Y axis.
Definition: MainState.cpp:375
Creates a State object to be inherited.
Definition: State.h:15
void yAxisMatRotationTest()
Runs the matrix performance test of the Y axis.
Definition: MainState.cpp:338
A UI for the MainState using my old PGG2 UI classes.
Definition: MainStateUI.h:17
std::vector< Maths::Quaternion > quats
The array of quaternion's to use.
Definition: MainState.h:75
void update(float dt)
A function to update the MainState.
Definition: MainState.cpp:128
void memoryTest()
Runs the memory test.
Definition: MainState.cpp:310
std::unordered_map< std::string, Object * > objects
Definition: MainState.h:62
void init100MatQuats()
Initialise 100 sets of matrixs and quats.
Definition: MainState.cpp:179
Creates a StateManager object.
Definition: StateManager.h:13
MainState(StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight)
Constructs a MainState.
Definition: MainState.cpp:3
StateManager * stateManager
A pointer to the state manager.
Definition: State.h:57
Creates a Camera object.
Definition: Camera.h:14
Core::PerformanceTest * tester
The performance tester.
Definition: MainState.h:77
std::vector< Maths::Mat4 > matrix
The array of matrix's to use.
Definition: MainState.h:73
~MainState()
Destructs a MainState object.
Definition: MainState.cpp:32
SDL_Window * window
The window to display to.
Definition: State.h:59
void zAxisMatRotationTest()
Runs the matrix performance test of the Z axis.
Definition: MainState.cpp:350
void xAxisQuatRotationTest()
Runs the quat performance test of the X axis.
Definition: MainState.cpp:362
bool input()
Handles the MainState input.
Definition: MainState.cpp:49
std::unordered_map< std::string, Shader * > shaders
Definition: MainState.h:65
MainStateUI * userInterface
The MainStateUI.
Definition: MainState.h:67
int screenHeight
The height of the screen.
Definition: State.h:63
void performanceTest()
Runs the performance test.
Definition: MainState.cpp:266
void xAxisMatRotationTest()
Runs the matrix performance test of the X axis.
Definition: MainState.cpp:326
void init10MatQuats()
Initialise 10 sets of matrixs and quats.
Definition: MainState.cpp:158
int screenWidth
The width of the screen.
Definition: State.h:61
void zAxisQuatRotationTest()
Runs the quat performance test of the Z axis.
Definition: MainState.cpp:387
void init10000MatQuats()
Initialise 10000 sets of matrixs and quats.
Definition: MainState.cpp:236
A class that handles the sam objects.
Definition: Sam.h:13
void init1000MatQuats()
Initialise 1000 sets of matrixs and quats.
Definition: MainState.cpp:206
Camera * camera
The Camera for the program.
Definition: MainState.h:71