PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::GlfwRenderWindow Class Reference

#include <GlfwRenderWindow.h>

Inheritance diagram for dyno::GlfwRenderWindow:
Collaboration diagram for dyno::GlfwRenderWindow:

Public Member Functions

 GlfwRenderWindow (int argc=0, char **argv=NULL)
 
 ~GlfwRenderWindow ()
 
void initialize (int width, int height) override
 
void mainLoop () override
 
const std::string & name () const
 
void setWindowTitle (const std::string &title)
 
void setCursorPos (double x, double y)
 
double getCursorPosX ()
 
double getCursorPosY ()
 
void setButtonType (uint button)
 
void setButtonMode (uint mode)
 
void setButtonAction (uint action)
 
void setButtonState (ButtonState state)
 
uint getButtonType () const
 
uint getButtonMode ()
 
uint getButtonAction () const
 
ButtonState getButtonState () const
 
void turnOnVSync ()
 
void turnOffVSync ()
 
void toggleAnimation ()
 
int getWidth ()
 
int getHeight ()
 
void initializeStyle ()
 
ImWindowimWindow ()
 
- Public Member Functions inherited from dyno::RenderWindow
 RenderWindow ()
 
virtual std::shared_ptr< RenderEnginegetRenderEngine ()
 
virtual void setRenderEngine (std::shared_ptr< RenderEngine > engine)
 
virtual std::shared_ptr< CameragetCamera ()
 
virtual void setCamera (std::shared_ptr< Camera > camera)
 
RenderParamsgetRenderParams ()
 
void setRenderParams (const RenderParams &rparams)
 
virtual void setWindowSize (int w, int h)
 
SelectionMode getSelectionMode ()
 
void setSelectionMode (SelectionMode mode)
 
void toggleImGUI ()
 
bool showImGUI ()
 
bool & isScreenRecordingOn ()
 
int & screenRecordingInterval ()
 
void setScreenRecordingPath (std::string path)
 
void saveScreen (unsigned int frame)
 
void setMainLightDirection (glm::vec3 dir)
 
virtual const Selectionselect (int x, int y, int w, int h)
 
virtual void select (std::shared_ptr< Node > node, int instance=-1, int primitive=-1)
 
virtual std::shared_ptr< NodegetCurrentSelectedNode ()
 

Protected Member Functions

void initCallbacks ()
 
void drawScene (void)
 
void onSaveScreen (const std::string &filename) override
 
- Protected Member Functions inherited from dyno::RenderWindow
virtual void onSelected (const Selection &s)
 

Static Protected Member Functions

static void mouseButtonCallback (GLFWwindow *window, int button, int action, int mods)
 
static void keyboardCallback (GLFWwindow *window, int key, int scancode, int action, int mods)
 
static void reshapeCallback (GLFWwindow *window, int w, int h)
 
static void cursorPosCallback (GLFWwindow *window, double x, double y)
 
static void cursorEnterCallback (GLFWwindow *window, int entered)
 
static void scrollCallback (GLFWwindow *window, double offsetX, double OffsetY)
 

Private Attributes

void(* mMouseButtonFunc )(GLFWwindow *window, int button, int action, int mods)
 
void(* mKeyboardFunc )(GLFWwindow *window, int key, int scancode, int action, int mods)
 
void(* mReshapeFunc )(GLFWwindow *window, int w, int h)
 
void(* mCursorPosFunc )(GLFWwindow *window, double x, double y)
 
void(* mCursorEnterFunc )(GLFWwindow *window, int entered)
 
void(* mScrollFunc )(GLFWwindow *window, double offsetX, double OffsetY)
 
GLFWwindow * mWindow = nullptr
 
uint mButtonType
 
uint mButtonMode
 
uint mButtonAction
 
ButtonState mButtonState
 
int mPlaneSize = 4
 
double mCursorPosX
 
double mCursorPosY
 
bool mAnimationToggle = false
 
bool mBackgroundToggle = true
 
bool mBoundingboxToggle = false
 
double mCursorTempX = -1.0
 
std::string mWindowTitle
 
ImWindow mImWindow
 

Additional Inherited Members

- Public Types inherited from dyno::RenderWindow
enum  SelectionMode { OBJECT_MODE , PRIMITIVE_MODE }
 
- Protected Attributes inherited from dyno::RenderWindow
std::shared_ptr< RenderEnginemRenderEngine
 
RenderParams mRenderParams
 
std::shared_ptr< CameramCamera
 
Selection selectedObject
 
SelectionMode mSelectionMode = SelectionMode::OBJECT_MODE
 
bool mShowImWindow = true
 
bool mSaveScreenToggle = false
 
int mSaveScreenInterval = 1
 
std::string mScreenRecordingPath
 

