KiCad PCB EDA Suite
cinfo3d_visu.h
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 #ifndef CINFO3D_VISU_H
31 #define CINFO3D_VISU_H
32 
33 #include <vector>
34 #include "../3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.h"
35 #include "../3d_rendering/3d_render_raytracing/accelerators/ccontainer.h"
36 #include "../3d_rendering/3d_render_raytracing/shapes3D/cbbox.h"
37 #include "../3d_rendering/ccamera.h"
38 #include "../3d_rendering/ctrack_ball.h"
39 #include "../3d_enums.h"
40 #include "../3d_cache/3d_cache.h"
41 
43 #include <class_pad.h>
44 #include <class_track.h>
45 #include <wx/gdicmn.h>
46 #include <pcb_base_frame.h>
47 #include <class_pcb_text.h>
48 #include <class_drawsegment.h>
49 #include <class_dimension.h>
50 #include <class_zone.h>
51 #include <class_module.h>
52 #include <reporter.h>
53 
54 
56 
58 typedef std::map< PCB_LAYER_ID, CBVHCONTAINER2D *> MAP_CONTAINER_2D;
59 
61 typedef std::map< PCB_LAYER_ID, SHAPE_POLY_SET *> MAP_POLY;
62 
66 #define RANGE_SCALE_3D 8.0f
67 
68 
74 {
75  public:
76 
77  CINFO3D_VISU();
78 
79  ~CINFO3D_VISU();
80 
85  void Set3DCacheManager( S3D_CACHE *aCachePointer ) { m_3d_model_manager = aCachePointer; }
86 
92 
98  bool GetFlag( DISPLAY3D_FLG aFlag ) const ;
99 
105  void SetFlag( DISPLAY3D_FLG aFlag, bool aState );
106 
112  bool Is3DLayerEnabled( PCB_LAYER_ID aLayer ) const;
113 
119  bool ShouldModuleBeDisplayed( MODULE_ATTR_T aModuleAttributs ) const;
120 
125  void SetBoard( BOARD *aBoard ) { m_board = aBoard; }
126 
131  const BOARD *GetBoard() const { return m_board; }
132 
133  void SetColorSettings( COLOR_SETTINGS* aSettings ) { m_colors = aSettings; }
134 
141  void InitSettings( REPORTER* aStatusTextReporter, REPORTER* aWarningTextReporter );
142 
147  double BiuTo3Dunits() const { return m_biuTo3Dunits; }
148 
153  const CBBOX &GetBBox3DU() const { return m_boardBoundingBox; }
154 
159  float GetEpoxyThickness3DU() const { return m_epoxyThickness3DU; }
160 
166 
171  float GetCopperThickness3DU() const { return m_copperThickness3DU; }
172 
177  int GetCopperThicknessBIU() const;
178 
183  wxSize GetBoardSizeBIU() const { return m_boardSize; }
184 
189  wxPoint GetBoardPosBIU() const { return m_boardPos; }
190 
195  const SFVEC3F &GetBoardCenter3DU() const { return m_boardCenter; }
196 
204  float GetModulesZcoord3DIU( bool aIsFlipped ) const ;
205 
210  void CameraSetType( CAMERA_TYPE aCameraType );
211 
216  CCAMERA &CameraGet() const { return m_currentCamera; }
217 
222  GRID3D_TYPE GridGet() const { return m_3D_grid_type; }
223 
228  void GridSet( GRID3D_TYPE aGridType ) { m_3D_grid_type = aGridType; }
229 
234  void RenderEngineSet( RENDER_ENGINE aRenderEngine ) { m_render_engine = aRenderEngine; }
235 
241 
246  void MaterialModeSet( MATERIAL_MODE aMaterialMode ) { m_material_mode = aMaterialMode; }
247 
253 
258  const SHAPE_POLY_SET &GetBoardPoly() const { return m_board_poly; }
259 
265  SFVEC3F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
266 
272  SFVEC3F GetItemColor( int aItemId ) const;
273 
279  SFVEC3F GetColor( COLOR4D aColor ) const;
280 
286  float GetLayerTopZpos3DU( PCB_LAYER_ID aLayerId ) const { return m_layerZcoordTop[aLayerId]; }
287 
293  float GetLayerBottomZpos3DU( PCB_LAYER_ID aLayerId ) const { return m_layerZcoordBottom[aLayerId]; }
294 
300 
306 
312 
318 
325 
331 
337 
344 
351 
357 
363 
368  unsigned int GetStats_Nr_Vias() const { return m_stats_nr_vias; }
369 
374  unsigned int GetStats_Nr_Holes() const { return m_stats_nr_holes; }
375 
381 
387 
393 
399  unsigned int GetNrSegmentsCircle( float aDiameter3DU ) const;
400 
406  unsigned int GetNrSegmentsCircle( int aDiameterBIU ) const;
407 
414  double GetCircleCorrectionFactor( int aNrSides ) const;
415 
420  const MAP_POLY &GetPolyMap() const { return m_layers_poly; }
421 
423 
425 
426  private:
432  bool createBoardPolygon();
433  void createLayers( REPORTER *aStatusTextReporter );
434  void destroyLayers();
435 
436  // Helper functions to create the board
437  COBJECT2D *createNewTrack( const TRACK* aTrack , int aClearanceValue ) const;
438 
439  void createNewPadWithClearance( const D_PAD *aPad,
440  CGENERICCONTAINER2D *aDstContainer,
441  wxSize aClearanceValue ) const;
442 
443  COBJECT2D *createNewPadDrill( const D_PAD* aPad, int aInflateValue );
444 
445  void AddPadsShapesWithClearanceToContainer( const MODULE *aModule,
446  CGENERICCONTAINER2D *aDstContainer,
447  PCB_LAYER_ID aLayerId,
448  int aInflateValue,
449  bool aSkipNPTHPadsWihNoCopper );
450 
452  CGENERICCONTAINER2D *aDstContainer,
453  PCB_LAYER_ID aLayerId,
454  int aInflateValue );
455 
456  void AddShapeWithClearanceToContainer( const TEXTE_PCB *aTextPCB,
457  CGENERICCONTAINER2D *aDstContainer,
458  PCB_LAYER_ID aLayerId,
459  int aClearanceValue );
460 
461  void AddShapeWithClearanceToContainer( const DRAWSEGMENT *aDrawSegment,
462  CGENERICCONTAINER2D *aDstContainer,
463  PCB_LAYER_ID aLayerId,
464  int aClearanceValue );
465 
466  void AddShapeWithClearanceToContainer( const DIMENSION *aDimension,
467  CGENERICCONTAINER2D *aDstContainer,
468  PCB_LAYER_ID aLayerId,
469  int aClearanceValue );
470 
471  void AddSolidAreasShapesToContainer( const ZONE_CONTAINER *aZoneContainer,
472  CGENERICCONTAINER2D *aDstContainer,
473  PCB_LAYER_ID aLayerId );
474 
475  void TransformArcToSegments( const wxPoint &aCentre,
476  const wxPoint &aStart,
477  double aArcAngle,
478  int aCircleToSegmentsCount,
479  int aWidth,
480  CGENERICCONTAINER2D *aDstContainer,
481  const BOARD_ITEM &aBoardItem );
482 
483  void buildPadShapeThickOutlineAsSegments( const D_PAD *aPad,
484  CGENERICCONTAINER2D *aDstContainer,
485  int aWidth );
486 
487  // Helper functions to create poly contours
488  void buildPadShapeThickOutlineAsPolygon( const D_PAD *aPad,
489  SHAPE_POLY_SET &aCornerBuffer,
490  int aWidth) const;
491 
492  void transformPadsShapesWithClearanceToPolygon( const PADS &aPads,
493  PCB_LAYER_ID aLayer,
494  SHAPE_POLY_SET &aCornerBuffer,
495  int aInflateValue,
496  bool aSkipNPTHPadsWihNoCopper) const;
497 
498  void transformGraphicModuleEdgeToPolygonSet( const MODULE *aModule,
499  PCB_LAYER_ID aLayer,
500  SHAPE_POLY_SET& aCornerBuffer ) const;
501 
502  void buildPadShapePolygon( const D_PAD *aPad,
503  SHAPE_POLY_SET &aCornerBuffer,
504  wxSize aInflateValue ) const;
505 
506 
507 public:
517 
518 
519 private:
520 
523 
526 
529 
530  // Render options
531 
533  std::vector< bool > m_drawFlags;
534 
537 
540 
543 
544 
545  // Pcb board position
546 
549 
551  wxSize m_boardSize;
552 
555 
556 
557  // Pcb board bounding boxes
558 
561 
564 
567 
570 
573 
576 
579 
582 
585 
588 
589 
590  // 2D element containers
591 
594 
597 
601 
605 
609 
613 
614 
615  // Layers information
616 
618  unsigned int m_copperLayersCount;
619 
623 
626 
629 
632 
635 
638 
639 
640  // Cameras
641 
645 
648 
651 
652 
653  // Statistics
654 
656  unsigned int m_stats_nr_tracks;
657 
660 
662  unsigned int m_stats_nr_vias;
663 
666 
668  unsigned int m_stats_nr_holes;
669 
672 
679  static const wxChar *m_logTrace;
680 
681 };
682 
685 
686 #endif // CINFO3D_VISU_H
std::map< PCB_LAYER_ID, CBVHCONTAINER2D * > MAP_CONTAINER_2D
A type that stores a container of 2d objects for each layer id.
Definition: cinfo3d_visu.h:55
void createNewPadWithClearance(const D_PAD *aPad, CGENERICCONTAINER2D *aDstContainer, wxSize aClearanceValue) const
const SHAPE_POLY_SET & GetThroughHole_Outer_poly_NPTH() const
GetThroughHole_Outer_poly_NPTH -.
Definition: cinfo3d_visu.h:323
void AddShapeWithClearanceToContainer(const TEXTE_PCB *aTextPCB, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aClearanceValue)
ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:60
std::map< PCB_LAYER_ID, SHAPE_POLY_SET * > MAP_POLY
A type that stores polysets for each layer id.
Definition: cinfo3d_visu.h:61
unsigned int GetStats_Nr_Holes() const
GetStats_Nr_Holes - Get statistics of the nr of holes.
Definition: cinfo3d_visu.h:374
void CameraSetType(CAMERA_TYPE aCameraType)
CameraSetType - Set the camera type to use.
const SHAPE_POLY_SET & GetThroughHole_Vias_Inner_poly() const
GetThroughHole_Vias_Inner_poly -.
Definition: cinfo3d_visu.h:349
wxSize GetBoardSizeBIU() const
GetBoardSizeBIU - Get the board size.
Definition: cinfo3d_visu.h:183
TEXTE_PCB class definition.
CBBOX m_boardBoundingBox
3d bounding box of the pcb board in 3d units
Definition: cinfo3d_visu.h:560
COBJECT2D * createNewTrack(const TRACK *aTrack, int aClearanceValue) const
float GetStats_Med_Via_Hole_Diameter3DU() const
GetStats_Med_Via_Hole_Diameter3DU - Average diameter of the via holes.
Definition: cinfo3d_visu.h:380
const SHAPE_POLY_SET & GetThroughHole_Inner_poly() const
GetThroughHole_Inner_poly -.
Definition: cinfo3d_visu.h:362
CBVHCONTAINER2D m_through_holes_vias_outer
It contains the list of throughHoles vias of the board, the radius of the hole is inflated with the c...
Definition: cinfo3d_visu.h:608
wxPoint m_boardPos
center board actual position in board units
Definition: cinfo3d_visu.h:548
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
void GridSet(GRID3D_TYPE aGridType)
GridSet - set the current grid.
Definition: cinfo3d_visu.h:228
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:516
const MAP_CONTAINER_2D & GetMapLayers() const
GetMapLayers - Get the map of container that have the objects per layer.
Definition: cinfo3d_visu.h:299
const CBVHCONTAINER2D & GetThroughHole_Vias_Inner() const
GetThroughHole_Vias_Inner -.
Definition: cinfo3d_visu.h:336
unsigned int GetNrSegmentsCircle(float aDiameter3DU) const
GetNrSegmentsCircle.
SFVEC3D m_SolderMaskColorBot
in realistic mode: solder mask color ( bot )
Definition: cinfo3d_visu.h:511
Class CCAMERA is a virtual class used to derive CCAMERA objects from.
Definition: ccamera.h:79
float m_calc_seg_min_factor3DU
min factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:647
SHAPE_POLY_SET m_through_inner_holes_poly
It contains polygon contours for through holes (inner cylinder)
Definition: cinfo3d_visu.h:578
MATERIAL_MODE m_material_mode
mode to render the 3d shape models material
Definition: cinfo3d_visu.h:542
SFVEC3D m_SolderMaskColorTop
in realistic mode: solder mask color ( top )
Definition: cinfo3d_visu.h:512
const MAP_POLY & GetPolyMapHoles_Inner() const
Definition: cinfo3d_visu.h:422
MAP_POLY m_layers_inner_holes_poly
It contains polygon contours for holes of each layer (inner holes)
Definition: cinfo3d_visu.h:569
void TransformArcToSegments(const wxPoint &aCentre, const wxPoint &aStart, double aArcAngle, int aCircleToSegmentsCount, int aWidth, CGENERICCONTAINER2D *aDstContainer, const BOARD_ITEM &aBoardItem)
float m_calc_seg_max_factor3DU
max factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:650
GRID3D_TYPE GridGet() const
GridGet - get the current grid.
Definition: cinfo3d_visu.h:222
const MAP_CONTAINER_2D & GetMapLayersHoles() const
GetMapLayersHoles -Get the map of container that have the holes per layer.
Definition: cinfo3d_visu.h:305
void SetColorSettings(COLOR_SETTINGS *aSettings)
Definition: cinfo3d_visu.h:133
BOARD * m_board
Current board.
Definition: cinfo3d_visu.h:522
unsigned int m_stats_nr_holes
number of holes in the board
Definition: cinfo3d_visu.h:668
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:508
SFVEC3D m_SilkScreenColorTop
in realistic mode: SilkScreen color ( top )
Definition: cinfo3d_visu.h:515
float m_nonCopperLayerThickness3DU
Non copper layers thickness.
Definition: cinfo3d_visu.h:637
S3D_CACHE.
Definition: 3d_cache.h:54
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
std::vector< bool > m_drawFlags
options flags to render the board
Definition: cinfo3d_visu.h:533
CBVHCONTAINER2D m_through_holes_inner
It contains the list of throughHoles of the board, the radius is the inner hole.
Definition: cinfo3d_visu.h:604
float m_stats_via_med_hole_diameter
Computed medium diameter of the via holes in 3D units.
Definition: cinfo3d_visu.h:665
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:509
void MaterialModeSet(MATERIAL_MODE aMaterialMode)
MaterialModeSet.
Definition: cinfo3d_visu.h:246
SFVEC3F GetLayerColor(PCB_LAYER_ID aLayerId) const
GetLayerColor - get the technical color of a layer.
float GetLayerBottomZpos3DU(PCB_LAYER_ID aLayerId) const
GetLayerBottomZpos3DU - Get the bottom z position.
Definition: cinfo3d_visu.h:293
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
MAP_CONTAINER_2D m_layers_container2D
It contains the 2d elements of each layer.
Definition: cinfo3d_visu.h:593
float m_epoxyThickness3DU
Epoxy thickness (normalized)
Definition: cinfo3d_visu.h:634
Definitions for tracks, vias and zones.
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:510
const CBVHCONTAINER2D & GetThroughHole_Vias_Outer() const
GetThroughHole_Vias_Outer -.
Definition: cinfo3d_visu.h:330
double BiuTo3Dunits() const
BiuTo3Dunits - Board integer units To 3D units.
Definition: cinfo3d_visu.h:147
float m_stats_hole_med_diameter
Computed medium diameter of the holes in 3D units.
Definition: cinfo3d_visu.h:671
Classes used in Pcbnew, CvPcb and GerbView.
const SFVEC3F & GetBoardCenter3DU() const
GetBoardCenter - the board center position in 3d units.
Definition: cinfo3d_visu.h:195
SFVEC3F GetItemColor(int aItemId) const
GetItemColor - get the technical color of a layer.
void InitSettings(REPORTER *aStatusTextReporter, REPORTER *aWarningTextReporter)
InitSettings - Function to be called by the render when it need to reload the settings for the board.
const SHAPE_POLY_SET & GetBoardPoly() const
GetBoardPoly - Get the current polygon of the epoxy board.
Definition: cinfo3d_visu.h:258
MATERIAL_MODE MaterialModeGet() const
MaterialModeGet.
Definition: cinfo3d_visu.h:252
void RenderEngineSet(RENDER_ENGINE aRenderEngine)
RenderEngineSet.
Definition: cinfo3d_visu.h:234
DIMENSION class definition.
const BOARD * GetBoard() const
GetBoard - Get current board to be rendered.
Definition: cinfo3d_visu.h:131
PCB_LAYER_ID
A quick note on layer IDs:
MAP_POLY m_layers_poly
It contains polygon contours for each layer.
Definition: cinfo3d_visu.h:563
double GetCircleCorrectionFactor(int aNrSides) const
GetCircleCorrectionFactor - computes a angle correction factor used when creating circles.
SFVEC3D m_SilkScreenColorBot
in realistic mode: SilkScreen color ( bot )
Definition: cinfo3d_visu.h:514
CCAMERA & CameraGet() const
CameraGet - get current camera in use.
Definition: cinfo3d_visu.h:216
SHAPE_POLY_SET m_through_inner_holes_vias_poly
It contains polygon contours for through holes vias (inner cylinder)
Definition: cinfo3d_visu.h:584
int GetCopperThicknessBIU() const
GetCopperThicknessBIU - Get the current copper layer thickness.
unsigned int m_stats_nr_vias
Nr of vias.
Definition: cinfo3d_visu.h:662
SHAPE_POLY_SET.
const MAP_POLY & GetPolyMapHoles_Outer() const
Definition: cinfo3d_visu.h:424
wxPoint GetBoardPosBIU() const
GetBoardPosBIU - Get the board size.
Definition: cinfo3d_visu.h:189
const SHAPE_POLY_SET & GetThroughHole_Outer_poly() const
GetThroughHole_Outer_poly -.
Definition: cinfo3d_visu.h:317
S3D_CACHE * Get3DCacheManager() const
Get3DCacheManager - Return the 3d cache manager pointer.
Definition: cinfo3d_visu.h:91
void createLayers(REPORTER *aStatusTextReporter)
unsigned int GetStats_Nr_Vias() const
GetStats_Nr_Vias - Get statistics of the nr of vias.
Definition: cinfo3d_visu.h:368
SFVEC3F m_boardCenter
3d center position of the pcb board in 3d units
Definition: cinfo3d_visu.h:554
wxSize m_boardSize
board actual size in board units
Definition: cinfo3d_visu.h:551
float GetNonCopperLayerThickness3DU() const
GetNonCopperLayerThickness3DU - Get the current non copper layers thickness.
Definition: cinfo3d_visu.h:165
Class CINFO3D_VISU Helper class to handle information needed to display 3D board.
Definition: cinfo3d_visu.h:73
double m_biuTo3Dunits
Normalization scale to convert board internal units to 3D units to normalize 3D units between -1....
Definition: cinfo3d_visu.h:622
const CBBOX & GetBBox3DU() const
GetBBox3DU - Get the bbox of the pcb board.
Definition: cinfo3d_visu.h:153
glm::dvec3 SFVEC3D
Definition: xv3d_types.h:48
SHAPE_POLY_SET m_through_outer_holes_poly_NPTH
It contains polygon contours for (just) non plated through holes (outer cylinder)
Definition: cinfo3d_visu.h:572
MAP_POLY m_layers_outer_holes_poly
It contains polygon contours for holes of each layer (outer holes)
Definition: cinfo3d_visu.h:566
MODULE_ATTR_T
Enum MODULE_ATTR_T is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() an...
Definition: class_module.h:71
float GetLayerTopZpos3DU(PCB_LAYER_ID aLayerId) const
GetLayerTopZpos3DU - Get the top z position.
Definition: cinfo3d_visu.h:286
float GetEpoxyThickness3DU() const
GetEpoxyThickness3DU - Get the current epoxy thickness.
Definition: cinfo3d_visu.h:159
void AddSolidAreasShapesToContainer(const ZONE_CONTAINER *aZoneContainer, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId)
SHAPE_POLY_SET m_board_poly
PCB board outline polygon.
Definition: cinfo3d_visu.h:587
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
Definition: cinfo3d_visu.h:679
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:96
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:513
SFVEC3F GetColor(COLOR4D aColor) const
GetColor.
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:77
Pad object description.
CINFO3D_VISU G_null_CINFO3D_VISU
This is a dummy visualization configuration.
CCAMERA & m_currentCamera
Holds a pointer to current camera in use.
Definition: cinfo3d_visu.h:643
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:240
const CBVHCONTAINER2D & GetThroughHole_Inner() const
GetThroughHole_Inner - Get the ThroughHole container.
Definition: cinfo3d_visu.h:356
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
const CBVHCONTAINER2D & GetThroughHole_Outer() const
GetThroughHole_Outer - Get the inflated ThroughHole container.
Definition: cinfo3d_visu.h:311
S3D_CACHE * m_3d_model_manager
pointer to the 3d model manager
Definition: cinfo3d_visu.h:525
float GetStats_Med_Track_Width() const
GetStats_Med_Track_Width - Average width of the tracks.
Definition: cinfo3d_visu.h:392
SHAPE_POLY_SET m_through_outer_holes_poly
It contains polygon contours for through holes (outer cylinder)
Definition: cinfo3d_visu.h:575
bool Is3DLayerEnabled(PCB_LAYER_ID aLayer) const
Is3DLayerEnabled - Check if a layer is enabled.
Board layer functions and definitions.
const MAP_POLY & GetPolyMap() const
GetPolyMap - Get maps of polygons's layers.
Definition: cinfo3d_visu.h:420
Class to handle a graphic segment.
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:163
glm::vec3 SFVEC3F
Definition: xv3d_types.h:47
float GetCopperThickness3DU() const
GetCopperThickness3DU - Get the current copper layer thickness.
Definition: cinfo3d_visu.h:171
const SHAPE_POLY_SET & GetThroughHole_Vias_Outer_poly() const
GetThroughHole_Vias_Outer_poly -.
Definition: cinfo3d_visu.h:342
COLOR_SETTINGS * m_colors
pointer to current color settings
Definition: cinfo3d_visu.h:528
float m_copperThickness3DU
Copper thickness (normalized)
Definition: cinfo3d_visu.h:631
float m_stats_track_med_width
Track average width.
Definition: cinfo3d_visu.h:659
unsigned int m_copperLayersCount
Number of copper layers actually used by the board.
Definition: cinfo3d_visu.h:618
MAP_CONTAINER_2D m_layers_holes2D
It contains the holes per each layer.
Definition: cinfo3d_visu.h:596
RENDER_ENGINE m_render_engine
render engine currently on use
Definition: cinfo3d_visu.h:539
void transformGraphicModuleEdgeToPolygonSet(const MODULE *aModule, PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aCornerBuffer) const
float m_layerZcoordBottom[PCB_LAYER_ID_COUNT]
Bottom (Start) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:628
bool createBoardPolygon()
Create the board outline polygon.
CTRACK_BALL m_trackBallCamera
Definition: cinfo3d_visu.h:644
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:88
GRID3D_TYPE m_3D_grid_type
Stores the current grid type.
Definition: cinfo3d_visu.h:536
CBVHCONTAINER2D m_through_holes_vias_inner
It contains the list of throughHoles vias of the board, the radius of the hole.
Definition: cinfo3d_visu.h:612
void buildPadShapeThickOutlineAsPolygon(const D_PAD *aPad, SHAPE_POLY_SET &aCornerBuffer, int aWidth) const
SHAPE_POLY_SET m_through_outer_holes_vias_poly
It contains polygon contours for through holes vias (outer cylinder)
Definition: cinfo3d_visu.h:581
Module description (excepted pads)
float m_layerZcoordTop[PCB_LAYER_ID_COUNT]
Top (End) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:625
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:600
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
bool ShouldModuleBeDisplayed(MODULE_ATTR_T aModuleAttributs) const
ShouldModuleBeDisplayed - Test if module should be displayed in relation to attributs and the flags.
void buildPadShapeThickOutlineAsSegments(const D_PAD *aPad, CGENERICCONTAINER2D *aDstContainer, int aWidth)
COBJECT2D * createNewPadDrill(const D_PAD *aPad, int aInflateValue)
void SetBoard(BOARD *aBoard)
SetBoard - Set current board to be rendered.
Definition: cinfo3d_visu.h:125
CAMERA_TYPE
Camera types.
Definition: 3d_enums.h:70
CBBOX manages a bounding box defined by two SFVEC3F min max points.
Definition: cbbox.h:40
void transformPadsShapesWithClearanceToPolygon(const PADS &aPads, PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aCornerBuffer, int aInflateValue, bool aSkipNPTHPadsWihNoCopper) const
float GetModulesZcoord3DIU(bool aIsFlipped) const
GetModulesZcoord3DIU - Get the position of the module in 3d integer units considering if it is flippe...
float GetStats_Med_Hole_Diameter3DU() const
GetStats_Med_Hole_Diameter3DU - Average diameter of holes.
Definition: cinfo3d_visu.h:386
DIMENSION.
unsigned int m_stats_nr_tracks
Number of tracks in the board.
Definition: cinfo3d_visu.h:656
void AddGraphicsShapesWithClearanceToContainer(const MODULE *aModule, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue)
void buildPadShapePolygon(const D_PAD *aPad, SHAPE_POLY_SET &aCornerBuffer, wxSize aInflateValue) const
void Set3DCacheManager(S3D_CACHE *aCachePointer)
Set3DCacheManager - Update the Cache manager pointer.
Definition: cinfo3d_visu.h:85
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
void AddPadsShapesWithClearanceToContainer(const MODULE *aModule, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue, bool aSkipNPTHPadsWihNoCopper)