PeriDyno 1.0.0
Loading...
Searching...
No Matches
WSimulationCanvas Class Reference

#include <WSimulationCanvas.h>

Inheritance diagram for WSimulationCanvas:
Collaboration diagram for WSimulationCanvas:

Public Member Functions

 WSimulationCanvas ()
 
 ~WSimulationCanvas ()
 
void setScene (std::shared_ptr< dyno::SceneGraph > scene)
 
void update ()
 
void onMousePressed (const Wt::WMouseEvent &evt)
 
void onMouseDrag (const Wt::WMouseEvent &evt)
 
void onMouseReleased (const Wt::WMouseEvent &evt)
 
void onMouseWheeled (const Wt::WMouseEvent &evt)
 
void onKeyWentDown (const Wt::WKeyEvent &evt)
 
void onKeyWentUp (const Wt::WKeyEvent &evt)
 
- Public Member Functions inherited from dyno::RenderWindow
 RenderWindow ()
 
virtual void initialize (int width, int height)
 
virtual void mainLoop ()
 
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 initializeGL ()
 
void makeCurrent ()
 
void doneCurrent ()
 
void render (Wt::WFlags< Wt::RenderFlag > flags) override
 
void layoutSizeChanged (int width, int height) override
 
- Protected Member Functions inherited from dyno::RenderWindow
virtual void onSaveScreen (const std::string &filename)
 
virtual void onSelected (const Selection &s)
 

Protected Attributes

int width = 800
 
int height = 600
 
- 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
 

Private Attributes

Wt::WImage * mImage
 
Wt::WApplication * mApp
 
GLFWwindow * mContext
 
ImGuiBackendWtmImGuiCtx
 
dyno::ImWindow mImWindow
 
std::vector< unsigned char > mImageData
 
std::vector< unsigned char > mJpegBuffer
 
std::unique_ptr< ImageEncodermJpegEncoder
 
std::unique_ptr< Wt::WMemoryResource > mJpegResource
 
std::shared_ptr< dyno::SceneGraphmScene = nullptr
 
dyno::Framebuffer mFramebuffer
 
dyno::Texture2D mFrameColor
 
bool mMouseButtonDown = false
 
int mtempCursorX = -1
 

Additional Inherited Members

- Public Types inherited from dyno::RenderWindow
enum  SelectionMode { OBJECT_MODE , PRIMITIVE_MODE }
 

Detailed Description

Definition at line 26 of file WSimulationCanvas.h.

Constructor & Destructor Documentation

◆ WSimulationCanvas()

WSimulationCanvas::WSimulationCanvas ( )

Definition at line 105 of file WSimulationCanvas.cpp.

Here is the call graph for this function:

◆ ~WSimulationCanvas()

WSimulationCanvas::~WSimulationCanvas ( )

Definition at line 176 of file WSimulationCanvas.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ doneCurrent()

void WSimulationCanvas::doneCurrent ( )
protected

Definition at line 255 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ initializeGL()

void WSimulationCanvas::initializeGL ( )
protected

Definition at line 195 of file WSimulationCanvas.cpp.

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

◆ layoutSizeChanged()

void WSimulationCanvas::layoutSizeChanged ( int width,
int height )
overrideprotected

Definition at line 260 of file WSimulationCanvas.cpp.

Here is the call graph for this function:

◆ makeCurrent()

void WSimulationCanvas::makeCurrent ( )
protected

Definition at line 249 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ onKeyWentDown()

void WSimulationCanvas::onKeyWentDown ( const Wt::WKeyEvent & evt)

Definition at line 333 of file WSimulationCanvas.cpp.

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

◆ onKeyWentUp()

void WSimulationCanvas::onKeyWentUp ( const Wt::WKeyEvent & evt)

Definition at line 355 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ onMouseDrag()

void WSimulationCanvas::onMouseDrag ( const Wt::WMouseEvent & evt)

Definition at line 292 of file WSimulationCanvas.cpp.

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

◆ onMousePressed()

void WSimulationCanvas::onMousePressed ( const Wt::WMouseEvent & evt)

Definition at line 275 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ onMouseReleased()

void WSimulationCanvas::onMouseReleased ( const Wt::WMouseEvent & evt)

Definition at line 317 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ onMouseWheeled()

void WSimulationCanvas::onMouseWheeled ( const Wt::WMouseEvent & evt)

Definition at line 327 of file WSimulationCanvas.cpp.

Here is the caller graph for this function:

◆ render()

void WSimulationCanvas::render ( Wt::WFlags< Wt::RenderFlag > flags)
overrideprotected

Definition at line 359 of file WSimulationCanvas.cpp.

Here is the call graph for this function:

◆ setScene()

void WSimulationCanvas::setScene ( std::shared_ptr< dyno::SceneGraph > scene)

Definition at line 430 of file WSimulationCanvas.cpp.

Here is the call graph for this function:

◆ update()

void WSimulationCanvas::update ( )

Definition at line 364 of file WSimulationCanvas.cpp.

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

Member Data Documentation

◆ height

int WSimulationCanvas::height = 600
protected

Definition at line 58 of file WSimulationCanvas.h.

◆ mApp

Wt::WApplication* WSimulationCanvas::mApp
private

Definition at line 62 of file WSimulationCanvas.h.

◆ mContext

GLFWwindow* WSimulationCanvas::mContext
private

Definition at line 64 of file WSimulationCanvas.h.

◆ mFramebuffer

dyno::Framebuffer WSimulationCanvas::mFramebuffer
private

Definition at line 78 of file WSimulationCanvas.h.

◆ mFrameColor

dyno::Texture2D WSimulationCanvas::mFrameColor
private

Definition at line 79 of file WSimulationCanvas.h.

◆ mImage

Wt::WImage* WSimulationCanvas::mImage
private

Definition at line 61 of file WSimulationCanvas.h.

◆ mImageData

std::vector<unsigned char> WSimulationCanvas::mImageData
private

Definition at line 69 of file WSimulationCanvas.h.

◆ mImGuiCtx

ImGuiBackendWt* WSimulationCanvas::mImGuiCtx
private

Definition at line 65 of file WSimulationCanvas.h.

◆ mImWindow

dyno::ImWindow WSimulationCanvas::mImWindow
private

Definition at line 67 of file WSimulationCanvas.h.

◆ mJpegBuffer

std::vector<unsigned char> WSimulationCanvas::mJpegBuffer
private

Definition at line 70 of file WSimulationCanvas.h.

◆ mJpegEncoder

std::unique_ptr<ImageEncoder> WSimulationCanvas::mJpegEncoder
private

Definition at line 71 of file WSimulationCanvas.h.

◆ mJpegResource

std::unique_ptr<Wt::WMemoryResource> WSimulationCanvas::mJpegResource
private

Definition at line 72 of file WSimulationCanvas.h.

◆ mMouseButtonDown

bool WSimulationCanvas::mMouseButtonDown = false
private

Definition at line 81 of file WSimulationCanvas.h.

◆ mScene

std::shared_ptr<dyno::SceneGraph> WSimulationCanvas::mScene = nullptr
private

Definition at line 74 of file WSimulationCanvas.h.

◆ mtempCursorX

int WSimulationCanvas::mtempCursorX = -1
private

Definition at line 83 of file WSimulationCanvas.h.

◆ width

int WSimulationCanvas::width = 800
protected

Definition at line 57 of file WSimulationCanvas.h.


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