Detailed Description

Definition at line 21 of file GlfwRenderWindow.h.

Constructor & Destructor Documentation

◆ GlfwRenderWindow()

dyno::GlfwRenderWindow::GlfwRenderWindow ( int argc = 0,
char ** argv = NULL )

Definition at line 57 of file GlfwRenderWindow.cpp.

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

◆ ~GlfwRenderWindow()

dyno::GlfwRenderWindow::~GlfwRenderWindow ( )

Definition at line 66 of file GlfwRenderWindow.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ cursorEnterCallback()

void dyno::GlfwRenderWindow::cursorEnterCallback ( GLFWwindow * window,
int entered )
staticprotected

Definition at line 513 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ cursorPosCallback()

void dyno::GlfwRenderWindow::cursorPosCallback ( GLFWwindow * window,
double x,
double y )
staticprotected

Definition at line 466 of file GlfwRenderWindow.cpp.

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

◆ drawScene()

void dyno::GlfwRenderWindow::drawScene ( void )
protected

Definition at line 365 of file GlfwRenderWindow.cpp.

◆ getButtonAction()

uint dyno::GlfwRenderWindow::getButtonAction ( ) const
inline

Definition at line 46 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ getButtonMode()

uint dyno::GlfwRenderWindow::getButtonMode ( )
inline

Definition at line 45 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ getButtonState()

ButtonState dyno::GlfwRenderWindow::getButtonState ( ) const
inline

Definition at line 47 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ getButtonType()

uint dyno::GlfwRenderWindow::getButtonType ( ) const
inline

Definition at line 44 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ getCursorPosX()

double dyno::GlfwRenderWindow::getCursorPosX ( )

Definition at line 294 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ getCursorPosY()

double dyno::GlfwRenderWindow::getCursorPosY ( )

Definition at line 299 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ getHeight()

int dyno::GlfwRenderWindow::getHeight ( )

Definition at line 342 of file GlfwRenderWindow.cpp.

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

◆ getWidth()

int dyno::GlfwRenderWindow::getWidth ( )

Definition at line 337 of file GlfwRenderWindow.cpp.

Here is the call graph for this function:

◆ imWindow()

ImWindow * dyno::GlfwRenderWindow::imWindow ( )
inline

Definition at line 61 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ initCallbacks()

void dyno::GlfwRenderWindow::initCallbacks ( )
protected

Definition at line 347 of file GlfwRenderWindow.cpp.

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

◆ initialize()

void dyno::GlfwRenderWindow::initialize ( int width,
int height )
overridevirtual

Reimplemented from dyno::RenderWindow.

Definition at line 77 of file GlfwRenderWindow.cpp.

Here is the call graph for this function:

◆ initializeStyle()

void dyno::GlfwRenderWindow::initializeStyle ( )

Definition at line 183 of file GlfwRenderWindow.cpp.

◆ keyboardCallback()

void dyno::GlfwRenderWindow::keyboardCallback ( GLFWwindow * window,
int key,
int scancode,
int action,
int mods )
staticprotected

Definition at line 542 of file GlfwRenderWindow.cpp.

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

◆ mainLoop()

void dyno::GlfwRenderWindow::mainLoop ( )
overridevirtual

Reimplemented from dyno::RenderWindow.

Definition at line 192 of file GlfwRenderWindow.cpp.

Here is the call graph for this function:

◆ mouseButtonCallback()

void dyno::GlfwRenderWindow::mouseButtonCallback ( GLFWwindow * window,
int button,
int action,
int mods )
staticprotected

Definition at line 370 of file GlfwRenderWindow.cpp.

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

◆ name()

const std::string & dyno::GlfwRenderWindow::name ( ) const

Definition at line 278 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ onSaveScreen()

void dyno::GlfwRenderWindow::onSaveScreen ( const std::string & filename)
overrideprotectedvirtual

Reimplemented from dyno::RenderWindow.

Definition at line 304 of file GlfwRenderWindow.cpp.

Here is the call graph for this function:

◆ reshapeCallback()

void dyno::GlfwRenderWindow::reshapeCallback ( GLFWwindow * window,
int w,
int h )
staticprotected

Definition at line 589 of file GlfwRenderWindow.cpp.

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

◆ scrollCallback()

void dyno::GlfwRenderWindow::scrollCallback ( GLFWwindow * window,
double offsetX,
double OffsetY )
staticprotected

Definition at line 525 of file GlfwRenderWindow.cpp.

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

◆ setButtonAction()

void dyno::GlfwRenderWindow::setButtonAction ( uint action)
inline

Definition at line 41 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ setButtonMode()

void dyno::GlfwRenderWindow::setButtonMode ( uint mode)
inline

Definition at line 40 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ setButtonState()

