![]() |
PeriDyno 1.0.0
|
#include <WSimulationCanvas.h>
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) |
![]() | |
RenderWindow () | |
virtual void | initialize (int width, int height) |
virtual void | mainLoop () |
virtual std::shared_ptr< RenderEngine > | getRenderEngine () |
virtual void | setRenderEngine (std::shared_ptr< RenderEngine > engine) |
virtual std::shared_ptr< Camera > | getCamera () |
virtual void | setCamera (std::shared_ptr< Camera > camera) |
RenderParams & | getRenderParams () |
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 Selection & | select (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< Node > | getCurrentSelectedNode () |
Protected Member Functions | |
void | initializeGL () |
void | makeCurrent () |
void | doneCurrent () |
void | render (Wt::WFlags< Wt::RenderFlag > flags) override |
void | layoutSizeChanged (int width, int height) override |
![]() | |
virtual void | onSaveScreen (const std::string &filename) |
virtual void | onSelected (const Selection &s) |
Protected Attributes | |
int | width = 800 |
int | height = 600 |
![]() | |
std::shared_ptr< RenderEngine > | mRenderEngine |
RenderParams | mRenderParams |
std::shared_ptr< Camera > | mCamera |
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 |
ImGuiBackendWt * | mImGuiCtx |
dyno::ImWindow | mImWindow |
std::vector< unsigned char > | mImageData |
std::vector< unsigned char > | mJpegBuffer |
std::unique_ptr< ImageEncoder > | mJpegEncoder |
std::unique_ptr< Wt::WMemoryResource > | mJpegResource |
std::shared_ptr< dyno::SceneGraph > | mScene = nullptr |
dyno::Framebuffer | mFramebuffer |
dyno::Texture2D | mFrameColor |
bool | mMouseButtonDown = false |
int | mtempCursorX = -1 |
Additional Inherited Members | |
![]() | |
enum | SelectionMode { OBJECT_MODE , PRIMITIVE_MODE } |
Definition at line 26 of file WSimulationCanvas.h.
WSimulationCanvas::WSimulationCanvas | ( | ) |
WSimulationCanvas::~WSimulationCanvas | ( | ) |
|
protected |
|
protected |
Definition at line 195 of file WSimulationCanvas.cpp.
|
overrideprotected |
|
protected |
void WSimulationCanvas::onKeyWentDown | ( | const Wt::WKeyEvent & | evt | ) |
Definition at line 333 of file WSimulationCanvas.cpp.
void WSimulationCanvas::onKeyWentUp | ( | const Wt::WKeyEvent & | evt | ) |
void WSimulationCanvas::onMouseDrag | ( | const Wt::WMouseEvent & | evt | ) |
Definition at line 292 of file WSimulationCanvas.cpp.
void WSimulationCanvas::onMousePressed | ( | const Wt::WMouseEvent & | evt | ) |
void WSimulationCanvas::onMouseReleased | ( | const Wt::WMouseEvent & | evt | ) |
void WSimulationCanvas::onMouseWheeled | ( | const Wt::WMouseEvent & | evt | ) |
|
overrideprotected |
void WSimulationCanvas::setScene | ( | std::shared_ptr< dyno::SceneGraph > | scene | ) |
void WSimulationCanvas::update | ( | ) |
Definition at line 364 of file WSimulationCanvas.cpp.
|
protected |
Definition at line 58 of file WSimulationCanvas.h.
|
private |
Definition at line 62 of file WSimulationCanvas.h.
|
private |
Definition at line 64 of file WSimulationCanvas.h.
|
private |
Definition at line 78 of file WSimulationCanvas.h.
|
private |
Definition at line 79 of file WSimulationCanvas.h.
|
private |
Definition at line 61 of file WSimulationCanvas.h.
|
private |
Definition at line 69 of file WSimulationCanvas.h.
|
private |
Definition at line 65 of file WSimulationCanvas.h.
|
private |
Definition at line 67 of file WSimulationCanvas.h.
|
private |
Definition at line 70 of file WSimulationCanvas.h.
|
private |
Definition at line 71 of file WSimulationCanvas.h.
|
private |
Definition at line 72 of file WSimulationCanvas.h.
|
private |
Definition at line 81 of file WSimulationCanvas.h.
|
private |
Definition at line 74 of file WSimulationCanvas.h.
|
private |
Definition at line 83 of file WSimulationCanvas.h.
|
protected |
Definition at line 57 of file WSimulationCanvas.h.