42 std::shared_ptr<ACTION_MENU> rotateSubmenu = std::make_shared<ACTION_MENU>(
true,
this );
43 rotateSubmenu->SetUntranslatedTitle(
_HKI(
"Rotate Board" ) );
45 m_menu->RegisterSubMenu( rotateSubmenu );
49 rotateSubmenu->AppendSeparator();
52 rotateSubmenu->AppendSeparator();
56 std::shared_ptr<ACTION_MENU> moveSubmenu = std::make_shared<ACTION_MENU>(
true,
this );
57 moveSubmenu->SetUntranslatedTitle(
_HKI(
"Move Board" ) );
59 m_menu->RegisterSubMenu( moveSubmenu );
108 else if( wxWindow* previewWindow =
dynamic_cast<wxWindow*
>( holder ) )
124 if( conditionalMenu )
125 conditionalMenu->Evaluate( dummySel );
139 if( evt->IsCancelInteractive() )
141 wxWindow* canvas =
m_toolMgr->GetToolHolder()->GetToolCanvas();
151 dialog->EndModal( wxID_CANCEL );
158 else if( evt->IsMouseDown() )
161 else if( evt->IsClick() && ( evt->Buttons() &
BUT_RIGHT ) )
165 m_menu->ShowContextMenu();
193 default: wxFAIL;
break;
214 default: wxFAIL;
break;
220 m_canvas->RenderRaytracingRequest();
248 m_canvas->RenderRaytracingRequest();
255 std::bitset<LAYER_3D_END> visibilityFlags =
m_boardAdapter->GetVisibleLayers();
269 if( appearanceManager )
379 if( old_engine != engine )
397 wxSize currentSize = viewer->
GetCanvas()->GetClientSize();
405 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)
EDA_3D_VIEWER_SETTINGS * m_Cfg
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 RenderEngineChanged()
Notify that the render engine was changed.
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.
EDA_3D_CANVAS * GetCanvas()
BOARD_ADAPTER & GetAdapter()
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