void dyno::GlfwRenderWindow::setButtonState ( ButtonState state)
inline

Definition at line 42 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ setButtonType()

void dyno::GlfwRenderWindow::setButtonType ( uint button)
inline

Definition at line 39 of file GlfwRenderWindow.h.

Here is the caller graph for this function:

◆ setCursorPos()

void dyno::GlfwRenderWindow::setCursorPos ( double x,
double y )

Definition at line 288 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ setWindowTitle()

void dyno::GlfwRenderWindow::setWindowTitle ( const std::string & title)

Definition at line 283 of file GlfwRenderWindow.cpp.

◆ toggleAnimation()

void dyno::GlfwRenderWindow::toggleAnimation ( )

Definition at line 332 of file GlfwRenderWindow.cpp.

Here is the caller graph for this function:

◆ turnOffVSync()

void dyno::GlfwRenderWindow::turnOffVSync ( )

Definition at line 327 of file GlfwRenderWindow.cpp.

◆ turnOnVSync()

void dyno::GlfwRenderWindow::turnOnVSync ( )

Definition at line 322 of file GlfwRenderWindow.cpp.

Member Data Documentation

◆ mAnimationToggle

bool dyno::GlfwRenderWindow::mAnimationToggle = false
private

Definition at line 100 of file GlfwRenderWindow.h.

◆ mBackgroundToggle

bool dyno::GlfwRenderWindow::mBackgroundToggle = true
private

Definition at line 102 of file GlfwRenderWindow.h.

◆ mBoundingboxToggle

bool dyno::GlfwRenderWindow::mBoundingboxToggle = false
private

Definition at line 103 of file GlfwRenderWindow.h.

◆ mButtonAction

uint dyno::GlfwRenderWindow::mButtonAction
private

Definition at line 92 of file GlfwRenderWindow.h.

◆ mButtonMode

uint dyno::GlfwRenderWindow::mButtonMode
private

Definition at line 91 of file GlfwRenderWindow.h.

◆ mButtonState

ButtonState dyno::GlfwRenderWindow::mButtonState
private

Definition at line 93 of file GlfwRenderWindow.h.

◆ mButtonType

uint dyno::GlfwRenderWindow::mButtonType
private

Definition at line 90 of file GlfwRenderWindow.h.

◆ mCursorEnterFunc

void(* dyno::GlfwRenderWindow::mCursorEnterFunc) (GLFWwindow *window, int entered)
private

Definition at line 84 of file GlfwRenderWindow.h.

◆ mCursorPosFunc

void(* dyno::GlfwRenderWindow::mCursorPosFunc) (GLFWwindow *window, double x, double y)
private

Definition at line 83 of file GlfwRenderWindow.h.

◆ mCursorPosX

double dyno::GlfwRenderWindow::mCursorPosX
private

Definition at line 97 of file GlfwRenderWindow.h.

◆ mCursorPosY

double dyno::GlfwRenderWindow::mCursorPosY
private

Definition at line 98 of file GlfwRenderWindow.h.

◆ mCursorTempX

double dyno::GlfwRenderWindow::mCursorTempX = -1.0
private

Definition at line 105 of file GlfwRenderWindow.h.

◆ mImWindow

ImWindow dyno::GlfwRenderWindow::mImWindow
private

Definition at line 110 of file GlfwRenderWindow.h.

◆ mKeyboardFunc

void(* dyno::GlfwRenderWindow::mKeyboardFunc) (GLFWwindow *window, int key, int scancode, int action, int mods)
private

Definition at line 81 of file GlfwRenderWindow.h.

◆ mMouseButtonFunc

void(* dyno::GlfwRenderWindow::mMouseButtonFunc) (GLFWwindow *window, int button, int action, int mods)
private

Definition at line 80 of file GlfwRenderWindow.h.

◆ mPlaneSize

int dyno::GlfwRenderWindow::mPlaneSize = 4
private

Definition at line 95 of file GlfwRenderWindow.h.

◆ mReshapeFunc

void(* dyno::GlfwRenderWindow::mReshapeFunc) (GLFWwindow *window, int w, int h)
private

Definition at line 82 of file GlfwRenderWindow.h.

◆ mScrollFunc

void(* dyno::GlfwRenderWindow::mScrollFunc) (GLFWwindow *window, double offsetX, double OffsetY)
private

Definition at line 85 of file GlfwRenderWindow.h.

◆ mWindow

GLFWwindow* dyno::GlfwRenderWindow::mWindow = nullptr
private

Definition at line 87 of file GlfwRenderWindow.h.

◆ mWindowTitle

std::string dyno::GlfwRenderWindow::mWindowTitle
private

Definition at line 107 of file GlfwRenderWindow.h.


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