91 else if( wxWindow* previewWindow =
dynamic_cast<wxWindow*
>( holder ) )
107 if( conditionalMenu )
108 conditionalMenu->Evaluate( dummySel );
122 const int DRAG_THRESHOLD = 4;
123 bool rightButtonDragged =
false;
128 if( evt->IsCancelInteractive() )
140 dialog->EndModal( wxID_CANCEL );
147 else if( evt->IsMouseDown() )
150 else if( evt->IsClick() && ( evt->Buttons() &
BUT_RIGHT ) )
154 m_menu->ShowContextMenu();
182 default: wxFAIL;
break;
203 default: wxFAIL;
break;
251 !visibilityFlags.test( layer ) );
259 if( appearanceManager )
329 : VIEW3D_TYPE::VIEW3D_ZOOM_OUT );
371 if( old_engine == RENDER_ENGINE::OPENGL )
372 engine = RENDER_ENGINE::RAYTRACING;
374 engine = RENDER_ENGINE::OPENGL;
377 if( old_engine != engine )
395 wxSize currentSize = viewer->
GetCanvas()->GetClientSize();
397 if( fmt == EDA_3D_VIEWER_EXPORT_FORMAT::CLIPBOARD )
403 static wxSize lastSize( viewer->
GetCanvas()->GetClientSize() );
ROTATION_DIR
Rotation direction for the 3d canvas.
MATERIAL_MODE
Render 3d model shape materials mode.
RENDER_ENGINE
Render engine mode.
static TOOL_ACTION zoomRedraw
static TOOL_ACTION zoomOutCenter
static TOOL_ACTION zoomIn
static TOOL_ACTION zoomOut
static TOOL_ACTION panDown
static TOOL_ACTION panLeft
static TOOL_ACTION updateMenu
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomInCenter
static TOOL_ACTION panRight
void OnLayerVisibilityChanged(int aLayer, bool isVisible)
std::bitset< LAYER_3D_END > GetVisibleLayers() const
EDA_3D_VIEWER_SETTINGS * m_Cfg
void RotateY(float aAngleInRadians)
void RotateX(float aAngleInRadians)
void RotateZ(float aAngleInRadians)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
bool IsQuasiModal() const
void EndQuasiModal(int retCode)
static TOOL_ACTION showNavigator
static TOOL_ACTION showLayersManager
static TOOL_ACTION rotateXCCW
static TOOL_ACTION showNotInPosFile
static TOOL_ACTION exportImage
static TOOL_ACTION showTHT
static TOOL_ACTION noGrid
static TOOL_ACTION show2_5mmGrid
static TOOL_ACTION reloadBoard
static TOOL_ACTION rotateZCCW
static TOOL_ACTION rotateZCW
static TOOL_ACTION rotateYCCW
static TOOL_ACTION rotateXCW
static TOOL_ACTION viewTop
static TOOL_ACTION show1mmGrid
static TOOL_ACTION showDNP
static TOOL_ACTION toggleOrtho
static TOOL_ACTION moveLeft
static TOOL_ACTION viewLeft
static TOOL_ACTION show10mmGrid
static TOOL_ACTION toggleRaytacing
static TOOL_ACTION viewBack
static TOOL_ACTION show5mmGrid
static TOOL_ACTION viewRight
static TOOL_ACTION showSMD
static TOOL_ACTION homeView
static TOOL_ACTION moveUp
static TOOL_ACTION flipView
static TOOL_ACTION moveDown
static TOOL_ACTION viewBottom
static TOOL_ACTION copyToClipboard
static TOOL_ACTION moveRight
static TOOL_ACTION materialDiffuse
static TOOL_ACTION pivotCenter
static TOOL_ACTION controlActivate
static TOOL_ACTION showVirtual
static TOOL_ACTION rotateYCW
static TOOL_ACTION materialCAD
static TOOL_ACTION viewFront
static TOOL_ACTION showBBoxes
static TOOL_ACTION materialNormal
Implement a canvas based on a wxGLCanvas.
void DisplayStatus()
Update the status bar with the position information.
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.
bool SetView3D(VIEW3D_TYPE aRequestedView)
Select a specific 3D view or operation.
void RenderEngineChanged()
Notify that the render engine was changed.
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
int On3DGridSelection(const TOOL_EVENT &aEvent)
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)
int ZoomFitScreen(const TOOL_EVENT &aEvent)
int ExportImage(const TOOL_EVENT &aEvent)
int doZoomInOut(bool aDirection, bool aCenterOnCursor)
int ToggleLayersManager(const TOOL_EVENT &aEvent)
int ToggleRaytracing(const TOOL_EVENT &aEvent)
int Main(const TOOL_EVENT &aEvent)
BOARD_ADAPTER * m_boardAdapter
int ZoomRedraw(const TOOL_EVENT &aEvent)
int ToggleOrtho(const TOOL_EVENT &aEvent)
int PanControl(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int ToggleVisibility(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
void setTransitions() override
Set up handlers for various events.
int RotateView(const TOOL_EVENT &aEvent)
int SetMaterial(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
int ViewControl(const TOOL_EVENT &aEvent)
int ReloadBoard(const TOOL_EVENT &aEvent)
int ZoomInOutCenter(const TOOL_EVENT &aEvent)
int ZoomInOut(const TOOL_EVENT &aEvent)
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
void ToggleAppearanceManager()
EDA_3D_CANVAS * GetCanvas()
BOARD_ADAPTER & GetAdapter()
APPEARANCE_CONTROLS_3D * GetAppearanceManager()
void ExportImage(EDA_3D_VIEWER_EXPORT_FORMAT aFormat, const wxSize &aSize)
Export 3D viewer image to file or clipboard.
The base frame for deriving all KiCad main window classes.
FRAME_T GetFrameType() const
A mix in class which holds the location of a wxWindow's KIWAY.
HOLDER_TYPE GetType() const
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
Declaration of the eda_3d_viewer class.
EDA_3D_VIEWER_EXPORT_FORMAT
@ LAYER_3D_BOUNDING_BOXES
@ LAYER_3D_VIRTUAL_MODELS
@ LAYER_3D_MODELS_MARKED_DNP
@ LAYER_3D_MODELS_NOT_IN_POS
#define PANEL_PREVIEW_3D_MODEL_ID
MATERIAL_MODE material_mode