Recast Navigation
Navigation-mesh Toolset for Games
Loading...
Searching...
No Matches
AppState Struct Reference

#include <AppState.h>

Public Member Functions

void resetCamera ()
 
void updateWindowSize ()
 
void updateUIScale () const
 
void worldToScreen (float x, float y, float z, float *screenX, float *screenY) const
 

Public Attributes

SDL_Window * window
 
SDL_GLContext glContext
 
double projectionMatrix [16]
 
int viewport [4]
 
int width
 
int height
 
int drawableWidth
 
int drawableHeight
 
BuildContext buildContext
 
std::unique_ptr< InputGeominputGeometry
 
std::unique_ptr< Samplesample
 
std::unique_ptr< TestCasetestCase
 
float timeAcc = 0.0f
 
Uint32 prevFrameTime = 0
 
int mousePos [2] {0, 0}
 
int origMousePos [2] {0, 0}
 
float cameraEulers [2] {45, -45}
 
float cameraPos [3] = {0, 0, 0}
 
float camr = 1000
 
float origCameraEulers [2] = {0, 0}
 
float scrollZoom = 0
 
float moveFront = 0.0f
 
float moveBack = 0.0f
 
float moveLeft = 0.0f
 
float moveRight = 0.0f
 
float moveUp = 0.0f
 
float moveDown = 0.0f
 
bool isRotatingCamera = false
 
bool movedDuringRotate = false
 
bool mouseOverMenu = false
 
float rayStart [3]
 
float rayEnd [3]
 
int sampleIndex = -1
 
std::string meshName = "Choose Mesh..."
 
bool showMenu = true
 
bool showLog = false
 
bool showTools = true
 
bool showTestCases = false
 
int logScroll = 0
 
std::vector< std::string > files
 
std::string meshesFolder = "Meshes"
 
std::string testCasesFolder = "TestCases"
 

Member Function Documentation

◆ resetCamera()

void AppState::resetCamera ( )

◆ updateUIScale()

void AppState::updateUIScale ( ) const

◆ updateWindowSize()

void AppState::updateWindowSize ( )

◆ worldToScreen()

void AppState::worldToScreen ( float  x,
float  y,
float  z,
float *  screenX,
float *  screenY 
) const

Member Data Documentation

◆ buildContext

BuildContext AppState::buildContext

◆ cameraEulers

float AppState::cameraEulers[2] {45, -45}

◆ cameraPos

float AppState::cameraPos[3] = {0, 0, 0}

◆ camr

float AppState::camr = 1000

◆ drawableHeight

int AppState::drawableHeight

◆ drawableWidth

int AppState::drawableWidth

◆ files

std::vector<std::string> AppState::files

◆ glContext

SDL_GLContext AppState::glContext

◆ height

int AppState::height

◆ inputGeometry

std::unique_ptr<InputGeom> AppState::inputGeometry

◆ isRotatingCamera

bool AppState::isRotatingCamera = false

◆ logScroll

int AppState::logScroll = 0

◆ meshesFolder

std::string AppState::meshesFolder = "Meshes"

◆ meshName

std::string AppState::meshName = "Choose Mesh..."

◆ mouseOverMenu

bool AppState::mouseOverMenu = false

◆ mousePos

int AppState::mousePos[2] {0, 0}

◆ moveBack

float AppState::moveBack = 0.0f

◆ movedDuringRotate

bool AppState::movedDuringRotate = false

◆ moveDown

float AppState::moveDown = 0.0f

◆ moveFront

float AppState::moveFront = 0.0f

◆ moveLeft

float AppState::moveLeft = 0.0f

◆ moveRight

float AppState::moveRight = 0.0f

◆ moveUp

float AppState::moveUp = 0.0f

◆ origCameraEulers

float AppState::origCameraEulers[2] = {0, 0}

◆ origMousePos

int AppState::origMousePos[2] {0, 0}

◆ prevFrameTime

Uint32 AppState::prevFrameTime = 0

◆ projectionMatrix

double AppState::projectionMatrix[16]

◆ rayEnd

float AppState::rayEnd[3]

◆ rayStart

float AppState::rayStart[3]

◆ sample

std::unique_ptr<Sample> AppState::sample

◆ sampleIndex

int AppState::sampleIndex = -1

◆ scrollZoom

float AppState::scrollZoom = 0

◆ showLog

bool AppState::showLog = false

◆ showMenu

bool AppState::showMenu = true

◆ showTestCases

bool AppState::showTestCases = false

◆ showTools

bool AppState::showTools = true

◆ testCase

std::unique_ptr<TestCase> AppState::testCase

◆ testCasesFolder

std::string AppState::testCasesFolder = "TestCases"

◆ timeAcc

float AppState::timeAcc = 0.0f

◆ viewport

int AppState::viewport[4]

◆ width

int AppState::width

◆ window

SDL_Window* AppState::window

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