KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_preview_3d_model.cpp File Reference
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <cmath>
#include "panel_preview_3d_model.h"
#include <dialogs/dialog_unit_entry.h>
#include <libeval/numeric_evaluator.h>
#include <3d_canvas/eda_3d_canvas.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tools/eda_3d_actions.h>
#include <tools/eda_3d_controller.h>
#include <base_units.h>
#include <bitmaps.h>
#include <board.h>
#include <common_ogl/ogl_attr_list.h>
#include <dpi_scaling_common.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_3d_body.h>
#include <3d_math.h>
#include <core/profile.h>
#include <geometry/shape_poly_set.h>
#include <widgets/text_ctrl_eval.h>
#include <libraries/library_manager.h>
#include <footprint_library_adapter.h>
#include <scoped_set_reset.h>
#include <wildcards_and_files_ext.h>
#include <wx/filename.h>
#include <limits>
#include <lset.h>
#include <pgm_base.h>
#include <project_pcb.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <widgets/wx_infobar.h>
#include <widgets/std_bitmap_button.h>
#include <eda_3d_viewer_settings.h>
#include <board_design_settings.h>
#include <3d_navlib/nl_footprint_properties_plugin.h>

Go to the source code of this file.

Functions

static wxString evaluateTextCtrl (const wxString &aValue)
 
static double normalizeRotation (double aRotation)
 Normalize a rotation in degrees to the half-open range (-MAX_ROTATION, MAX_ROTATION].
 
static double rotationFromString (const wxString &aValue)
 

Variables

static constexpr double ALIGN_ANIMATION_SECONDS = 1.0
 Duration and frame interval of the slide from the old placement to the aligned one.
 
static constexpr int ALIGN_ANIMATION_INTERVAL_MS = 16
 

Function Documentation

◆ evaluateTextCtrl()

static wxString evaluateTextCtrl ( const wxString & aValue)
static

◆ normalizeRotation()

static double normalizeRotation ( double aRotation)
static

Normalize a rotation in degrees to the half-open range (-MAX_ROTATION, MAX_ROTATION].

Matches the convention used by EDA_ANGLE::Normalize180(), so 198 maps to -162 and 540 maps to 180.

Definition at line 101 of file panel_preview_3d_model.cpp.

References MAX_ROTATION, and normalized().

Referenced by PANEL_PREVIEW_3D_MODEL::applyAlignment(), PANEL_PREVIEW_3D_MODEL::doIncrementRotation(), PANEL_PREVIEW_3D_MODEL::onMouseWheelRot(), and rotationFromString().

◆ rotationFromString()

Variable Documentation

◆ ALIGN_ANIMATION_INTERVAL_MS

int ALIGN_ANIMATION_INTERVAL_MS = 16
staticconstexpr

◆ ALIGN_ANIMATION_SECONDS

double ALIGN_ANIMATION_SECONDS = 1.0
staticconstexpr

Duration and frame interval of the slide from the old placement to the aligned one.

Definition at line 71 of file panel_preview_3d_model.cpp.

Referenced by PANEL_PREVIEW_3D_MODEL::tickAlignmentAnimation().