KiCad PCB EDA Suite
|
The class that implements the accessors and mutators required for 3D navigation in an PCB_DRAW_PANEL_GAL using a SpaceMouse. More...
#include <nl_gerbview_plugin_impl.h>
Public Member Functions | |
NL_GERBVIEW_PLUGIN_IMPL () | |
Initializes a new instance of the NL_GERBVIEW_PLUGIN_IMPL. | |
virtual | ~NL_GERBVIEW_PLUGIN_IMPL () |
void | SetCanvas (EDA_DRAW_PANEL_GAL *aViewport) |
Sets the viewport controlled by the SpaceMouse. | |
void | SetFocus (bool aFocus) |
Set the connection to the 3Dconnexion driver to the focus state so that 3DMouse data is routed here. | |
Private Member Functions | |
void | exportCommandsAndImages () |
Export the invocable actions and images to the 3Dconnexion UI. | |
long | GetCameraMatrix (navlib::matrix_t &aMatrix) const override |
long | GetPointerPosition (navlib::point_t &aPosition) const override |
long | GetViewExtents (navlib::box_t &aExtents) const override |
long | GetViewFOV (double &aFov) const override |
long | GetViewFrustum (navlib::frustum_t &aFrustum) const override |
long | GetIsViewPerspective (navlib::bool_t &aPerspective) const override |
long | SetCameraMatrix (const navlib::matrix_t &aMatrix) override |
long | SetViewExtents (const navlib::box_t &aExtents) override |
long | SetViewFOV (double aFov) override |
long | SetViewFrustum (const navlib::frustum_t &aFrustum) override |
long | GetModelExtents (navlib::box_t &aExtents) const override |
long | GetSelectionExtents (navlib::box_t &aExtents) const override |
long | GetSelectionTransform (navlib::matrix_t &aTransform) const override |
long | GetIsSelectionEmpty (navlib::bool_t &aEmpty) const override |
long | SetSelectionTransform (const navlib::matrix_t &aMatrix) override |
long | GetPivotPosition (navlib::point_t &aPosition) const override |
long | IsUserPivot (navlib::bool_t &aUserPivot) const override |
long | SetPivotPosition (const navlib::point_t &aPosition) override |
long | GetPivotVisible (navlib::bool_t &aVisible) const override |
long | SetPivotVisible (bool aVisible) override |
long | GetHitLookAt (navlib::point_t &aPosition) const override |
long | SetHitAperture (double aAperture) override |
long | SetHitDirection (const navlib::vector_t &aDirection) override |
long | SetHitLookFrom (const navlib::point_t &aPosition) override |
long | SetHitSelectionOnly (bool aSelectionOnly) override |
long | SetActiveCommand (std::string aCommandId) override |
long | SetSettingsChanged (long aChangeNumber) override |
long | SetMotionFlag (bool aValue) override |
long | SetTransaction (long aValue) override |
long | SetCameraTarget (const navlib::point_t &aPosition) override |
long | GetFrontView (navlib::matrix_t &aMatrix) const override |
long | GetCoordinateSystem (navlib::matrix_t &aMatrix) const override |
long | GetIsViewRotatable (navlib::bool_t &isRotatable) const override |
Private Attributes | |
EDA_DRAW_PANEL_GAL * | m_viewport2D = nullptr |
KIGFX::VIEW * | m_view = nullptr |
bool | m_isMoving = false |
double | m_viewportWidth = 0.0 |
VECTOR2D | m_viewPosition |
Static Private Attributes | |
static const wxChar * | m_logTrace = wxT( "KI_TRACE_NL_GERBVIEW_PLUGIN" ) |
Trace mask used to enable or disable the trace output of this class. | |
The class that implements the accessors and mutators required for 3D navigation in an PCB_DRAW_PANEL_GAL using a SpaceMouse.
Definition at line 61 of file nl_gerbview_plugin_impl.h.
NL_GERBVIEW_PLUGIN_IMPL::NL_GERBVIEW_PLUGIN_IMPL | ( | ) |
Initializes a new instance of the NL_GERBVIEW_PLUGIN_IMPL.
Definition at line 56 of file nl_gerbview_plugin_impl.cpp.
|
virtual |
Definition at line 62 of file nl_gerbview_plugin_impl.cpp.
|
private |
Export the invocable actions and images to the 3Dconnexion UI.
Definition at line 169 of file nl_gerbview_plugin_impl.cpp.
References ACTION_MANAGER::GetActionList(), image, KiBitmap(), m_logTrace, name, and try_add_category().
Referenced by SetCanvas().
|
overrideprivate |
Definition at line 247 of file nl_gerbview_plugin_impl.cpp.
References KIGFX::VIEW::GetCenter(), KIGFX::VIEW::IsMirroredX(), KIGFX::VIEW::IsMirroredY(), m_view, m_viewPosition, VECTOR2< T >::x, and VECTOR2< T >::y.
|
overrideprivate |
Definition at line 395 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 403 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 565 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 410 of file nl_gerbview_plugin_impl.cpp.
References empty().
|
overrideprivate |
Definition at line 303 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 417 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 371 of file nl_gerbview_plugin_impl.cpp.
References BOX2< Vec >::GetEnd(), EDA_DRAW_PANEL_GAL::GetGAL(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetOrigin(), BOX2< Vec >::GetWidth(), KIGFX::GAL::GetWorldScale(), m_view, m_viewport2D, BOX2< Vec >::Normalize(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
overrideprivate |
Definition at line 535 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 553 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 268 of file nl_gerbview_plugin_impl.cpp.
References KIGFX::VIEW_CONTROLS::GetMousePosition(), EDA_DRAW_PANEL_GAL::GetViewControls(), m_view, m_viewport2D, VECTOR2< T >::x, and VECTOR2< T >::y.
|
overrideprivate |
Definition at line 517 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 523 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 283 of file nl_gerbview_plugin_impl.cpp.
References EDA_DRAW_PANEL_GAL::GetGAL(), BOX2< Vec >::GetHeight(), KIGFX::GAL::GetMaxDepth(), KIGFX::GAL::GetMinDepth(), KIGFX::VIEW::GetViewport(), BOX2< Vec >::GetWidth(), KIGFX::GAL::GetWorldScale(), m_view, m_viewport2D, m_viewportWidth, and scale.
|
overrideprivate |
Definition at line 505 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 511 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 541 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 424 of file nl_gerbview_plugin_impl.cpp.
References ACTION_CONDITIONS::enableCondition, ACTION_MANAGER::GetActionList(), TOOL_MANAGER::GetActionManager(), ACTION_MANAGER::GetCondition(), TOOLS_HOLDER::GetCurrentSelection(), TOOL_MANAGER::GetToolHolder(), m_viewport2D, and TOOL_MANAGER::RunAction().
|
overrideprivate |
Definition at line 311 of file nl_gerbview_plugin_impl.cpp.
References equals(), KIGFX::VIEW::GetCenter(), m_view, m_viewPosition, and KIGFX::VIEW::SetCenter().
|
overrideprivate |
Definition at line 595 of file nl_gerbview_plugin_impl.cpp.
void NL_GERBVIEW_PLUGIN_IMPL::SetCanvas | ( | EDA_DRAW_PANEL_GAL * | aViewport | ) |
Sets the viewport controlled by the SpaceMouse.
aViewport | is the viewport to be navigated. |
Definition at line 75 of file nl_gerbview_plugin_impl.cpp.
References exportCommandsAndImages(), KIGFX::VIEW::GetBoundary(), EDA_DRAW_PANEL_GAL::GetView(), BOX2< Vec >::GetWidth(), m_view, m_viewport2D, and m_viewportWidth.
void NL_GERBVIEW_PLUGIN_IMPL::SetFocus | ( | bool | aFocus | ) |
Set the connection to the 3Dconnexion driver to the focus state so that 3DMouse data is routed here.
aFocus | is true to set the connection active. |
Definition at line 107 of file nl_gerbview_plugin_impl.cpp.
References m_logTrace.
|
overrideprivate |
Definition at line 571 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 577 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 583 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 589 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 488 of file nl_gerbview_plugin_impl.cpp.
References m_isMoving.
|
overrideprivate |
Definition at line 547 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 559 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 529 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 482 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 496 of file nl_gerbview_plugin_impl.cpp.
References EDA_DRAW_PANEL_GAL::ForceRefresh(), and m_viewport2D.
|
overrideprivate |
Definition at line 336 of file nl_gerbview_plugin_impl.cpp.
References equals(), KIGFX::VIEW::GetCenter(), KIGFX::VIEW::GetScale(), KIGFX::VIEW::GetViewport(), BOX2< Vec >::GetWidth(), m_view, m_viewportWidth, scale, and KIGFX::VIEW::SetScale().
|
overrideprivate |
Definition at line 359 of file nl_gerbview_plugin_impl.cpp.
|
overrideprivate |
Definition at line 365 of file nl_gerbview_plugin_impl.cpp.
|
private |
Definition at line 134 of file nl_gerbview_plugin_impl.h.
Referenced by SetMotionFlag().
|
private |
Definition at line 133 of file nl_gerbview_plugin_impl.h.
Referenced by GetCameraMatrix(), GetModelExtents(), GetPointerPosition(), GetViewExtents(), SetCameraMatrix(), SetCanvas(), and SetViewExtents().
|
private |
Definition at line 132 of file nl_gerbview_plugin_impl.h.
Referenced by GetModelExtents(), GetPointerPosition(), GetViewExtents(), SetActiveCommand(), SetCanvas(), and SetTransaction().
|
mutableprivate |
Definition at line 135 of file nl_gerbview_plugin_impl.h.
Referenced by GetViewExtents(), SetCanvas(), and SetViewExtents().
|
mutableprivate |
Definition at line 136 of file nl_gerbview_plugin_impl.h.
Referenced by GetCameraMatrix(), and SetCameraMatrix().