KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_preview_3d_model.cpp File Reference

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 100 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 70 of file panel_preview_3d_model.cpp.

Referenced by PANEL_PREVIEW_3D_MODEL::tickAlignmentAnimation().