Commit Graph

592 Commits

Author SHA1 Message Date
Simon Richter 70b3edd06f Drop unnecessary and possibly harmful optimization setting
Using -O3 is default for release builds with gcc/clang anyway, so this
doesn't gain anything, but overwriting the existing flags might remove some
that might be needed.
2017-02-23 14:44:15 -05:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Cirilo Bernardo 2b2b73ee4b Fix bug: Footprint add 3D shape recognizes only files with lower case ext on Windows
Fixes: lp:1659027
https://bugs.launchpad.net/kicad/+bug/1659027
2017-02-22 10:22:33 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
jean-pierre charras 1e242f3710 Remove a #define used in a debug session, and now useless in panel_prev_model.* 2017-02-19 08:30:34 +01:00
Mario Luzeiro 2a793cc22c Remove mm_malloc from raytracer
There is no need to use mm_malloc at this moment. Explanation:
1) It was planned that there was advantadge to use aligned memory but it
was not measured the performance. 2) aligned memory is needed for use
with SIMD (i.e: SSE) but that is not used at moment.

Fixes: lp:1626278
https://bugs.launchpad.net/kicad/+bug/1626278
2017-02-13 10:08:20 -05:00
jean-pierre charras 9074c57a28 panel_prev_model.cpp: try a better way to fix issue with wxSpinButtons on Linux. 2017-02-07 11:05:08 +01:00
jean-pierre charras fec02f6161 panel_prev_model.cpp: Fix a minor issue on Linux with wxSpinButtons.
The min and max values must be set, and the curr value forced to 0, to avoid disabling up or down arrows.
2017-02-07 10:26:03 +01:00
jean-pierre charras 42c9e4d602 panel_prev_model.*: fix minor issues. 2017-02-07 09:06:43 +01:00
jean-pierre charras cca0ffed60 panel_prev_3d: Add spin buttons and inc/dec by mouse wheel for 3D parameters 2017-02-07 09:06:43 +01:00
jean-pierre charras 43cb4560bf Rewrite code for PANEL_PREV_3D because the way events were previously managed are not compatible with a good mouse event management.
To avoid a lot of tedious code, wxFormbuilder is used to create the PANEL_PREV_3D_BASE class.
2017-02-07 09:06:42 +01:00
Forrest Voight bce04c930d 3d-viewer: draw dimension graphics
Fixes: lp:1406754
* https://bugs.launchpad.net/kicad/+bug/1406754
2017-02-01 09:45:32 -05:00
Mario Luzeiro 840bcb5189 3D-Viewer: improvements on reflections and on plastic normal texture
+ make the number of samples for reflection and refraction
parameterizable.
+ add some fuziness to reflection.
+ improvements on plastic normal texture
2017-01-26 07:22:46 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
Mario Luzeiro 33449216b5 3D-Viewer: Improvements on reflection and refraction
- crete an option for absorvance (works better to make the epoxy
different for regular transparent materials).
- visual fix an issue related with the epoxy render (square bands on the
render).
- fix a reflection issue (it was not take in account the reflection
material color).
2017-01-21 09:21:44 -05:00
Mario Luzeiro 2eb840b2ed 3D-Viewer: Fix precision issues (experienced on isometric mode) in frustum tests 2017-01-18 18:09:27 -05:00
Baranovskiy Konstantin 3dc2050498 Improved MousewheelPAN mode. 2017-01-17 16:34:11 -05:00
Simon Wells 19512b46a3 Fix unlimited zoom with "Use touchpad to pan"
Additionally, fix an unreported bug allowing zoom level to get stuck at
MAX_ZOOM.

