#include <simulator.h>
|
enum class | ThemeTypes { LightTheme
, DarkTheme
} |
|
bool | isSetUp = false |
|
std::string | m_sceneName |
|
static ThemeTypes | currentTheme = ThemeTypes::LightTheme |
|
static const std::array< std::string, 2 > | themePaths = {"lightTheme", "darkTheme"} |
|
static const std::array< Color, 2 > | backgroundColors {{{239, 239, 239, 255}, {5, 11, 30, 255}}} |
|
◆ SimulatorState
Enumerator |
---|
Setup | |
Simulation | |
◆ SLECTED_TRAITS_MONITOR
◆ Simulator()
ss::pl::simulator::Simulator::Simulator |
( |
std::string |
sceneName, |
|
|
SceneManager & |
sceneManager |
|
) |
| |
Constructor for the Simulation class.
- Parameters
-
sceneName | The name of the current scene. Which here is "Simulation". |
sceneManager | A reference to already existing SceneManager object to control the program flow. |
◆ animateProgress()
float ss::pl::simulator::Simulator::animateProgress |
( |
| ) |
|
|
private |
Method for animating the progress bar at the bottom of simuation.
- Returns
- current progress bar's position along the X axis.
◆ checkInput()
void ss::pl::simulator::Simulator::checkInput |
( |
| ) |
|
|
private |
This method creates checks for the mouse input during the actual simulation.
Used to determine and act on mouse clicks.
◆ deleteAssets()
void ss::pl::simulator::Simulator::deleteAssets |
( |
| ) |
|
|
virtual |
Method for deallocating the dynamically created assets.
Implements Scene.
◆ drawAdditionalMenu()
void ss::pl::simulator::Simulator::drawAdditionalMenu |
( |
| ) |
|
|
private |
Method for drawing controls menu at simulation runtime.
◆ drawEntity()
Method for drawing every entity at the simulation field.
- Parameters
-
entity | Reference to the entity that should be drawn. |
◆ drawEntityThoughts()
Function that draws the thoughts of a desired entity.
- Parameters
-
entity | Reference to the desired entity |
◆ drawFood()
void ss::pl::simulator::Simulator::drawFood |
( |
const auto & |
food | ) |
|
|
private |
Method for drawing every food on the simulation field.
- Parameters
-
food | Reference to the food that should be drawn. |
◆ drawProgressBar()
void ss::pl::simulator::Simulator::drawProgressBar |
( |
| ) |
|
|
private |
Method for drawing the progress bar at the bottom of simuation.
◆ drawSetup()
void ss::pl::simulator::Simulator::drawSetup |
( |
| ) |
|
|
private |
Method for drawing the setUp page before the actual simulation.
◆ drawSimulation()
void ss::pl::simulator::Simulator::drawSimulation |
( |
| ) |
|
|
private |
Method for drawing the actual simulation.
◆ drawSummary()
void ss::pl::simulator::Simulator::drawSummary |
( |
| ) |
|
|
private |
Method for drawing summary screen at the end of the simulation.
◆ drawTraitsSwitch()
void ss::pl::simulator::Simulator::drawTraitsSwitch |
( |
| ) |
|
|
private |
Function to draw the switch in the additionals menu.
◆ getSummaryData()
Method for getting the data for summary screen.
- Returns
- Data for summary screen.
◆ handleEntityClick()
void ss::pl::simulator::Simulator::handleEntityClick |
( |
| ) |
|
|
private |
Method for handling the camera and collision for clickig on entity.
◆ loadAssets()
void ss::pl::simulator::Simulator::loadAssets |
( |
| ) |
|
|
virtual |
Method for loading all the needed assets in the Simulation page.
Implements Scene.
◆ onExit()
void ss::pl::simulator::Simulator::onExit |
( |
| ) |
|
|
virtual |
Method which is called when we exit the program or the Simulation page.
It deallocates every dynamically created object in the class' instance.
Implements Scene.
◆ resetCamera()
void ss::pl::simulator::Simulator::resetCamera |
( |
| ) |
|
|
private |
Method for reseting the camera to its initial position.
◆ Start()
void ss::pl::simulator::Simulator::Start |
( |
| ) |
|
|
virtual |
Method which is called in the start of the Simulation page.
Used to set up variables, needed throughout the simulation.
Implements Scene.
◆ Update()
void ss::pl::simulator::Simulator::Update |
( |
| ) |
|
|
virtual |
Method which is called every frame.
Main functionallity of the simulator is located here.
Implements Scene.
◆ additionalMenuTriggered
bool ss::pl::simulator::Simulator::additionalMenuTriggered |
|
private |
◆ aminationProgress
float ss::pl::simulator::Simulator::aminationProgress |
|
private |
◆ backArrow_Texture
Texture2D ss::pl::simulator::Simulator::backArrow_Texture |
|
private |
◆ camera
Camera3D ss::pl::simulator::Simulator::camera {0} |
|
private |
◆ catchSummaryInfo
bool ss::pl::simulator::Simulator::catchSummaryInfo |
|
private |
◆ checkmark
Texture2D ss::pl::simulator::Simulator::checkmark |
|
private |
◆ currentState
◆ cyclesCount
size_t ss::pl::simulator::Simulator::cyclesCount |
|
private |
◆ dropDown_Arrow
Texture2D ss::pl::simulator::Simulator::dropDown_Arrow |
|
private |
◆ dropDown_Arrow_Selected
Texture2D ss::pl::simulator::Simulator::dropDown_Arrow_Selected |
|
private |
◆ entities
size_t ss::pl::simulator::Simulator::entities |
|
private |
◆ entityCamera
Camera3D ss::pl::simulator::Simulator::entityCamera {0} |
|
private |
◆ entityGoingHome
Texture2D ss::pl::simulator::Simulator::entityGoingHome |
|
private |
◆ entityGoingTowardsFood
Texture2D ss::pl::simulator::Simulator::entityGoingTowardsFood |
|
private |
◆ entityLookingDirRadian
float ss::pl::simulator::Simulator::entityLookingDirRadian |
|
private |
◆ entitySearchingFood
Texture2D ss::pl::simulator::Simulator::entitySearchingFood |
|
private |
◆ entityShouldBreed
Texture2D ss::pl::simulator::Simulator::entityShouldBreed |
|
private |
◆ entityThoughts
const std::array<std::string, 4> ss::pl::simulator::Simulator::entityThoughts = {"SearchingFood", "GoingFood", "GoingHome", "Idle"} |
|
private |
◆ exit_Button
Texture2D ss::pl::simulator::Simulator::exit_Button |
|
private |
◆ followingEntity
bool ss::pl::simulator::Simulator::followingEntity |
|
private |
◆ fontInter
Font ss::pl::simulator::Simulator::fontInter |
|
private |
◆ food
size_t ss::pl::simulator::Simulator::food |
|
private |
◆ foodChange
int ss::pl::simulator::Simulator::foodChange |
|
private |
◆ graphsContainerPos
float ss::pl::simulator::Simulator::graphsContainerPos |
|
private |
◆ m_sceneManager
◆ mousePos
Vector2 ss::pl::simulator::Simulator::mousePos |
|
private |
◆ newFoodChange
int ss::pl::simulator::Simulator::newFoodChange |
|
private |
◆ offset
float ss::pl::simulator::Simulator::offset |
|
private |
◆ planePos
Vector2 ss::pl::simulator::Simulator::planePos |
|
private |
◆ save_Data_Button
Texture2D ss::pl::simulator::Simulator::save_Data_Button |
|
private |
◆ savedSimulationInfo
bool ss::pl::simulator::Simulator::savedSimulationInfo |
|
private |
◆ selectedEntity
◆ selectedEntityId
size_t ss::pl::simulator::Simulator::selectedEntityId |
|
private |
◆ selectedTraitsMonitor
◆ setupContainer_Texture
Texture2D ss::pl::simulator::Simulator::setupContainer_Texture |
|
private |
◆ shouldShowProgressBar
bool ss::pl::simulator::Simulator::shouldShowProgressBar |
|
private |
◆ shouldShowTraits
bool ss::pl::simulator::Simulator::shouldShowTraits |
|
private |
◆ simulateButton_Texture
Texture2D ss::pl::simulator::Simulator::simulateButton_Texture |
|
private |
◆ simulating
bool ss::pl::simulator::Simulator::simulating |
|
private |
◆ simulation
◆ summary_Container
Texture2D ss::pl::simulator::Simulator::summary_Container |
|
private |
◆ summaryInfo
◆ timeScale
float ss::pl::simulator::Simulator::timeScale |
|
private |
◆ worldSize
size_t ss::pl::simulator::Simulator::worldSize |
|
private |
The documentation for this class was generated from the following files: