25#ifndef EDA_3D_CANVAS_H
26#define EDA_3D_CANVAS_H
45#define EDA_3D_CANVAS_ID wxID_HIGHEST + 1321
164 void OnEvent( wxEvent& aEvent );
225 void OnPaint( wxPaintEvent& aEvent );
236 void OnLeftUp( wxMouseEvent& event );
240 void OnResize( wxSizeEvent& event );
247 DECLARE_EVENT_TABLE()
Helper class to handle information needed to display 3D board.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
A class used to derive camera objects from.
void SetProjection(PROJECTION_TYPE aProjection)
PROJECTION_TYPE GetProjection()
Implement a canvas based on a wxGLCanvas.
int GetMovingSpeedMultiplier() const
RENDER_3D_OPENGL * m_3d_render_opengl
TOOL_DISPATCHER * m_eventDispatcher
void SetProjectionMode(int aMode)
void OnEvent(wxEvent &aEvent)
Used to forward events to the canvas from popups, etc.
void OnMagnify(wxMouseEvent &event)
void SetInfoBar(WX_INFOBAR *aInfoBar)
void restart_editingTimeOut_Timer()
Reset the editing timer.
void Set3dmousePivotPos(const SFVEC3F &aPos)
Set the position of the the 3dmouse pivot.
BOARD_ITEM * m_currentRollOverItem
RENDER_3D_BASE * m_3d_render
void SetAnimationEnabled(bool aEnable)
Enable or disable camera animation when switching to a pre-defined view.
bool m_is_opengl_initialized
void OnResize(wxSizeEvent &event)
bool m_render3dmousePivot
void OnMouseWheel(wxMouseEvent &event)
WX_INFOBAR * m_parentInfoBar
wxTimer m_editing_timeout_timer
int64_t m_strtime_camera_movement
RENDER_3D_BASE * GetCurrentRender() const
void OnLeftDown(wxMouseEvent &event)
int GetProjectionMode() const
void OnPanGesture(wxPanGestureEvent &event)
ACCELERATOR_3D * m_accelerator3DShapes
void OnTimerTimeout_Redraw(wxTimerEvent &event)
wxStatusBar * m_parentStatusBar
void DoRePaint()
The actual function to repaint the canvas.
int m_moving_speed_multiplier
SFVEC3F m_3dmousePivotPos
bool m_is_opengl_version_supported
wxTimer m_redraw_trigger_timer
BOARD_ADAPTER & m_boardAdapter
void DisplayStatus()
Update the status bar with the position information.
void render3dmousePivot(float aScale)
Render the 3dmouse pivot cursor.
void OnPaint(wxPaintEvent &aEvent)
void SetStatusBar(wxStatusBar *aStatusBar)
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.
bool GetRenderPivot()
Get a value indicating whether to render the pivot.
bool m_render_raytracing_was_requested
float m_camera_moving_speed
bool IsReloadRequestPending() const
Query if there is a pending reload request.
bool GetRender3dmousePivot()
Get a value indicating whether to render the 3dmouse pivot.
void OnLeftUp(wxMouseEvent &event)
bool GetAnimationEnabled() const
void ReloadRequest(BOARD *aBoard=nullptr, S3D_CACHE *aCachePointer=nullptr)
RAY getRayAtCurrentMousePosition()
double m_gestureLastZoomFactor
< Used to track gesture events.
void OnCloseWindow(wxCloseEvent &event)
bool SetView3D(VIEW3D_TYPE aRequestedView)
Select a specific 3D view or operation.
void OnMiddleDown(wxMouseEvent &event)
void GetScreenshot(wxImage &aDstImage)
Request a screenshot and output it to the aDstImage.
RENDER_3D_RAYTRACE_GL * m_3d_render_raytracing
void OnZoomGesture(wxZoomGestureEvent &event)
void SetMovingSpeedMultiplier(int aMultiplier)
Set the camera animation moving speed multiplier option.
void OnMiddleUp(wxMouseEvent &event)
void render_pivot(float t, float aScale)
Render the pivot cursor.
void request_start_moving_camera(float aMovingSpeed=2.0f, bool aRenderPivot=true)
Start a camera movement.
void RenderEngineChanged()
Notify that the render engine was changed.
std::atomic_flag m_is_currently_painting
void SetRender3dmousePivot(bool aValue)
Set aValue indicating whether to render the 3dmouse pivot.
void OnRefreshRequest(wxEvent &aEvent)
void OnEraseBackground(wxEraseEvent &event)
void releaseOpenGL()
Free created targets and openGL context.
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
bool m_opengl_supports_raytracing
const BOARD_ADAPTER & GetBoardAdapter() const
Get information used to display 3D board.
void OnMouseMove(wxMouseEvent &event)
void SetRenderPivot(bool aValue)
Set aValue indicating whether to render the pivot.
void OnRotateGesture(wxRotateGestureEvent &event)
void move_pivot_based_on_cur_mouse_position()
This function hits a ray to the board and start a movement.
double m_gestureLastAngle
void OnTimerTimeout_Editing(wxTimerEvent &event)
void stop_editingTimeOut_Timer()
Stop the editing time so it will not timeout.
Provides basic 3D controls ( zoom, rotate, translate, ... )
This is a base class to hold data and functions for render targets.
bool IsReloadRequestPending() const
Query if there is a pending reload request.
Object to render the board using openGL.
Cache for storing the 3D shapes.
A modified version of the wxInfoBar class that allows us to:
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.