KiCad PCB EDA Suite
|
Object to render the board using openGL. More...
#include <render_3d_opengl.h>
Public Member Functions | |
RENDER_3D_OPENGL (EDA_3D_CANVAS *aCanvas, BOARD_ADAPTER &aAdapter, CAMERA &aCamera) | |
~RENDER_3D_OPENGL () | |
void | SetCurWindowSize (const wxSize &aSize) override |
Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed. More... | |
bool | Redraw (bool aIsMoving, REPORTER *aStatusReporter, REPORTER *aWarningReporter) override |
Redraw the view. More... | |
int | GetWaitForEditingTimeOut () override |
Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode). More... | |
void | SetCurrentRollOverItem (BOARD_ITEM *aRollOverItem) |
void | Load3dModelsIfNeeded () |
Load footprint models if they are not already loaded, i.e. More... | |
void | ReloadRequest () |
bool | IsReloadRequestPending () const |
Query if there is a pending reload request. More... | |
void | SetBusyIndicatorFactory (BUSY_INDICATOR::FACTORY aNewFactory) |
Set a new busy indicator factory. More... | |
Protected Member Functions | |
std::unique_ptr< BUSY_INDICATOR > | CreateBusyIndicator () const |
Return a created busy indicator, if a factory has been set, else a null pointer. More... | |
Protected Attributes | |
EDA_3D_CANVAS * | m_canvas |
Settings reference in use for this render. More... | |
BOARD_ADAPTER & | m_boardAdapter |
CAMERA & | m_camera |
Flag if the opengl specific for this render was already initialized. More... | |
bool | m_is_opengl_initialized |
bool | m_reloadRequested |
The window size that this camera is working. More... | |
wxSize | m_windowSize |
Static Protected Attributes | |
static const wxChar * | m_logTrace = wxT( "KI_TRACE_3D_RENDER" ) |
Trace mask used to enable or disable the trace output of this class. More... | |
Private Member Functions | |
OPENGL_RENDER_LIST * | generateHoles (const LIST_OBJECT2D &aListHolesObject2d, const SHAPE_POLY_SET &aPoly, float aZtop, float aZbot, bool aInvertFaces, const BVH_CONTAINER_2D *aThroughHoles=nullptr) |
OPENGL_RENDER_LIST * | generateLayerList (const BVH_CONTAINER_2D *aContainer, const SHAPE_POLY_SET *aPolyList, PCB_LAYER_ID aLayerId, const BVH_CONTAINER_2D *aThroughHoles=nullptr) |
OPENGL_RENDER_LIST * | generateEmptyLayerList (PCB_LAYER_ID aLayerId) |
void | addTopAndBottomTriangles (TRIANGLE_DISPLAY_LIST *aDst, const SFVEC2F &v0, const SFVEC2F &v1, const SFVEC2F &v2, float top, float bot) |
void | addObjectTriangles (const RING_2D *aRing, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot) |
void | addObjectTriangles (const POLYGON_4PT_2D *aPoly, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot) |
void | addObjectTriangles (const FILLED_CIRCLE_2D *aFilledCircle, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot) |
void | addObjectTriangles (const TRIANGLE_2D *aTri, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot) |
void | addObjectTriangles (const ROUND_SEGMENT_2D *aSeg, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot) |
void | renderSolderMaskLayer (PCB_LAYER_ID aLayerID, float aZPosition, bool aDrawMiddleSegments, bool aSkipRenderHoles) |
void | renderBoardBody (bool aSkipRenderHoles) |
void | getLayerZPos (PCB_LAYER_ID aLayerID, float &aOutZtop, float &aOutZbot) const |
void | generateRing (const SFVEC2F &aCenter, float aInnerRadius, float aOuterRadius, unsigned int aNr_sides_per_circle, std::vector< SFVEC2F > &aInnerContourResult, std::vector< SFVEC2F > &aOuterContourResult, bool aInvertOrder) |
void | generateCylinder (const SFVEC2F &aCenter, float aInnerRadius, float aOuterRadius, float aZtop, float aZbot, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer) |
void | generateViasAndPads () |
void | load3dModels (REPORTER *aStatusReporter) |
Load footprint models from the cache and load it to openGL lists in the form of MODEL_3D objects. More... | |
void | render3dModels (bool aRenderTopOrBot, bool aRenderTransparentOnly) |
void | render3dModelsSelected (bool aRenderTopOrBot, bool aRenderTransparentOnly, bool aRenderSelectedOnly) |
void | renderFootprint (const FOOTPRINT *aFootprint, bool aRenderTransparentOnly, bool aIsSelected) |
void | setLightFront (bool enabled) |
void | setLightTop (bool enabled) |
void | setLightBottom (bool enabled) |
void | render3dArrows () |
void | generate3dGrid (GRID3D_TYPE aGridType) |
Create a 3D grid to an OpenGL display list. More... | |
void | setupMaterials () |
void | setCopperMaterial () |
void | setPlatedCopperAndDepthOffset (PCB_LAYER_ID aLayer_id) |
void | unsetDepthOffset () |
void | setLayerMaterial (PCB_LAYER_ID aLayerID) |
SFVEC4F | getLayerColor (PCB_LAYER_ID aLayerID) |
bool | initializeOpenGL () |
OPENGL_RENDER_LIST * | createBoard (const SHAPE_POLY_SET &aBoardPoly, const BVH_CONTAINER_2D *aThroughHoles=nullptr) |
void | reload (REPORTER *aStatusReporter, REPORTER *aWarningReporter) |
void | setArrowMaterial () |
void | freeAllLists () |
Object to render the board using openGL.
Definition at line 52 of file render_3d_opengl.h.
|
explicit |
Definition at line 42 of file render_3d_opengl.cpp.
References m_3dModelMap, m_antiBoard, m_board, m_boardWithHoles, m_circleTexture, m_currentRollOverItem, m_grid, m_innerLayerHoles, m_lastGridType, m_layers, RENDER_3D_BASE::m_logTrace, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, m_triangles, m_vias, and NONE.
RENDER_3D_OPENGL::~RENDER_3D_OPENGL | ( | ) |
Definition at line 74 of file render_3d_opengl.cpp.
References freeAllLists(), m_circleTexture, and RENDER_3D_BASE::m_logTrace.
|
private |
Definition at line 38 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), FILLED_CIRCLE_2D::GetCenter(), FILLED_CIRCLE_2D::GetRadius(), TRIANGLE_DISPLAY_LIST::m_layer_bot_segment_ends, TRIANGLE_DISPLAY_LIST::m_layer_top_segment_ends, and SIZE_OF_CIRCLE_TEXTURE.
|
private |
Definition at line 68 of file opengl/create_scene.cpp.
References addTopAndBottomTriangles(), POLYGON_4PT_2D::GetV0(), POLYGON_4PT_2D::GetV1(), POLYGON_4PT_2D::GetV2(), POLYGON_4PT_2D::GetV3(), v1, v2, and v3.
|
private |
Definition at line 116 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), generateRing(), RING_2D::GetCenter(), BOARD_ADAPTER::GetCircleSegmentCount(), RING_2D::GetInnerRadius(), RING_2D::GetOuterRadius(), RENDER_3D_BASE::m_boardAdapter, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by generateHoles(), and generateLayerList().
|
private |
Definition at line 162 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), TRIANGLE_LIST::AddTriangle(), ROUND_SEGMENT_2D::GetEnd(), ROUND_SEGMENT_2D::GetLeftDir(), ROUND_SEGMENT_2D::GetLeftEnd(), ROUND_SEGMENT_2D::GetLeftStar(), ROUND_SEGMENT_2D::GetRadius(), ROUND_SEGMENT_2D::GetRadiusSquared(), ROUND_SEGMENT_2D::GetRightDir(), ROUND_SEGMENT_2D::GetRightEnd(), ROUND_SEGMENT_2D::GetRightStar(), ROUND_SEGMENT_2D::GetStart(), TRIANGLE_DISPLAY_LIST::m_layer_bot_segment_ends, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, TRIANGLE_DISPLAY_LIST::m_layer_top_segment_ends, TRIANGLE_DISPLAY_LIST::m_layer_top_triangles, and SIZE_OF_CIRCLE_TEXTURE.
|
private |
Definition at line 150 of file opengl/create_scene.cpp.
References addTopAndBottomTriangles(), TRIANGLE_2D::GetP1(), TRIANGLE_2D::GetP2(), TRIANGLE_2D::GetP3(), v1, v2, and v3.
|
private |
Definition at line 691 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, TRIANGLE_DISPLAY_LIST::m_layer_top_triangles, v1, v2, VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
Referenced by addObjectTriangles(), createBoard(), and generateViasAndPads().
|
private |
Definition at line 394 of file opengl/create_scene.cpp.
References TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), addTopAndBottomTriangles(), BOARD_ADAPTER::BiuTo3dUnits(), ConvertPolygonToTriangles(), BOARD_ADAPTER::GetBoard(), CONTAINER_2D_BASE::GetList(), OBJECT_2D::GetObjectType(), TRIANGLE_2D::GetP1(), TRIANGLE_2D::GetP2(), TRIANGLE_2D::GetP3(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, SHAPE_POLY_SET::OutlineCount(), TRIANGLE, v1, v2, and v3.
Referenced by reload().
|
protectedinherited |
Return a created busy indicator, if a factory has been set, else a null pointer.
the canvas to display the scene
Definition at line 70 of file render_3d_base.cpp.
References RENDER_3D_BASE::m_busyIndicatorFactory.
Referenced by Redraw(), and RENDER_3D_RAYTRACE::Redraw().
|
private |
Definition at line 1018 of file render_3d_opengl.cpp.
References m_3dModelMap, m_3dModelMatrixMap, m_antiBoard, m_board, m_boardWithHoles, m_grid, m_innerLayerHoles, m_layers, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, m_triangles, and m_vias.
Referenced by reload(), and ~RENDER_3D_OPENGL().
|
private |
Create a 3D grid to an OpenGL display list.
A horizontal grid (XY plane and Z = 0, and a vertical grid (XZ plane and Y = 0).
Definition at line 1310 of file render_3d_opengl.cpp.
References BOARD_ADAPTER::BiuTo3dUnits(), DARKGRAY, delta, BOARD_ADAPTER::GetBoardPos(), BOARD_ADAPTER::GetBoardSize(), BOARD_ADAPTER::GetColor(), GRID_10MM, GRID_1MM, GRID_2P5MM, GRID_5MM, EDA_IU_SCALE::IU_PER_MM, KiROUND(), LIGHTBLUE, RENDER_3D_BASE::m_boardAdapter, m_grid, EDA_IU_SCALE::mmToIU(), NONE, pcbIUScale, scale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Redraw().
|
private |
Definition at line 719 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), generateRing(), TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by generateViasAndPads().
|
private |
Definition at line 378 of file opengl/create_scene.cpp.
References getLayerZPos(), m_circleTexture, and m_triangles.
Referenced by reload().
|
private |
Definition at line 247 of file opengl/create_scene.cpp.
References addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), BOARD_ADAPTER::BiuTo3dUnits(), FILLED_CIRCLE, OBJECT_2D::GetObjectType(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, SHAPE_POLY_SET::OutlineCount(), and ROUNDSEG.
Referenced by reload().
|
private |
Definition at line 303 of file opengl/create_scene.cpp.
References addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), BOARD_ADAPTER::BiuTo3dUnits(), FILLED_CIRCLE, getLayerZPos(), CONTAINER_2D_BASE::GetList(), OBJECT_2D::GetObjectType(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, m_triangles, SHAPE_POLY_SET::OutlineCount(), POLYGON4PT, RING, ROUNDSEG, and TRIANGLE.
Referenced by reload().
|
private |
Definition at line 82 of file opengl/create_scene.cpp.
References PNS::angle(), and delta.
Referenced by addObjectTriangles(), and generateCylinder().
|
private |
Definition at line 753 of file opengl/create_scene.cpp.
References TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), addTopAndBottomTriangles(), ARC_HIGH_DEF, B_Cu, BOARD_ADAPTER::BiuTo3dUnits(), SHAPE_POLY_SET::BooleanSubtract(), ConvertPolygonToTriangles(), dummy, ERROR_INSIDE, F_Cu, BOARD::Footprints(), generateCylinder(), BOARD_ADAPTER::GetAverageViaHoleDiameter(), BOARD_ADAPTER::GetBoard(), BOARD_ADAPTER::GetCircleSegmentCount(), BOARD_ADAPTER::GetHoleCount(), BOARD_ADAPTER::GetHolePlatingThickness(), getLayerZPos(), CONTAINER_2D_BASE::GetList(), OBJECT_2D::GetObjectType(), TRIANGLE_2D::GetP1(), TRIANGLE_2D::GetP2(), TRIANGLE_2D::GetP3(), BOARD_ADAPTER::GetViaCount(), m_antiBoardPolys, RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, m_circleTexture, m_padHoles, EDA_3D_VIEWER_SETTINGS::m_Render, m_vias, NPTH, SHAPE_POLY_SET::OutlineCount(), pad, PCB_VIA_T, SHAPE_POLY_SET::PM_FAST, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, SHAPE_POLY_SET::RemoveAllContours(), BOARD::Tracks(), TRIANGLE, v1, v2, v3, via, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by reload().
|
private |
Definition at line 394 of file render_3d_opengl.cpp.
References B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, BOARD_ADAPTER::GetLayerColor(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, BOARD_ADAPTER::m_CopperColor, EDA_3D_VIEWER_SETTINGS::m_Render, BOARD_ADAPTER::m_SilkScreenColorBot, BOARD_ADAPTER::m_SilkScreenColorTop, BOARD_ADAPTER::m_SolderMaskColorBot, BOARD_ADAPTER::m_SolderMaskColorTop, BOARD_ADAPTER::m_SolderPasteColor, Margin, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic.
Referenced by setLayerMaterial().
|
private |
Definition at line 705 of file opengl/create_scene.cpp.
References BOARD_ADAPTER::GetLayerBottomZPos(), BOARD_ADAPTER::GetLayerTopZPos(), and RENDER_3D_BASE::m_boardAdapter.
Referenced by generateEmptyLayerList(), generateLayerList(), generateViasAndPads(), and reload().
|
overridevirtual |
Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode).
Implements RENDER_3D_BASE.
Definition at line 84 of file render_3d_opengl.cpp.
|
private |
Definition at line 956 of file render_3d_opengl.cpp.
References IMAGE::CircleFilled(), IMAGE::EfxFilter_SkipCenter(), GAUSSIAN_BLUR, IMAGE::GetHeight(), IMAGE::GetWidth(), IMAGE, init_lights(), m_circleTexture, RENDER_3D_BASE::m_is_opengl_initialized, OglLoadTexture(), and SIZE_OF_CIRCLE_TEXTURE.
Referenced by Redraw().
|
inlineinherited |
Query if there is a pending reload request.
Definition at line 77 of file render_3d_base.h.
References RENDER_3D_BASE::m_reloadRequested.
Referenced by EDA_3D_CANVAS::DoRePaint(), and EDA_3D_CANVAS::IsReloadRequestPending().
|
private |
Load footprint models from the cache and load it to openGL lists in the form of MODEL_3D objects.
This map of models will work as a local cache for this render. (cache based on MODEL_3D with associated openGL lists in GPU memory)
Definition at line 910 of file opengl/create_scene.cpp.
References _, FP_LIB_TABLE::FindRow(), BOARD::Footprints(), Format(), BOARD_ADAPTER::Get3dCacheManager(), BOARD_ADAPTER::GetBoard(), LIB_TABLE_ROW::GetFullURI(), S3D_CACHE::GetModel(), BOARD::GetProject(), m_3dModelMap, RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::material_mode, PROJECT::PcbFootprintLibs(), REPORTER::Report(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_insert, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_normal, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_virtual.
Referenced by Load3dModelsIfNeeded(), and reload().
void RENDER_3D_OPENGL::Load3dModelsIfNeeded | ( | ) |
Load footprint models if they are not already loaded, i.e.
if m_3dModelMap is empty
Definition at line 892 of file opengl/create_scene.cpp.
References ACTIVITY, load3dModels(), m_3dModelMap, and RENDER_3D_BASE::m_canvas.
Referenced by EDA_3D_CONTROLLER::ToggleVisibility().
|
overridevirtual |
Redraw the view.
aIsMoving | if the user is moving the scene, it should be render in preview mode. |
aStatusReporter | a pointer to the status progress reporter. |
Implements RENDER_3D_BASE.
Definition at line 546 of file render_3d_opengl.cpp.
References _, OPENGL_RENDER_LIST::ApplyScalePosition(), B_Cu, B_Mask, B_Paste, B_SilkS, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annulus, RENDER_3D_BASE::CreateBusyIndicator(), OPENGL_RENDER_LIST::DrawAll(), OPENGL_RENDER_LIST::DrawAllCameraCulled(), OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer(), F_Cu, F_Mask, F_Paste, F_SilkS, generate3dGrid(), BOARD_ADAPTER::GetLayerBottomZPos(), BOARD_ADAPTER::GetLayerTopZPos(), CAMERA::GetPos(), CAMERA::GetProjectionMatrix(), CAMERA::GetViewMatrix(), OPENGL_RENDER_LIST::GetZBot(), OPENGL_RENDER_LIST::GetZTop(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, initializeOpenGL(), m_antiBoard, BOARD_ADAPTER::m_BgColorBot, BOARD_ADAPTER::m_BgColorTop, RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_BoardBodyColor, RENDER_3D_BASE::m_camera, BOARD_ADAPTER::m_Cfg, m_circleTexture, m_grid, RENDER_3D_BASE::m_is_opengl_initialized, m_lastGridType, m_layers, m_materials, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, RENDER_3D_BASE::m_reloadRequested, EDA_3D_VIEWER_SETTINGS::m_Render, m_vias, RENDER_3D_BASE::m_windowSize, NONE, OglDrawBackground(), OglResetTextureState(), OglSetMaterial(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_AA_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_holes_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_thickness_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_vias_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, reload(), render3dArrows(), render3dModels(), renderBoardBody(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::renderPlatedPadsAsPlated, renderSolderMaskLayer(), REPORTER::Report(), setCopperMaterial(), setLayerMaterial(), setLightBottom(), setLightFront(), setLightTop(), setPlatedCopperAndDepthOffset(), setupMaterials(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_axis, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk, and unsetDepthOffset().
Definition at line 448 of file opengl/create_scene.cpp.
References _, SHAPE_POLY_SET::Append(), B_Cu, B_Mask, B_SilkS, SHAPE_POLY_SET::BooleanIntersection(), SHAPE_POLY_SET::BooleanSubtract(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annulus, SHAPE_POLY_SET::CloneDropTriangulation(), createBoard(), F_Cu, F_Mask, F_SilkS, Format(), freeAllLists(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generateViasAndPads(), BOARD_ADAPTER::GetBackPlatedPadPolys(), BOARD_ADAPTER::GetBoardCenter(), BOARD_ADAPTER::GetBoardPoly(), BOARD_ADAPTER::GetFrontPlatedPadPolys(), BOARD_ADAPTER::GetHoleIdPolysMap(), BOARD_ADAPTER::GetHoleOdPolysMap(), BOARD_ADAPTER::GetLayerHoleMap(), BOARD_ADAPTER::GetLayerMap(), getLayerZPos(), CONTAINER_2D_BASE::GetList(), BOARD_ADAPTER::GetOuterNonPlatedThroughHolePoly(), BOARD_ADAPTER::GetPlatedPadsBack(), BOARD_ADAPTER::GetPlatedPadsFront(), BOARD_ADAPTER::GetPolyMap(), GetRunningMicroSecs(), BOARD_ADAPTER::GetThroughHoleAnnularRingPolys(), BOARD_ADAPTER::GetThroughHoleAnnularRings(), BOARD_ADAPTER::GetThroughHoleIds(), BOARD_ADAPTER::GetThroughHoleOdPolys(), BOARD_ADAPTER::GetThroughHoleOds(), BOARD_ADAPTER::GetThroughHoleViaOdPolys(), BOARD_ADAPTER::GetThroughHoleViaOds(), BOARD_ADAPTER::InitSettings(), OBJECT_2D_STATS::Instance(), BOARD_ADAPTER::Is3dLayerEnabled(), load3dModels(), m_antiBoard, m_antiBoardPolys, m_board, RENDER_3D_BASE::m_boardAdapter, m_boardWithHoles, RENDER_3D_BASE::m_camera, BOARD_ADAPTER::m_Cfg, m_innerLayerHoles, m_layers, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_platedPadsBack, m_platedPadsFront, RENDER_3D_BASE::m_reloadRequested, EDA_3D_VIEWER_SETTINGS::m_Render, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, SHAPE_POLY_SET::RemoveAllContours(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::renderPlatedPadsAsPlated, REPORTER::Report(), OBJECT_2D_STATS::ResetStats(), CAMERA::SetBoardLookAtPos(), SHAPE_LINE_CHAIN::SetClosed(), OPENGL_RENDER_LIST::SetItIsTransparent(), and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk.
Referenced by Redraw().
|
inlineinherited |
Definition at line 70 of file render_3d_base.h.
References RENDER_3D_BASE::m_reloadRequested.
Referenced by EDA_3D_CANVAS::ReloadRequest(), EDA_3D_CANVAS::RenderEngineChanged(), and EDA_3D_CANVAS::RenderRaytracingRequest().
|
private |
Definition at line 129 of file render_3d_opengl.cpp.
References DrawRoundArrow(), CAMERA::GetRotationMatrix(), RENDER_3D_BASE::m_camera, RENDER_3D_BASE::m_windowSize, RANGE_SCALE_3D, and setArrowMaterial().
Referenced by Redraw().
|
private |
aRenderTopOrBot | true will render Top, false will render bottom |
aRenderTransparentOnly | true will render only the transparent objects, false will render opaque |
Definition at line 1188 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_IsBoardView, and render3dModelsSelected().
Referenced by Redraw().
|
private |
Definition at line 1146 of file render_3d_opengl.cpp.
References MODEL_3D::BeginDrawMulti(), MODEL_3D::EndDrawMulti(), BOARD::Footprints(), BOARD_ADAPTER::GetBoard(), BOARD_ADAPTER::IsFootprintShown(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, m_currentRollOverItem, BOARD_ADAPTER::m_IsBoardView, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_highlight_on_rollover, and renderFootprint().
Referenced by render3dModels().
|
private |
Definition at line 518 of file render_3d_opengl.cpp.
References OPENGL_RENDER_LIST::ApplyScalePosition(), OPENGL_RENDER_LIST::DrawAll(), BOARD_ADAPTER::GetBoardBodyThickness(), m_board, RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_BoardBodyColor, m_boardWithHoles, m_materials, OglSetMaterial(), and OPENGL_RENDER_LIST::SetItIsTransparent().
Referenced by Redraw().
|
private |
Definition at line 1197 of file render_3d_opengl.cpp.
References EDA_ANGLE::AsDegrees(), BOARD_ADAPTER::BiuTo3dUnits(), BOARD_ADAPTER::GetColor(), BOARD_ADAPTER::GetFootprintZPos(), FOOTPRINT::GetOrientation(), FOOTPRINT::GetPosition(), FOOTPRINT::IsFlipped(), EDA_ITEM::IsSelected(), EDA_ANGLE::IsZero(), m_3dModelMap, m_3dModelMatrixMap, RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, FOOTPRINT::Models(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_show_model_bbox, scale, UNITS3D_TO_UNITSPCB, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by render3dModelsSelected().
|
private |
Definition at line 1088 of file render_3d_opengl.cpp.
References OPENGL_RENDER_LIST::ApplyScalePosition(), B_Mask, OPENGL_RENDER_LIST::DrawAllCameraCulled(), OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer(), F_Mask, BOARD_ADAPTER::GetNonCopperLayerThickness(), CAMERA::GetPos(), m_board, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, m_layers, m_outerViaThroughHoles, OPENGL_RENDER_LIST::SetItIsTransparent(), and setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 999 of file render_3d_opengl.cpp.
Referenced by render3dArrows().
|
inherited |
Set a new busy indicator factory.
When set, this factory will be used to generate busy indicators when suitable. If not set, no busy indicator will be used.
Definition at line 64 of file render_3d_base.cpp.
References RENDER_3D_BASE::m_busyIndicatorFactory.
|
private |
Definition at line 498 of file render_3d_opengl.cpp.
References m_materials, and OglSetMaterial().
Referenced by Redraw().
|
inline |
Definition at line 64 of file render_3d_opengl.h.
References m_currentRollOverItem.
Referenced by EDA_3D_CANVAS::OnMouseMove().
|
overridevirtual |
Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed.
aSize | the current size of the render window |
Implements RENDER_3D_BASE.
Definition at line 90 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_windowSize.
|
private |
Definition at line 317 of file render_3d_opengl.cpp.
References B_Adhes, B_CrtYd, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Fab, F_Mask, F_Paste, F_SilkS, getLayerColor(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, m_materials, EDA_3D_VIEWER_SETTINGS::m_Render, Margin, OglSetMaterial(), and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic.
Referenced by Redraw(), renderSolderMaskLayer(), and setPlatedCopperAndDepthOffset().
|
private |
Definition at line 120 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 102 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 111 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 504 of file render_3d_opengl.cpp.
References setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 168 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, BOARD_ADAPTER::m_CopperColor, m_materials, EDA_3D_VIEWER_SETTINGS::m_Render, BOARD_ADAPTER::m_SilkScreenColorBot, BOARD_ADAPTER::m_SilkScreenColorTop, BOARD_ADAPTER::m_SolderPasteColor, mapf(), and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic.
Referenced by Redraw().
|
private |
Definition at line 512 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 212 of file render_3d_opengl.h.
Referenced by freeAllLists(), load3dModels(), Load3dModelsIfNeeded(), RENDER_3D_OPENGL(), and renderFootprint().
|
private |
Definition at line 213 of file render_3d_opengl.h.
Referenced by freeAllLists(), and renderFootprint().
|
private |
Definition at line 197 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
The negative polygon representation of the board outline.
Definition at line 217 of file render_3d_opengl.h.
Referenced by generateViasAndPads(), and reload().
|
private |
Definition at line 195 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), RENDER_3D_OPENGL(), renderBoardBody(), and renderSolderMaskLayer().
|
protectedinherited |
Definition at line 105 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE::addModels(), addObjectTriangles(), RENDER_3D_RAYTRACE::addPadsAndVias(), createBoard(), RENDER_3D_RAYTRACE::createItemsFromContainer(), generate3dGrid(), generateHoles(), generateLayerList(), generateViasAndPads(), getLayerColor(), getLayerZPos(), RENDER_3D_RAYTRACE::getModelMaterial(), RENDER_3D_RAYTRACE::insertHole(), RENDER_3D_RAYTRACE::load3DModels(), load3dModels(), RENDER_3D_RAYTRACE::postProcessBlurFinish(), RENDER_3D_RAYTRACE::postProcessShading(), Redraw(), RENDER_3D_RAYTRACE::Redraw(), reload(), RENDER_3D_RAYTRACE::Reload(), RENDER_3D_RAYTRACE::render(), render3dModels(), render3dModelsSelected(), RENDER_3D_RAYTRACE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE::renderBlockTracing(), renderBoardBody(), renderFootprint(), renderSolderMaskLayer(), setLayerMaterial(), setupMaterials(), RENDER_3D_RAYTRACE::setupMaterials(), and RENDER_3D_RAYTRACE::shadeHit().
|
private |
Definition at line 196 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), RENDER_3D_OPENGL(), and renderBoardBody().
|
privateinherited |
< Factory that returns a suitable busy indicator for the context.
Definition at line 128 of file render_3d_base.h.
Referenced by RENDER_3D_BASE::CreateBusyIndicator(), and RENDER_3D_BASE::SetBusyIndicatorFactory().
|
protectedinherited |
Flag if the opengl specific for this render was already initialized.
Definition at line 107 of file render_3d_base.h.
Referenced by Redraw(), RENDER_3D_RAYTRACE::Redraw(), reload(), RENDER_3D_RAYTRACE::Reload(), RENDER_3D_RAYTRACE::render(), render3dArrows(), RENDER_3D_RAYTRACE::renderBlockTracing(), and renderSolderMaskLayer().
|
protectedinherited |
Settings reference in use for this render.
Definition at line 102 of file render_3d_base.h.
Referenced by Load3dModelsIfNeeded(), and RENDER_3D_BASE::RENDER_3D_BASE().
|
private |
Definition at line 203 of file render_3d_opengl.h.
Referenced by createBoard(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generateViasAndPads(), initializeOpenGL(), Redraw(), RENDER_3D_OPENGL(), and ~RENDER_3D_OPENGL().
SMATERIAL RENDER_3D_OPENGL::m_Copper |
Definition at line 185 of file render_3d_opengl.h.
|
private |
Definition at line 215 of file render_3d_opengl.h.
Referenced by render3dModelsSelected(), RENDER_3D_OPENGL(), and SetCurrentRollOverItem().
SMATERIAL RENDER_3D_OPENGL::m_EpoxyBoard |
Definition at line 183 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_GrayMaterial |
Definition at line 187 of file render_3d_opengl.h.
|
private |
oGL list that stores current grid
Definition at line 205 of file render_3d_opengl.h.
Referenced by freeAllLists(), generate3dGrid(), Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 194 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().
|
protectedinherited |
Definition at line 110 of file render_3d_base.h.
Referenced by initializeOpenGL(), RENDER_3D_RAYTRACE::initializeOpenGL(), Redraw(), RENDER_3D_RAYTRACE::Redraw(), and RENDER_3D_BASE::RENDER_3D_BASE().
|
private |
Stores the last grid type.
Definition at line 206 of file render_3d_opengl.h.
Referenced by Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 190 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
struct { ... } RENDER_3D_OPENGL::m_materials |
Referenced by Redraw(), renderBoardBody(), setCopperMaterial(), setLayerMaterial(), and setupMaterials().
SMATERIAL RENDER_3D_OPENGL::m_NonPlatedCopper |
Definition at line 184 of file render_3d_opengl.h.
|
private |
Definition at line 193 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 200 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 198 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 199 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
|
private |
Definition at line 209 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViasAndPads(), Redraw(), and RENDER_3D_OPENGL().
SMATERIAL RENDER_3D_OPENGL::m_Paste |
Definition at line 179 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_Plastic |
Definition at line 186 of file render_3d_opengl.h.
|
private |
Definition at line 192 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 191 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
protectedinherited |
The window size that this camera is working.
Definition at line 113 of file render_3d_base.h.
Referenced by RENDER_3D_BASE::IsReloadRequestPending(), Redraw(), RENDER_3D_RAYTRACE::Redraw(), reload(), RENDER_3D_RAYTRACE::Reload(), RENDER_3D_BASE::ReloadRequest(), and RENDER_3D_BASE::RENDER_3D_BASE().
SMATERIAL RENDER_3D_OPENGL::m_SilkSBot |
Definition at line 180 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_SilkSTop |
Definition at line 181 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_SolderMask |
Definition at line 182 of file render_3d_opengl.h.
|
private |
store pointers so can be deleted latter
Definition at line 202 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateEmptyLayerList(), generateLayerList(), and RENDER_3D_OPENGL().
|
private |
Definition at line 208 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViasAndPads(), Redraw(), and RENDER_3D_OPENGL().
|
protectedinherited |
Definition at line 116 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE::initializeBlockPositions(), Redraw(), RENDER_3D_RAYTRACE::Redraw(), render3dArrows(), RENDER_3D_BASE::RENDER_3D_BASE(), RENDER_3D_RAYTRACE::renderBlockTracing(), SetCurWindowSize(), and RENDER_3D_RAYTRACE::SetCurWindowSize().