Fixes: lp:1625754 (3dviewer zoom not limited with Use touchpad to pan)
https://bugs.launchpad.net/kicad/+bug/1625754
2017-01-14 09:17:56 -05:00
jean-pierre charras d56a49d218 Performance counter rework: More comments, code cleaning, and move GetRunningMicroSecs() prototype from common.h to profile.h.
profile.h should now contain all info for profiling.
2017-01-02 13:49:36 +01:00
Chris Pavlina 6078ca85e5 Improve broken edge outline error message 2016-12-29 12:31:12 -05:00
Mario Luzeiro d365dc590e Soft plastic textures even more 2016-12-22 16:18:38 -05:00
Mario Luzeiro b33e42ef2c Soft plastic textures 2016-12-22 16:18:30 -05:00
Mario Luzeiro ad2458056a Improvements on 3DViewer raytracing render
+ Implement sRGB to Linear and Linear to sRGB conversions.
+ Fix an issue in the AntiAliasing adaptive logic.
+ Improves the ambient color use on the shader.
+ Improves post-shader calculation. Fixes the saturated dark regions.
+ Improves the transparency of soldermak material.
2016-12-22 16:18:20 -05:00
Chris Pavlina 4c340cefee Also rename footprint attributes in 3D viewer
Follow-up to commit: 809e71a
2016-12-15 14:48:14 -05:00
Mario Luzeiro 86dcfeb69d improve anti-aliasing
+re-implement anti-aliasing, making it more acurate, not blured, better
and much faster (unsing much less lines of code)
+rewrite some function on camera and raypacket.
+small improvements on raytracing realtime, remove useless ifs
comparisons.
2016-10-27 10:22:21 -04:00
Simon Richter 6000336fe7 Add missing include
std::iota is defined in <numeric>
2016-10-10 19:44:46 -04:00
Mario Luzeiro 6d27087053 Improve board texture (make it square), add directional light to top/bot. 2016-10-09 11:34:28 -04:00
Mario Luzeiro f59bde8cc3 Improve brushed and plastic textures 2016-10-09 11:34:20 -04:00
Mario Luzeiro ae8c62843e Raytracing: implement brushed metal perturbator 2016-10-09 11:34:09 -04:00
Mario Luzeiro 995fde8d9c (forget to staged modified files) 2016-10-09 11:33:53 -04:00
Mario Luzeiro 8493a2f6d5 Raytracing: implement textures based on normal perturbation
Implement normal perturbation for black epoxy and color plastic.
Fix some UI issues in 3D-Viewer (menu options was not proper saved or
updated)
2016-10-09 11:33:25 -04:00
Mario Luzeiro ee71875b4b Implement normal perturbation materials on raytracing 2016-10-09 11:33:16 -04:00
Mario Luzeiro 89bb47ede6 Improve shadow on postshader and add a gamma sRGB color space convertion 2016-10-09 11:33:09 -04:00
Mario Luzeiro 49dce5d191 Improve shadow calculation on Raytracing
Makes it not so dark.
Speed optimization on post shader calculation.
2016-10-09 11:32:59 -04:00
Chris Pavlina 278ee7da7d Remove deprecated 'register' storage spec 2016-09-30 22:32:24 -04:00
Chris Pavlina b9abcc309f Fix Validate hiding overloaded virtual in 3D viewer dialog 2016-09-30 22:32:24 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Cirilo Bernardo d3771d53ef Updated VRML exporter and fixed some VRML related bugs 2016-09-21 09:31:52 -04:00
José Ignacio Romero cd976d36b7 Use a symmetrical clip plane for the orthographic projection 2016-09-07 01:12:01 -04:00
José Ignacio Romero df40159ce7 Pixel perfect panning for the 3D viewer
Use the correct math to unproject the mouse movement from screen space
to the Z=0 plane on the camera space. This handles both perspective
and orthographic projection at any window size or zoom level.
2016-09-06 20:10:51 -04:00
Chris Pavlina 378def4734 3D viewer: suggest correct extension when saving image
Fixes: lp:1620102
* https://bugs.launchpad.net/kicad/+bug/1620102
2016-09-06 01:15:59 -04:00
Chris Pavlina 20aca7d7bb Fix direction of ctrl+scroll in 3D viewer
Fixes: lp:1620453
* https://bugs.launchpad.net/kicad/+bug/1620453
2016-09-06 00:48:27 -04:00
Chris Pavlina 9740d5e433 Fix nonstandard, unsigned OpenMP loop counter
OpenMP does not yet permit unsigned loop counters. Most compilers seem
to allow them anyway, but a few have been seen to complain.

Mistake introduced in:
    commit 82ed0fde32
    Author: Chris Pavlina <pavlina.chris@gmail.com>
    Date:   Sun Aug 28 02:05:49 2016 -0400

    Fix shared data access in raytracer, tidy up render loop
2016-09-04 21:41:09 -04:00
Wayne Stambaugh cbcb3b896b Fix incorrect string translation macros.
* Replace _T() with _() for translatable strings.

* Don't translate debug messages.

* Don't translate copyright symbol.
2016-09-03 12:10:49 -04:00
Chris Pavlina 82ed0fde32 Fix shared data access in raytracer, tidy up render loop
Render loop lost track of which blocks had been rendered due to a
synchronization issue. Specifically, std::vector<bool> is special-cased
as a bitfield and so is pretty much guaranteed not to be atomic unless
synchronized externally.

Also:

- Clean up types of a few variables
- Clean up openmp sharing type of variables (may result in better
  optimization)
- Replace shared rendered block count with an openmp reduction (results
  in fewer locks)

Fixes: lp:1608289
* https://bugs.launchpad.net/kicad/+bug/1608289
2016-08-28 02:13:55 -04:00
jean-pierre charras 9f46d83175 Gerbview: locate item now does not take in account not visible layers. Remove an unused file
3d viewer: Remove a few ToUTF8() bad  usage (replaced by GetData() )
2016-08-19 09:45:59 +02:00
jean-pierre charras 3f1a90c8a4 3D viewer; Fix a few incorrect use of ToUTF8() in log and error messages. Only noticeable when messages contain non ASCII7 chars. 2016-08-17 09:37:51 +02:00
jean-pierre charras 7bc8cb56e0 Fix bug: Impossible to rescale 3D models 2016-08-05 21:30:23 +02:00
jean-pierre charras f029047a97 Uncrustify cbbox_ray.cpp to avoid a lot of warnings on gcc 6.1 2016-07-27 14:52:04 +02:00