25 #ifndef EDA_3D_CANVAS_H 26 #define EDA_3D_CANVAS_H 171 void OnEvent( wxEvent& aEvent );
177 void OnPaint( wxPaintEvent& aEvent );
193 #if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT ) 194 void OnMagnify( wxMouseEvent& event );
199 void OnLeftUp( wxMouseEvent& event );
204 void OnResize( wxSizeEvent& event );
207 DECLARE_EVENT_TABLE()
302 #endif // EDA_3D_CANVAS_H void AnimationEnabledSet(bool aAnimationEnabled)
Enable or disable camera animation when switching to a pre-defined view.
bool IsReloadRequestPending() const
Query if there is a pending reload request.
void OnMouseMove(wxMouseEvent &event)
void OnResize(wxSizeEvent &event)
void request_start_moving_camera(float aMovingSpeed=2.0f, bool aRenderPivot=true)
Start a camera movement.
void releaseOpenGL()
Free created targets and openGL context.
void OnRefreshRequest(wxEvent &aEvent)
unsigned m_strtime_camera_movement
WX_INFOBAR * m_parentInfoBar
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
RAY getRayAtCurrrentMousePosition()
void stop_editingTimeOut_Timer()
Stop the editing time so it will not timeout.
CONTAINER_3D m_3DShapes_container
wxStatusBar * m_parentStatusBar
void OnCloseWindow(wxCloseEvent &event)
wxGLCanvas wrapper for HiDPI/Retina support.
void SetStatusBar(wxStatusBar *aStatusBar)
Implement a canvas based on a wxGLCanvas.
bool IsReloadRequestPending() const
Query if there is a pending reload request.
wxTimer m_editing_timeout_timer
EDA_3D_CANVAS(wxWindow *aParent, const int *aAttribList, BOARD *aBoard, BOARD_ADAPTER &aSettings, CAMERA &aCamera, S3D_CACHE *a3DCachePointer)
Create a new 3D Canvas with an attribute list.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
BOARD_ITEM * m_currentIntersectedBoardItem
void DisplayStatus()
Update the status bar with the position information.
Cache for storing the 3D shapes.
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
void DoRePaint()
The actual function to repaint the canvas.
void MovingSpeedMultiplierSet(int aMovingSpeedMultiplier)
Set the camera animation moving speed multiplier option.
BOARD_ADAPTER & m_boardAdapter
void OnLeftDown(wxMouseEvent &event)
float m_camera_moving_speed
bool m_is_opengl_version_supported
A class used to derive camera objects from.
void OnLeftUp(wxMouseEvent &event)
void SetInfoBar(WX_INFOBAR *aInfoBar)
void restart_editingTimeOut_Timer()
Reset the editing timer.
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
RENDER_3D_LEGACY * m_3d_render_ogl_legacy
void OnMiddleDown(wxMouseEvent &event)
void OnPaint(wxPaintEvent &aEvent)
Called by a wxPaintEvent event.
void OnEraseBackground(wxEraseEvent &event)
void OnMouseWheel(wxMouseEvent &event)
void RenderEngineChanged()
Notify that the render engine was changed.
RENDER_3D_RAYTRACE * m_3d_render_raytracing
Object to render the board using openGL legacy mode.
bool AnimationEnabledGet() const
Return whether camera animation is enabled when switching to a pre-defined view.
RENDER_3D_BASE * m_3d_render
This is a base class to hold data and functions for render targets.
void OnTimerTimeout_Redraw(wxTimerEvent &event)
bool m_is_opengl_initialized
void OnMiddleUp(wxMouseEvent &event)
A modified version of the wxInfoBar class that allows us to:
TOOL_DISPATCHER * m_eventDispatcher
void GetScreenshot(wxImage &aDstImage)
Request a screenshot and output it to the aDstImage.
int m_moving_speed_multiplier
int MovingSpeedMultiplierGet() const
Return the current camera animation moving speed multiplier option.
void OnEvent(wxEvent &aEvent)
Used to forward events to the canvas from popups, etc.
bool m_opengl_supports_raytracing
ACCELERATOR_3D * m_accelerator3DShapes
void move_pivot_based_on_cur_mouse_position()
This function hits a ray to the board and start a movement.
std::atomic_flag m_is_currently_painting
Information pertinent to a Pcbnew printed circuit board.
bool SetView3D(int aKeycode)
Helper function to call view commands.
void OnTimerTimeout_Editing(wxTimerEvent &event)
void ReloadRequest(BOARD *aBoard=nullptr, S3D_CACHE *aCachePointer=nullptr)
wxTimer m_redraw_trigger_timer
Helper class to handle information needed to display 3D board.
static const float m_delta_move_step_factor
void render_pivot(float t, float aScale)
Render the pivot cursor.
bool m_render_raytracing_was_requested