KiCad PCB EDA Suite
cinfo3d_visu.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
5  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #include "../3d_rendering/ccamera.h"
31 #include "cinfo3d_visu.h"
33 #include <class_board.h>
34 #include <3d_math.h>
35 #include "3d_fastmath.h"
37 
44 const wxChar *CINFO3D_VISU::m_logTrace = wxT( "KI_TRACE_EDA_CINFO3D_VISU" );
45 
46 
48 
49 
51  m_currentCamera( m_trackBallCamera ),
52  m_trackBallCamera( RANGE_SCALE_3D )
53 {
54  wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::CINFO3D_VISU" ) );
55 
56  m_board = NULL;
57  m_3d_model_manager = NULL;
59  m_drawFlags.resize( FL_LAST, false );
60 
63 
64  m_boardPos = wxPoint();
65  m_boardSize = wxSize();
66  m_boardCenter = SFVEC3F( 0.0f );
67 
70 
71  m_layers_container2D.clear();
72  m_layers_holes2D.clear();
75 
77  m_epoxyThickness3DU = 0.0f;
78  m_copperThickness3DU = 0.0f;
80  m_biuTo3Dunits = 1.0;
81 
83  m_stats_nr_vias = 0;
85  m_stats_nr_holes = 0;
88 
91 
92 
93  memset( m_layerZcoordTop, 0, sizeof( m_layerZcoordTop ) );
94  memset( m_layerZcoordBottom, 0, sizeof( m_layerZcoordBottom ) );
95 
98  SetFlag( FL_SHOW_BOARD_BODY, true );
103  SetFlag( FL_ZONE, true );
104  SetFlag( FL_SILKSCREEN, true );
105  SetFlag( FL_SOLDERMASK, true );
106 
107  m_BgColorBot = SFVEC3D( 0.4, 0.4, 0.5 );
108  m_BgColorTop = SFVEC3D( 0.8, 0.8, 0.9 );
109  m_BoardBodyColor = SFVEC3D( 0.4, 0.4, 0.5 );
110  m_SolderMaskColor = SFVEC3D( 0.1, 0.2, 0.1 );
111  m_SolderPasteColor = SFVEC3D( 0.4, 0.4, 0.4 );
112  m_SilkScreenColor = SFVEC3D( 0.9, 0.9, 0.9 );
113  m_CopperColor = SFVEC3D( 0.75, 0.61, 0.23 );
114 }
115 
116 
118 {
119  destroyLayers();
120 }
121 
122 
124 {
125  wxASSERT( aLayer < PCB_LAYER_ID_COUNT );
126 
127  DISPLAY3D_FLG flg;
128 
129  // see if layer needs to be shown
130  // check the flags
131  switch( aLayer )
132  {
133  case B_Adhes:
134  case F_Adhes:
135  flg = FL_ADHESIVE;
136  break;
137 
138  case B_Paste:
139  case F_Paste:
140  flg = FL_SOLDERPASTE;
141  break;
142 
143  case B_SilkS:
144  case F_SilkS:
145  flg = FL_SILKSCREEN;
146  break;
147 
148  case B_Mask:
149  case F_Mask:
150  flg = FL_SOLDERMASK;
151  break;
152 
153  case Dwgs_User:
154  case Cmts_User:
156  return false;
157 
158  flg = FL_COMMENTS;
159  break;
160 
161  case Eco1_User:
162  case Eco2_User:
164  return false;
165 
166  flg = FL_ECO;
167  break;
168 
169  case Edge_Cuts:
171  return false;
172 
173  return true;
174  break;
175 
176  case Margin:
178  return false;
179 
180  return true;
181  break;
182 
183  case B_Cu:
184  case F_Cu:
185  return m_board->GetDesignSettings().IsLayerVisible( aLayer ) ||
187  break;
188 
189  default:
190  // the layer is an internal copper layer, used the visibility
191  if( GetFlag( FL_SHOW_BOARD_BODY ) &&
193  {
194  // Do not render internal layers if it is overlap with the board
195  // (on OpenGL render)
196  return false;
197  }
198 
199  return m_board->GetDesignSettings().IsLayerVisible( aLayer );
200  }
201 
202  // The layer has a flag, return the flag
203  return GetFlag( flg );
204 }
205 
206 
208 {
209  wxASSERT( aFlag < FL_LAST );
210 
211  return m_drawFlags[aFlag];
212 }
213 
214 
215 void CINFO3D_VISU::SetFlag( DISPLAY3D_FLG aFlag, bool aState )
216 {
217  wxASSERT( aFlag < FL_LAST );
218 
219  m_drawFlags[aFlag] = aState;
220 }
221 
223 {
224  if( ( ( aModuleAttributs == MOD_DEFAULT ) &&
226  ( ( ( aModuleAttributs & MOD_CMS) == MOD_CMS ) &&
228  ( ( ( aModuleAttributs & MOD_VIRTUAL) == MOD_VIRTUAL ) &&
230  {
231  return true;
232  }
233 
234  return false;
235 }
236 
237 
238 // !TODO: define the actual copper thickness by user
239 #define COPPER_THICKNESS KiROUND( 0.035 * IU_PER_MM ) // for 35 um
240 #define TECH_LAYER_THICKNESS KiROUND( 0.04 * IU_PER_MM )
241 
243 {
244  return COPPER_THICKNESS;
245 }
246 
247 unsigned int CINFO3D_VISU::GetNrSegmentsCircle( float aDiameter3DU ) const
248 {
249  wxASSERT( aDiameter3DU > 0.0f );
250 
251  return GetNrSegmentsCircle( (int)( aDiameter3DU / m_biuTo3Dunits ) );
252 }
253 
254 
255 unsigned int CINFO3D_VISU::GetNrSegmentsCircle( int aDiameterBIU ) const
256 {
257  wxASSERT( aDiameterBIU > 0 );
258 
259  // Require at least 3 segments for a circle
260  return std::max( GetArcToSegmentCount( aDiameterBIU / 2, ARC_HIGH_DEF, 360.0 ), 3 );
261 }
262 
263 
264 double CINFO3D_VISU::GetCircleCorrectionFactor( int aNrSides ) const
265 {
266  wxASSERT( aNrSides >= 3 );
267 
268  return GetCircletoPolyCorrectionFactor( aNrSides );
269 }
270 
271 
272 void CINFO3D_VISU::InitSettings( REPORTER *aStatusTextReporter )
273 {
274  wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::InitSettings" ) );
275 
276  // Calculates the board bounding box
277  // First, use only the board outlines
278  EDA_RECT bbbox = m_board->ComputeBoundingBox( true );
279 
280  // If no outlines, use the board with items
281  if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
282  bbbox = m_board->ComputeBoundingBox( false );
283 
284  // Gives a non null size to avoid issues in zoom / scale calculations
285  if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
286  bbbox.Inflate( Millimeter2iu( 10 ) );
287 
288  m_boardSize = bbbox.GetSize();
289  m_boardPos = bbbox.Centre();
290 
291  wxASSERT( (m_boardSize.x > 0) && (m_boardSize.y > 0) );
292 
293  m_boardPos.y = -m_boardPos.y; // The y coord is inverted in 3D viewer
294 
296 
297  // Ensure the board has 2 sides for 3D views, because it is hard to find
298  // a *really* single side board in the true life...
299  if( m_copperLayersCount < 2 )
301 
302  // Calculate the convertion to apply to all positions.
304 
307 
308  // !TODO: use value defined by user (currently use default values by ctor
311 
312  // Init Z position of each layer
313  // calculate z position for each copper layer
314  // Zstart = -m_epoxyThickness / 2.0 is the z position of the back (bottom layer) (layer id = 31)
315  // Zstart = +m_epoxyThickness / 2.0 is the z position of the front (top layer) (layer id = 0)
316  // all unused copper layer z position are set to 0
317 
318  // ____==__________==________==______ <- Bottom = +m_epoxyThickness / 2.0,
319  // | | Top = Bottom + m_copperThickness
320  // |__________________________________|
321  // == == == == <- Bottom = -m_epoxyThickness / 2.0,
322  // Top = Bottom - m_copperThickness
323 
324  unsigned int layer;
325 
326  for( layer = 0; layer < m_copperLayersCount; ++layer )
327  {
328  m_layerZcoordBottom[layer] = m_epoxyThickness3DU / 2.0f -
329  (m_epoxyThickness3DU * layer / (m_copperLayersCount - 1) );
330 
331  if( layer < (m_copperLayersCount / 2) )
333  else
335  }
336 
337  #define layerThicknessMargin 1.1
338  const float zpos_offset = m_nonCopperLayerThickness3DU * layerThicknessMargin;
339 
340  // Fill remaining unused copper layers and back layer zpos
341  // with -m_epoxyThickness / 2.0
342  for( ; layer < MAX_CU_LAYERS; layer++ )
343  {
344  m_layerZcoordBottom[layer] = -(m_epoxyThickness3DU / 2.0f);
346  }
347 
348  // This is the top of the copper layer thickness.
349  const float zpos_copperTop_back = m_layerZcoordTop[B_Cu];
350  const float zpos_copperTop_front = m_layerZcoordTop[F_Cu];
351 
352  // calculate z position for each non copper layer
353  // Solder mask and Solder paste have the same Z position
354  for( int layer_id = MAX_CU_LAYERS; layer_id < PCB_LAYER_ID_COUNT; ++layer_id )
355  {
356  float zposTop;
357  float zposBottom;
358 
359  switch( layer_id )
360  {
361  case B_Adhes:
362  zposBottom = zpos_copperTop_back - 2.0f * zpos_offset;
363  zposTop = zposBottom - m_nonCopperLayerThickness3DU;
364  break;
365 
366  case F_Adhes:
367  zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
368  zposTop = zposBottom + m_nonCopperLayerThickness3DU;
369  break;
370 
371  case B_Mask:
372  case B_Paste:
373  zposBottom = zpos_copperTop_back;
374  zposTop = zpos_copperTop_back - m_nonCopperLayerThickness3DU;
375  break;
376 
377  case F_Mask:
378  case F_Paste:
379  zposTop = zpos_copperTop_front + m_nonCopperLayerThickness3DU;
380  zposBottom = zpos_copperTop_front;
381  break;
382 
383  case B_SilkS:
384  zposBottom = zpos_copperTop_back - 1.0f * zpos_offset;
385  zposTop = zposBottom - m_nonCopperLayerThickness3DU;
386  break;
387 
388  case F_SilkS:
389  zposBottom = zpos_copperTop_front + 1.0f * zpos_offset;
390  zposTop = zposBottom + m_nonCopperLayerThickness3DU;
391  break;
392 
393  // !TODO: review
394  default:
395  zposTop = zpos_copperTop_front + (layer_id - MAX_CU_LAYERS + 3.0f) * zpos_offset;
396  zposBottom = zposTop - m_nonCopperLayerThickness3DU;
397  break;
398  }
399 
400  m_layerZcoordTop[layer_id] = zposTop;
401  m_layerZcoordBottom[layer_id] = zposBottom;
402  }
403 
404  m_boardCenter = SFVEC3F( m_boardPos.x * m_biuTo3Dunits,
405  m_boardPos.y * m_biuTo3Dunits,
406  0.0f );
407 
408  SFVEC3F boardSize = SFVEC3F( m_boardSize.x * m_biuTo3Dunits,
409  m_boardSize.y * m_biuTo3Dunits,
410  0.0f );
411  boardSize /= 2.0f;
412 
413  SFVEC3F boardMin = (m_boardCenter - boardSize);
414  SFVEC3F boardMax = (m_boardCenter + boardSize);
415 
416  boardMin.z = m_layerZcoordTop[B_Adhes];
417  boardMax.z = m_layerZcoordTop[F_Adhes];
418 
419  m_boardBoudingBox = CBBOX( boardMin, boardMax );
420 
421 #ifdef PRINT_STATISTICS_3D_VIEWER
422  unsigned stats_startCreateBoardPolyTime = GetRunningMicroSecs();
423 #endif
424 
425  if( aStatusTextReporter )
426  aStatusTextReporter->Report( _( "Build board body" ) );
427 
429 
430 #ifdef PRINT_STATISTICS_3D_VIEWER
431  unsigned stats_stopCreateBoardPolyTime = GetRunningMicroSecs();
432  unsigned stats_startCreateLayersTime = stats_stopCreateBoardPolyTime;
433 #endif
434 
435  if( aStatusTextReporter )
436  aStatusTextReporter->Report( _( "Create layers" ) );
437 
438  createLayers( aStatusTextReporter );
439 
440 #ifdef PRINT_STATISTICS_3D_VIEWER
441  unsigned stats_stopCreateLayersTime = GetRunningMicroSecs();
442 
443  printf( "CINFO3D_VISU::InitSettings times\n" );
444  printf( " CreateBoardPoly: %.3f ms\n",
445  (float)( stats_stopCreateBoardPolyTime - stats_startCreateBoardPolyTime ) / 1e3 );
446  printf( " CreateLayers and holes: %.3f ms\n",
447  (float)( stats_stopCreateLayersTime - stats_startCreateLayersTime ) / 1e3 );
448  printf( "\n" );
449 #endif
450 }
451 
452 
454 {
456 
457  wxString errmsg;
458 
459  if( !m_board->GetBoardPolygonOutlines( m_board_poly, /*allLayerHoles,*/ &errmsg ) )
460  {
461  errmsg.append( wxT( "\n\n" ) );
462  errmsg.append( _( "Cannot determine the board outline." ) );
463  wxLogMessage( errmsg );
464  }
465 
466  // Be sure the polygon is strictly simple to avoid issues.
468 
470 }
471 
472 
473 float CINFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped ) const
474 {
475  if( aIsFlipped )
476  {
477  if( GetFlag( FL_SOLDERPASTE ) )
479  else
481  }
482  else
483  {
484  if( GetFlag( FL_SOLDERPASTE ) )
485  return m_layerZcoordTop[F_SilkS];
486  else
487  return m_layerZcoordTop[F_Paste];
488  }
489 }
490 
491 
493 {
494  switch( aCameraType )
495  {
496  case CAMERA_TRACKBALL:
498  break;
499 
500  default:
501  wxLogMessage( wxT( "CINFO3D_VISU::CameraSetType() error: unknown camera type %d" ),
502  (int)aCameraType );
503  break;
504  }
505 }
506 
507 
509 {
510  wxASSERT( aLayerId < PCB_LAYER_ID_COUNT );
511 
512  const COLOR4D color = m_board->Colors().GetLayerColor( aLayerId );
513 
514  return SFVEC3F( color.r, color.g, color.b );
515 }
516 
517 
519 {
520  return GetColor( m_board->Colors().GetItemColor( aItemId ) );
521 }
522 
523 
525 {
526  return SFVEC3F( aColor.r, aColor.g, aColor.b );
527 }
SFVEC3F GetLayerColor(PCB_LAYER_ID aLayerId) const
GetLayerColor - get the technical color of a layer.
void CameraSetType(CAMERA_TYPE aCameraType)
CameraSetType - Set the camera type to use.
void Polygon_Calc_BBox_3DU(const SHAPE_POLY_SET &aPolysList, CBBOX2D &aOutBBox, float aBiuTo3DunitsScale)
Definition: cpolygon2d.cpp:714
Defines math related functions.
int GetArcToSegmentCount(int aRadius, int aErrorMax, double aArcAngleDegree)
wxPoint m_boardPos
center board actual position in board units
Definition: cinfo3d_visu.h:539
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, wxString *aErrorText=NULL)
Function GetBoardPolygonOutlines Extracts the board outlines and build a closed polygon from lines...
const wxSize GetSize() const
Definition: eda_rect.h:101
CBBOX2D m_board2dBBox3DU
2d bouding box of the pcb board in 3d units
Definition: cinfo3d_visu.h:554
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:509
EDA_RECT ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Function ComputeBoundingBox calculates the bounding box containing all board items (or board edge seg...
SFVEC3F GetItemColor(int aItemId) const
GetItemColor - get the technical color of a layer.
Class BOARD to handle a board.
CBBOX m_boardBoudingBox
3d bouding box of the pcb board in 3d units
Definition: cinfo3d_visu.h:551
int color
Definition: DXF_plotter.cpp:62
float m_calc_seg_min_factor3DU
min factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:641
MATERIAL_MODE m_material_mode
mode to render the 3d shape models material
Definition: cinfo3d_visu.h:533
int GetCopperLayerCount() const
Function GetCopperLayerCount.
int GetHeight() const
Definition: eda_rect.h:118
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:77
Handles data related with the board to be visualized.
float m_calc_seg_max_factor3DU
max factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:644
double g
Green component.
Definition: color4d.h:292
int GetCopperThicknessBIU() const
GetCopperThicknessBIU - Get the current copper layer thickness.
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
Definition: cinfo3d_visu.h:63
BOARD * m_board
Current board.
Definition: cinfo3d_visu.h:515
unsigned int m_stats_nr_holes
number of holes in the board
Definition: cinfo3d_visu.h:662
CINFO3D_VISU G_null_CINFO3D_VISU
This is a dummy visualization configuration.
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:503
float m_nonCopperLayerThickness3DU
Non copper layers thickness.
Definition: cinfo3d_visu.h:631
#define COPPER_THICKNESS
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const
Function IsLayerVisible tests whether a given layer is visible.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
std::vector< bool > m_drawFlags
options flags to render the board
Definition: cinfo3d_visu.h:524
CBVHCONTAINER2D m_through_holes_inner
It contains the list of throughHoles of the board, the radius is the inner hole.
Definition: cinfo3d_visu.h:598
float m_stats_via_med_hole_diameter
Computed medium diameter of the via holes in 3D units.
Definition: cinfo3d_visu.h:659
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:504
MAP_CONTAINER_2D m_layers_container2D
It contains the 2d elements of each layer.
Definition: cinfo3d_visu.h:587
float m_epoxyThickness3DU
Epoxy thickness (normalized)
Definition: cinfo3d_visu.h:628
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:505
double b
Blue component.
Definition: color4d.h:293
float m_stats_hole_med_diameter
Computed medium diameter of the holes in 3D units.
Definition: cinfo3d_visu.h:665
COLOR4D GetItemColor(int aItemIdx) const
Function GetItemColor.
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.
Definition: cbbox2d.cpp:88
void createBoardPolygon()
PCB_LAYER_ID
A quick note on layer IDs:
#define layerThicknessMargin
unsigned int m_stats_nr_vias
Nr of vias.
Definition: cinfo3d_visu.h:656
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:569
void createLayers(REPORTER *aStatusTextReporter)
SFVEC3F m_boardCenter
3d center position of the pcb board in 3d units
Definition: cinfo3d_visu.h:545
wxSize m_boardSize
board actual size in board units
Definition: cinfo3d_visu.h:542
Class CINFO3D_VISU Helper class to handle information needed to display 3D board. ...
Definition: cinfo3d_visu.h:70
double m_biuTo3Dunits
Normalization scale to convert board internal units to 3D units to normalize 3D units between -1...
Definition: cinfo3d_visu.h:616
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:538
glm::dvec3 SFVEC3D
Definition: xv3d_types.h:48
a few functions useful in geometry calculations.
MODULE_ATTR_T
Enum MODULE_ATTR_T is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() an...
Definition: class_module.h:74
void Simplify(POLYGON_MODE aFastMode)
Simplifies the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFast...
wxPoint Centre() const
Definition: eda_rect.h:60
SHAPE_POLY_SET m_board_poly
PCB board outline polygon.
Definition: cinfo3d_visu.h:581
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
Definition: cinfo3d_visu.h:673
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:507
bool Is3DLayerEnabled(PCB_LAYER_ID aLayer) const
Is3DLayerEnabled - Check if a layer is enabled.
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:506
SFVEC3F GetColor(COLOR4D aColor) const
GetColor.
default
Definition: class_module.h:76
CCAMERA & m_currentCamera
Holds a pointer to current camera in use.
Definition: cinfo3d_visu.h:637
unsigned int GetNrSegmentsCircle(float aDiameter3DU) const
GetNrSegmentsCircle.
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
float GetModulesZcoord3DIU(bool aIsFlipped) const
GetModulesZcoord3DIU - Get the position of the module in 3d integer units considering if it is flippe...
Use all material properties from model file.
Definition: 3d_enums.h:92
S3D_CACHE * m_3d_model_manager
pointer to the 3d model manager
Definition: cinfo3d_visu.h:518
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:508
double GetCircleCorrectionFactor(int aNrSides) const
GetCircleCorrectionFactor - computes a angle correction factor used when creating circles...
bool ShouldModuleBeDisplayed(MODULE_ATTR_T aModuleAttributs) const
ShouldModuleBeDisplayed - Test if module should be displayed in relation to attributs and the flags...
#define max(a, b)
Definition: auxiliary.h:86
#define TECH_LAYER_THICKNESS
unsigned GetRunningMicroSecs()
Function GetRunningMicroSecs An alternate way to calculate an elapset time (in microsecondes) to clas...
glm::vec3 SFVEC3F
Definition: xv3d_types.h:47
Virtual component: when created by copper shapes on board (Like edge card connectors, mounting hole...)
Definition: class_module.h:79
float m_copperThickness3DU
Copper thickness (normalized)
Definition: cinfo3d_visu.h:625
void RemoveAllContours()
Removes all outlines & holes (clears) the polygon set.
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
float m_stats_track_med_width
Track average width.
Definition: cinfo3d_visu.h:653
unsigned int m_copperLayersCount
Number of copper layers actually used by the board.
Definition: cinfo3d_visu.h:612
MAP_CONTAINER_2D m_layers_holes2D
It contains the holes per each layer.
Definition: cinfo3d_visu.h:590
RENDER_ENGINE m_render_engine
render engine currently on use
Definition: cinfo3d_visu.h:530
int GetWidth() const
Definition: eda_rect.h:117
float m_layerZcoordBottom[PCB_LAYER_ID_COUNT]
Bottom (Start) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:622
COLOR4D GetLayerColor(LAYER_NUM aLayer) const
Function GetLayerColor.
CTRACK_BALL m_trackBallCamera
Definition: cinfo3d_visu.h:638
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
GRID3D_TYPE m_3D_grid_type
Stores the current grid type.
Definition: cinfo3d_visu.h:527
Defines math related functions.
float m_layerZcoordTop[PCB_LAYER_ID_COUNT]
Top (End) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:619
double r
Red component.
Definition: color4d.h:291
CBVHCONTAINER2D m_through_holes_outer
It contains the list of throughHoles of the board, the radius of the hole is inflated with the copper...
Definition: cinfo3d_visu.h:594
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
CAMERA_TYPE
Camera types.
Definition: 3d_enums.h:64
Class CBBOX manages a bounding box defined by two SFVEC3F min max points.
Definition: cbbox.h:40
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.
Definition: cbbox.cpp:98
unsigned int m_stats_nr_tracks
Number of tracks in the board.
Definition: cinfo3d_visu.h:650
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
void InitSettings(REPORTER *aStatusTextReporter)
InitSettings - Function to be called by the render when it need to reload the settings for the board...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
double GetCircletoPolyCorrectionFactor(int aSegCountforCircle)