KiCad PCB EDA Suite
|
The class that implements the accessors and mutators required for 3D navigation in an EDA_3D_CANVAS using a SpaceMouse. More...
#include <nl_3d_viewer_plugin_impl.h>
Public Member Functions | |
NL_3D_VIEWER_PLUGIN_IMPL (EDA_3D_CANVAS *aCanvas) | |
Initializes a new instance of the NL_3DVIEWER_PLUGIN. More... | |
virtual | ~NL_3D_VIEWER_PLUGIN_IMPL () |
void | SetFocus (bool aFocus=true) |
Set the connection to the 3Dconnexion driver to the focus state so that 3DMouse data is routed here. More... | |
Private Member Functions | |
void | exportCommandsAndImages () |
Export the invocable actions and images to the 3Dconnexion UI. More... | |
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_3D_CANVAS * | m_canvas |
TRACK_BALL * | m_camera |
bool | m_capIsMoving |
double | m_newWidth |
SFVEC3F | m_rayOrigin |
SFVEC3F | m_rayDirection |
glm::mat4 | m_cameraMatrix |
Static Private Attributes | |
static const wxChar * | m_logTrace = wxT( "KI_TRACE_NL_3D_VIEWER_PLUGIN" ) |
Trace mask used to enable or disable the trace output of this class. More... | |
The class that implements the accessors and mutators required for 3D navigation in an EDA_3D_CANVAS using a SpaceMouse.
Definition at line 52 of file nl_3d_viewer_plugin_impl.h.
NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL | ( | EDA_3D_CANVAS * | aCanvas | ) |
Initializes a new instance of the NL_3DVIEWER_PLUGIN.
aCanvas | is the viewport to be navigated. |
Definition at line 75 of file nl_3d_viewer_plugin_impl.cpp.
References exportCommandsAndImages(), HIDPI_GL_3D_CANVAS::GetCamera(), m_camera, and m_canvas.
|
virtual |
Definition at line 92 of file nl_3d_viewer_plugin_impl.cpp.
|
private |
Export the invocable actions and images to the 3Dconnexion UI.
Definition at line 146 of file nl_3d_viewer_plugin_impl.cpp.
References add_category(), ACTION_MANAGER::GetActionList(), TOOL_ACTION::GetDescription(), TOOL_ACTION::GetIcon(), TOOL_ACTION::GetLabel(), TOOL_ACTION::GetName(), TOOL_ACTION::GetToolName(), image, KiBitmap(), m_logTrace, and name.
Referenced by NL_3D_VIEWER_PLUGIN_IMPL().
|
overrideprivate |
Definition at line 239 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA::GetViewMatrix(), m_camera, and m_cameraMatrix.
|
overrideprivate |
Definition at line 650 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 643 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 495 of file nl_3d_viewer_plugin_impl.cpp.
References RAY::at(), BOARD_ADAPTER::GetBBox(), EDA_3D_CANVAS::GetBoardAdapter(), RAY::Init(), BBOX_3D::Intersect(), m_canvas, m_rayDirection, and m_rayOrigin.
|
overrideprivate |
Definition at line 429 of file nl_3d_viewer_plugin_impl.cpp.
References empty().
|
overrideprivate |
Definition at line 304 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA::GetProjection(), and m_camera.
|
overrideprivate |
Definition at line 658 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 406 of file nl_3d_viewer_plugin_impl.cpp.
References BOARD_ADAPTER::GetBBox(), EDA_3D_CANVAS::GetBoardAdapter(), m_canvas, BBOX_3D::Max(), and BBOX_3D::Min().
|
overrideprivate |
Definition at line 443 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA::GetLookAtPos(), and m_camera.
|
overrideprivate |
Definition at line 477 of file nl_3d_viewer_plugin_impl.cpp.
References EDA_3D_CANVAS::GetRender3dmousePivot(), and m_canvas.
|
overrideprivate |
Definition at line 251 of file nl_3d_viewer_plugin_impl.cpp.
References m_camera, and CAMERA::MakeRayAtCurrentMousePosition().
|
overrideprivate |
Definition at line 417 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 423 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 262 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA_FRUSTUM::farD, CAMERA_FRUSTUM::fh, CAMERA_FRUSTUM::fw, CAMERA::GetFrustum(), CAMERA::GetProjection(), m_camera, and CAMERA_FRUSTUM::nearD.
|
overrideprivate |
Definition at line 279 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA_FRUSTUM::angle, CAMERA::GetFrustum(), and m_camera.
|
overrideprivate |
Definition at line 288 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA_FRUSTUM::farD, CAMERA::GetFrustum(), CAMERA::GetProjection(), m_camera, CAMERA_FRUSTUM::nearD, CAMERA_FRUSTUM::nh, and CAMERA_FRUSTUM::nw.
|
overrideprivate |
Definition at line 453 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 544 of file nl_3d_viewer_plugin_impl.cpp.
References ACTION_MANAGER::GetActionList(), TOOL_MANAGER::GetActionManager(), ACTION_MANAGER::GetCondition(), TOOLS_HOLDER::GetCurrentSelection(), TOOL_ACTION::GetName(), TOOL_MANAGER::GetToolHolder(), m_canvas, EDA_3D_CANVAS::Request_refresh(), and TOOL_MANAGER::RunAction().
|
overrideprivate |
Definition at line 312 of file nl_3d_viewer_plugin_impl.cpp.
References equals(), CAMERA::GetLookAtPos(), CAMERA::GetProjection(), CAMERA::GetViewMatrix(), m_camera, m_cameraMatrix, CAMERA::SetViewMatrix(), and CAMERA::Update().
|
overrideprivate |
Definition at line 637 of file nl_3d_viewer_plugin_impl.cpp.
void NL_3D_VIEWER_PLUGIN_IMPL::SetFocus | ( | bool | aFocus = true | ) |
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 98 of file nl_3d_viewer_plugin_impl.cpp.
References m_logTrace.
Referenced by NL_3D_VIEWER_PLUGIN::SetFocus().
|
overrideprivate |
Definition at line 516 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 522 of file nl_3d_viewer_plugin_impl.cpp.
References m_rayDirection.
|
overrideprivate |
Definition at line 530 of file nl_3d_viewer_plugin_impl.cpp.
References m_rayOrigin.
|
overrideprivate |
Definition at line 538 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 614 of file nl_3d_viewer_plugin_impl.cpp.
References m_capIsMoving.
|
overrideprivate |
Definition at line 461 of file nl_3d_viewer_plugin_impl.cpp.
References m_camera, m_canvas, EDA_3D_CANVAS::Request_refresh(), EDA_3D_CANVAS::Set3dmousePivotPos(), and CAMERA::SetLookAtPos_T1().
|
overrideprivate |
Definition at line 485 of file nl_3d_viewer_plugin_impl.cpp.
References m_canvas, EDA_3D_CANVAS::Request_refresh(), and EDA_3D_CANVAS::SetRender3dmousePivot().
|
overrideprivate |
Definition at line 437 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 608 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 622 of file nl_3d_viewer_plugin_impl.cpp.
References m_canvas, m_logTrace, and EDA_3D_CANVAS::Request_refresh().
|
overrideprivate |
Definition at line 370 of file nl_3d_viewer_plugin_impl.cpp.
References CAMERA::GetFrustum(), CAMERA::GetViewMatrix(), CAMERA::GetZoom(), m_camera, m_cameraMatrix, CAMERA_FRUSTUM::nw, zoom, and CAMERA::Zoom().
|
overrideprivate |
Definition at line 394 of file nl_3d_viewer_plugin_impl.cpp.
|
overrideprivate |
Definition at line 400 of file nl_3d_viewer_plugin_impl.cpp.
|
private |
Definition at line 116 of file nl_3d_viewer_plugin_impl.h.
Referenced by GetCameraMatrix(), GetIsViewPerspective(), GetPivotPosition(), GetPointerPosition(), GetViewExtents(), GetViewFOV(), GetViewFrustum(), NL_3D_VIEWER_PLUGIN_IMPL(), SetCameraMatrix(), SetPivotPosition(), and SetViewExtents().
|
mutableprivate |
Definition at line 124 of file nl_3d_viewer_plugin_impl.h.
Referenced by GetCameraMatrix(), SetCameraMatrix(), and SetViewExtents().
|
private |
Definition at line 115 of file nl_3d_viewer_plugin_impl.h.
Referenced by GetHitLookAt(), GetModelExtents(), GetPivotVisible(), NL_3D_VIEWER_PLUGIN_IMPL(), SetActiveCommand(), SetPivotPosition(), SetPivotVisible(), and SetTransaction().
|
private |
Definition at line 117 of file nl_3d_viewer_plugin_impl.h.
Referenced by SetMotionFlag().
|
private |
Definition at line 118 of file nl_3d_viewer_plugin_impl.h.
|
private |
Definition at line 120 of file nl_3d_viewer_plugin_impl.h.
Referenced by GetHitLookAt(), and SetHitDirection().
|
private |
Definition at line 119 of file nl_3d_viewer_plugin_impl.h.
Referenced by GetHitLookAt(), and SetHitLookFrom().