|
KiCad PCB EDA Suite
|
Object to render the board using openGL. More...
#include <render_3d_opengl.h>
Classes | |
| struct | MODELTORENDER |
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. | |
| bool | Redraw (bool aIsMoving, REPORTER *aStatusReporter, REPORTER *aWarningReporter) override |
| Redraw the view. | |
| 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). | |
| void | SetCurrentRollOverItem (BOARD_ITEM *aRollOverItem) |
| void | Load3dModelsIfNeeded () |
| Load footprint models if they are not already loaded, i.e. | |
| void | handleGizmoMouseInput (int mouseX, int mouseY) |
| void | setGizmoViewport (int x, int y, int width, int height) |
| std::tuple< int, int, int, int > | getGizmoViewport () const |
| SPHERES_GIZMO::GizmoSphereSelection | getSelectedGizmoSphere () const |
| void | resetSelectedGizmoSphere () |
| void | ReloadRequest () |
| bool | IsReloadRequestPending () const |
| Query if there is a pending reload request. | |
| void | SetBusyIndicatorFactory (BUSY_INDICATOR::FACTORY aNewFactory) |
| Set a new busy indicator factory. | |
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. | |
Protected Attributes | |
| BOARD_ADAPTER & | m_boardAdapter |
| Settings reference in use for this render. | |
| CAMERA & | m_camera |
| bool | m_canvasInitialized |
| Flag if the canvas specific for this render was already initialized. | |
| bool | m_reloadRequested |
| wxSize | m_windowSize |
| The window size that this camera is working. | |
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. | |
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 aLayer, const BVH_CONTAINER_2D *aThroughHoles=nullptr) |
| OPENGL_RENDER_LIST * | generateEmptyLayerList (PCB_LAYER_ID aLayer) |
| 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 *aCircle, 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 aZPos, bool aShowThickness, 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 | generateInvCone (const SFVEC2F &aCenter, float aInnerRadius, float aOuterRadius, float aZtop, float aZbot, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer, EDA_ANGLE aAngle) |
| void | generateDisk (const SFVEC2F &aCenter, float aRadius, float aZ, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer, bool aTop) |
| void | generateDimple (const SFVEC2F &aCenter, float aRadius, float aZ, float aDepth, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer, bool aTop) |
| void | generateViasAndPads () |
| bool | appendPostMachiningGeometry (TRIANGLE_DISPLAY_LIST *aDstLayer, const SFVEC2F &aHoleCenter, PAD_DRILL_POST_MACHINING_MODE aMode, int aSizeIU, int aDepthIU, float aHoleInnerRadius, float aZSurface, bool aIsFront, float aPlatingThickness3d, float aUnitScale, float *aZEnd) |
| void | generateViaBarrels (float aPlatingThickness3d, float aUnitScale) |
| void | generatePlatedHoleShells (int aPlatingThickness, float aUnitScale) |
| void | generateViaCovers (float aPlatingThickness3d, float aUnitScale) |
| void | load3dModels (REPORTER *aStatusReporter) |
| Load footprint models from the cache and load it to openGL lists in the form of MODEL_3D objects. | |
| void | renderOpaqueModels (const glm::mat4 &aCameraViewMatrix) |
| void | renderTransparentModels (const glm::mat4 &aCameraViewMatrix) |
| void | renderModel (const glm::mat4 &aCameraViewMatrix, const MODELTORENDER &aModelToRender, const SFVEC3F &aSelColor, const SFVEC3F *aCameraWorldPos) |
| void | get3dModelsSelected (std::list< MODELTORENDER > &aDstRenderList, bool aGetTop, bool aGetBot, bool aRenderTransparentOnly, bool aRenderSelectedOnly) |
| void | get3dModelsFromFootprint (std::list< MODELTORENDER > &aDstRenderList, const FOOTPRINT *aFootprint, bool aRenderTransparentOnly, bool aIsSelected) |
| void | setLightFront (bool enabled) |
| void | setLightTop (bool enabled) |
| void | setLightBottom (bool enabled) |
| void | generate3dGrid (GRID3D_TYPE aGridType) |
| Create a 3D grid to an OpenGL display list. | |
| void | setupMaterials () |
| void | setCopperMaterial () |
| void | setPlatedCopperAndDepthOffset (PCB_LAYER_ID aLayer_id) |
| void | unsetDepthOffset () |
| void | setLayerMaterial (PCB_LAYER_ID aLayerID) |
| bool | initializeOpenGL () |
| OPENGL_RENDER_LIST * | createBoard (const SHAPE_POLY_SET &aBoardPoly, const BVH_CONTAINER_2D *aThroughHoles=nullptr) |
| void | backfillPostMachine () |
| Create ring-shaped plugs for holes that have backdrill or post-machining. | |
| void | reload (REPORTER *aStatusReporter, REPORTER *aWarningReporter) |
| void | setArrowMaterial () |
| void | freeAllLists () |
Object to render the board using openGL.
Definition at line 55 of file render_3d_opengl.h.
|
explicit |
Definition at line 52 of file render_3d_opengl.cpp.
References m_3dModelMap, m_antiBoard, m_board, m_boardWithHoles, m_canvas, m_circleTexture, m_currentRollOverItem, m_grid, m_innerLayerHoles, m_lastGridType, m_layers, RENDER_3D_BASE::m_logTrace, m_microviaHoles, m_offboardPadsBack, m_offboardPadsFront, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, m_postMachinePlugs, m_spheres_gizmo, m_triangles, m_viaBackCover, m_viaFrontCover, NONE, and RENDER_3D_BASE::RENDER_3D_BASE().
| RENDER_3D_OPENGL::~RENDER_3D_OPENGL | ( | ) |
Definition at line 91 of file render_3d_opengl.cpp.
References freeAllLists(), m_circleTexture, RENDER_3D_BASE::m_logTrace, and m_spheres_gizmo.
|
private |
Definition at line 42 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), center, FILLED_CIRCLE_2D::GetCenter(), FILLED_CIRCLE_2D::GetRadius(), TRIANGLE_DISPLAY_LIST::m_layer_bot_segment_ends, TRIANGLE_DISPLAY_LIST::m_layer_top_segment_ends, radius, and SIZE_OF_CIRCLE_TEXTURE.
|
private |
Definition at line 72 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 120 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), center, generateRing(), RING_2D::GetCenter(), 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 165 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), TRIANGLE_LIST::AddTriangle(), end, 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, radius, and SIZE_OF_CIRCLE_TEXTURE.
|
private |
Definition at line 154 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 946 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, TRIANGLE_DISPLAY_LIST::m_layer_top_triangles, top(), v1, and v2.
Referenced by addObjectTriangles(), addObjectTriangles(), createBoard(), and generatePlatedHoleShells().
|
private |
Definition at line 1119 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), COUNTERBORE, COUNTERSINK, generateCylinder(), generateRing(), RENDER_3D_BASE::m_boardAdapter, TRIANGLE_DISPLAY_LIST::m_layer_middle_contours_quads, and radius.
Referenced by generateViaBarrels().
|
private |
Create ring-shaped plugs for holes that have backdrill or post-machining.
These plugs represent the board material that remains in the hole where the backdrill or post-machining didn't reach.
Definition at line 432 of file opengl/create_scene.cpp.
References B_Cu, center, CIRCLE, COUNTERSINK, dummy, F_Cu, generateCylinder(), generateInvCone(), getLayerZPos(), TRIANGLE_LIST::GetVertexSize(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, TRIANGLE_DISPLAY_LIST::m_layer_middle_contours_quads, TRIANGLE_DISPLAY_LIST::m_layer_top_triangles, m_postMachinePlugs, m_triangles, NOT_POST_MACHINED, pad, PCB_VIA_T, TENTHS_OF_A_DEGREE_T, UNKNOWN, and via.
Referenced by reload().
|
private |
Definition at line 378 of file opengl/create_scene.cpp.
References TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), addTopAndBottomTriangles(), ConvertPolygonToTriangles(), 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.
Definition at line 69 of file render_3d_base.cpp.
References m_busyIndicatorFactory.
Referenced by RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
private |
Definition at line 913 of file render_3d_opengl.cpp.
References DELETE_AND_FREE, DELETE_AND_FREE_MAP, m_3dModelMap, m_3dModelMatrixMap, m_antiBoard, m_board, m_boardWithHoles, m_grid, m_innerLayerHoles, m_layers, m_microviaHoles, m_offboardPadsBack, m_offboardPadsFront, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, m_postMachinePlugs, m_triangles, m_viaBackCover, and m_viaFrontCover.
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 1312 of file render_3d_opengl.cpp.
References DARKGRAY, delta, GRID_10MM, GRID_1MM, GRID_2P5MM, GRID_5MM, KiROUND(), LIGHTBLUE, RENDER_3D_BASE::m_boardAdapter, m_grid, NONE, pcbIUScale, scale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Redraw().
|
private |
Definition at line 974 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), generateRing(), TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by appendPostMachiningGeometry(), and backfillPostMachine().
|
private |
Definition at line 1095 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), delta, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by generateViaCovers().
|
private |
Definition at line 1071 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddTriangle(), delta, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by generateViaCovers().
|
private |
Definition at line 362 of file opengl/create_scene.cpp.
References getLayerZPos(), m_circleTexture, and m_triangles.
Referenced by reload().
|
private |
Definition at line 250 of file opengl/create_scene.cpp.
References addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), FILLED_CIRCLE, RENDER_3D_BASE::m_boardAdapter, m_circleTexture, SHAPE_POLY_SET::OutlineCount(), and ROUNDSEG.
Referenced by reload().
|
private |
Definition at line 1008 of file opengl/create_scene.cpp.
References TRIANGLE_LIST::AddQuad(), TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), EDA_ANGLE::AsRadians(), generateRing(), TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, and TRIANGLE_DISPLAY_LIST::m_layer_top_triangles.
Referenced by backfillPostMachine().
|
private |
Definition at line 295 of file opengl/create_scene.cpp.
References addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), FILLED_CIRCLE, getLayerZPos(), CONTAINER_2D_BASE::GetList(), 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 1391 of file opengl/create_scene.cpp.
References TRIANGLE_DISPLAY_LIST::AddToMiddleContours(), addTopAndBottomTriangles(), B_Cu, SHAPE_POLY_SET::BooleanSubtract(), ConvertPolygonToTriangles(), dummy, ERROR_INSIDE, F_Cu, getLayerZPos(), CONTAINER_2D_BASE::GetList(), OBJECT_2D::GetObjectType(), TRIANGLE_2D::GetP1(), TRIANGLE_2D::GetP2(), TRIANGLE_2D::GetP3(), m_antiBoardPolys, RENDER_3D_BASE::m_boardAdapter, m_circleTexture, m_padHoles, NPTH, SHAPE_POLY_SET::OutlineCount(), pad, PCB_VIA_T, SHAPE_POLY_SET::RemoveAllContours(), THROUGH, TransformCircleToPolygon(), TRIANGLE, v1, v2, v3, and via.
|
private |
Definition at line 86 of file opengl/create_scene.cpp.
References delta.
Referenced by addObjectTriangles(), appendPostMachiningGeometry(), generateCylinder(), and generateInvCone().
|
private |
Definition at line 1214 of file opengl/create_scene.cpp.
References appendPostMachiningGeometry(), B_Cu, CIRCLE, dummy, F_Cu, getLayerZPos(), RENDER_3D_BASE::m_boardAdapter, m_microviaHoles, NOT_POST_MACHINED, NPTH, pad, PCB_VIA_T, THROUGH, UNKNOWN, and via.
|
private |
Definition at line 1492 of file opengl/create_scene.cpp.
References B_Cu, B_Mask, CAPPED, center, COVERED, dummy, F_Cu, F_Mask, FILLED, generateDimple(), generateDisk(), getLayerZPos(), TRIANGLE_LIST::GetVertexSize(), RENDER_3D_BASE::m_boardAdapter, TRIANGLE_DISPLAY_LIST::m_layer_bot_triangles, TRIANGLE_DISPLAY_LIST::m_layer_top_triangles, m_viaBackCover, m_viaFrontCover, NOT_POST_MACHINED, PCB_VIA_T, PLUGGED, UNKNOWN, and via.
|
private |
Definition at line 1571 of file opengl/create_scene.cpp.
References RENDER_3D_BASE::m_boardAdapter.
Referenced by reload().
|
private |
Definition at line 1045 of file render_3d_opengl.cpp.
References EDA_ANGLE::AsRadians(), FOOTPRINT::GetOrientation(), FOOTPRINT::GetPosition(), FOOTPRINT::IsFlipped(), EDA_ITEM::IsSelected(), EDA_ANGLE::IsZero(), m_3dModelMap, m_3dModelMatrixMap, RENDER_3D_BASE::m_boardAdapter, FOOTPRINT::Models(), scale, UNITS3D_TO_UNITSPCB, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by get3dModelsSelected().
|
private |
Definition at line 1002 of file render_3d_opengl.cpp.
References get3dModelsFromFootprint(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::highlight_on_rollover, RENDER_3D_BASE::m_boardAdapter, and m_currentRollOverItem.
Referenced by renderOpaqueModels(), and renderTransparentModels().
| std::tuple< int, int, int, int > RENDER_3D_OPENGL::getGizmoViewport | ( | ) | const |
Definition at line 170 of file render_3d_opengl.cpp.
References m_spheres_gizmo.
|
private |
Definition at line 960 of file opengl/create_scene.cpp.
References RENDER_3D_BASE::m_boardAdapter.
Referenced by backfillPostMachine(), generateEmptyLayerList(), generateLayerList(), generatePlatedHoleShells(), generateViaBarrels(), generateViaCovers(), and reload().
| SPHERES_GIZMO::GizmoSphereSelection RENDER_3D_OPENGL::getSelectedGizmoSphere | ( | ) | const |
Definition at line 158 of file render_3d_opengl.cpp.
References m_spheres_gizmo.
|
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 103 of file render_3d_opengl.cpp.
| void RENDER_3D_OPENGL::handleGizmoMouseInput | ( | int | mouseX, |
| int | mouseY ) |
Definition at line 176 of file render_3d_opengl.cpp.
References m_spheres_gizmo.
|
private |
Definition at line 851 of file render_3d_opengl.cpp.
References IMAGE::CircleFilled(), IMAGE::EfxFilter_SkipCenter(), GAUSSIAN_BLUR, IMAGE::GetHeight(), IMAGE::GetWidth(), IMAGE, init_lights(), RENDER_3D_BASE::m_canvasInitialized, m_circleTexture, 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 m_reloadRequested.
|
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 1604 of file opengl/create_scene.cpp.
References _, PROJECT_PCB::FootprintLibAdapter(), LIBRARY_MANAGER::GetFullURI(), S3D_CACHE::GetModel(), LIBRARY_MANAGER_ADAPTER::GetRow(), m_3dModelMap, RENDER_3D_BASE::m_boardAdapter, model, and REPORTER::Report().
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 1586 of file opengl/create_scene.cpp.
References ACTIVITY, load3dModels(), m_3dModelMap, and m_canvas.
Referenced by APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged().
|
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 505 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_annuli, RENDER_3D_BASE::CreateBusyIndicator(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::DifferentiatePlatedCopper(), OPENGL_RENDER_LIST::DrawCulled(), F_Cu, F_Mask, F_Paste, F_SilkS, generate3dGrid(), PGM_BASE::GetGLContextManager(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, initializeOpenGL(), IsCopperLayer(), LAYER_3D_BOARD, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, m_antiBoard, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, RENDER_3D_BASE::m_canvasInitialized, m_circleTexture, m_grid, m_lastGridType, m_layers, m_microviaHoles, m_offboardPadsBack, m_offboardPadsFront, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, RENDER_3D_BASE::m_reloadRequested, m_spheres_gizmo, RENDER_3D_BASE::m_windowSize, NONE, OglDrawBackground(), OglResetTextureState(), 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_microvias_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_thickness_disableOnMove, Pgm(), LSET::PhysicalLayersMask(), premultiplyAlpha(), reload, renderBoardBody(), renderOpaqueModels(), renderSolderMaskLayer(), renderTransparentModels(), REPORTER::Report(), GL_CONTEXT_MANAGER::RunWithoutCtxLock(), setCopperMaterial(), setLayerMaterial(), setLightBottom(), setLightFront(), setLightTop(), setPlatedCopperAndDepthOffset(), setupMaterials(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_navigator, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_off_board_silk, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk, and unsetDepthOffset().
Definition at line 688 of file opengl/create_scene.cpp.
References _, B_Cu, B_Mask, B_SilkS, backfillPostMachine(), SHAPE_POLY_SET::BooleanIntersection(), SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::CloneDropTriangulation(), createBoard(), F_Cu, F_Mask, F_SilkS, freeAllLists(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generateViasAndPads(), getLayerZPos(), GetRunningMicroSecs(), OBJECT_2D_STATS::Instance(), load3dModels(), m_antiBoard, m_antiBoardPolys, m_board, RENDER_3D_BASE::m_boardAdapter, m_boardWithHoles, RENDER_3D_BASE::m_camera, m_innerLayerHoles, m_layers, m_offboardPadsBack, m_offboardPadsFront, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_platedPadsBack, m_platedPadsFront, RENDER_3D_BASE::m_reloadRequested, LSET::PhysicalLayersMask(), REPORTER::Report(), and OBJECT_2D_STATS::ResetStats().
|
inlineinherited |
Definition at line 70 of file render_3d_base.h.
References m_reloadRequested.
|
private |
Definition at line 462 of file render_3d_opengl.cpp.
References OPENGL_RENDER_LIST::ApplyScalePosition(), OPENGL_RENDER_LIST::DrawAll(), m_board, RENDER_3D_BASE::m_boardAdapter, m_boardWithHoles, m_materials, m_postMachinePlugs, OglSetMaterial(), and OPENGL_RENDER_LIST::SetItIsTransparent().
Referenced by Redraw().
|
private |
Definition at line 1272 of file render_3d_opengl.cpp.
References MODEL_3D::Draw(), MODEL_3D::DrawBbox(), MODEL_3D::DrawBboxes(), RENDER_3D_BASE::m_boardAdapter, RENDER_3D_OPENGL::MODELTORENDER::m_isSelected, RENDER_3D_OPENGL::MODELTORENDER::m_isTransparent, RENDER_3D_OPENGL::MODELTORENDER::m_model, RENDER_3D_OPENGL::MODELTORENDER::m_modelWorldMat, RENDER_3D_OPENGL::MODELTORENDER::m_opacity, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_model_bbox.
Referenced by renderOpaqueModels(), and renderTransparentModels().
|
private |
Definition at line 1137 of file render_3d_opengl.cpp.
References MODEL_3D::BeginDrawMulti(), MODEL_3D::EndDrawMulti(), get3dModelsSelected(), RENDER_3D_BASE::m_boardAdapter, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, and renderModel().
Referenced by Redraw().
|
private |
Definition at line 969 of file render_3d_opengl.cpp.
References OPENGL_RENDER_LIST::ApplyScalePosition(), B_Mask, F_Mask, m_board, RENDER_3D_BASE::m_boardAdapter, m_layers, m_outerThroughHoles, m_viaBackCover, m_viaFrontCover, and setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 1181 of file render_3d_opengl.cpp.
References MODEL_3D::BeginDrawMulti(), MODEL_3D::EndDrawMulti(), get3dModelsSelected(), BBOX_3D::GetCenter(), RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, and renderModel().
Referenced by Redraw().
| void RENDER_3D_OPENGL::resetSelectedGizmoSphere | ( | ) |
Definition at line 152 of file render_3d_opengl.cpp.
References m_spheres_gizmo.
|
private |
Definition at line 894 of file render_3d_opengl.cpp.
|
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 63 of file render_3d_base.cpp.
References m_busyIndicatorFactory.
|
private |
Definition at line 442 of file render_3d_opengl.cpp.
References m_materials, and OglSetMaterial().
Referenced by Redraw().
|
inline |
Definition at line 67 of file render_3d_opengl.h.
References m_currentRollOverItem.
|
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 109 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_windowSize, and setGizmoViewport().
| void RENDER_3D_OPENGL::setGizmoViewport | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height ) |
Definition at line 164 of file render_3d_opengl.cpp.
References m_spheres_gizmo.
Referenced by SetCurWindowSize().
|
private |
Definition at line 273 of file render_3d_opengl.cpp.
References KIGFX::COLOR4D::b, 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, KIGFX::COLOR4D::g, IsCopperLayer(), LAYER_3D_USER_1, LAYER_3D_USER_45, RENDER_3D_BASE::m_boardAdapter, m_materials, MapPCBLayerTo3DLayer(), Margin, OglSetMaterial(), and KIGFX::COLOR4D::r.
Referenced by Redraw(), renderSolderMaskLayer(), and setPlatedCopperAndDepthOffset().
|
private |
Definition at line 143 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 125 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 134 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 448 of file render_3d_opengl.cpp.
References setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 182 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_boardAdapter, m_materials, and mapf().
Referenced by Redraw().
|
private |
Definition at line 456 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 284 of file render_3d_opengl.h.
Referenced by freeAllLists(), get3dModelsFromFootprint(), load3dModels(), Load3dModelsIfNeeded(), and RENDER_3D_OPENGL().
|
private |
Definition at line 285 of file render_3d_opengl.h.
Referenced by freeAllLists(), and get3dModelsFromFootprint().
|
private |
Definition at line 267 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 289 of file render_3d_opengl.h.
Referenced by generatePlatedHoleShells(), and reload().
|
private |
Definition at line 264 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), RENDER_3D_OPENGL(), renderBoardBody(), and renderSolderMaskLayer().
|
protectedinherited |
Settings reference in use for this render.
Definition at line 102 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::addCounterborePlating(), RENDER_3D_RAYTRACE_BASE::addCountersinkPlating(), RENDER_3D_RAYTRACE_BASE::addModels(), RENDER_3D_OPENGL::addObjectTriangles(), RENDER_3D_RAYTRACE_BASE::addPadsAndVias(), RENDER_3D_OPENGL::appendPostMachiningGeometry(), RENDER_3D_OPENGL::backfillPostMachine(), RENDER_3D_RAYTRACE_BASE::backfillPostMachine(), RENDER_3D_OPENGL::createBoard(), RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::generate3dGrid(), RENDER_3D_OPENGL::generateHoles(), RENDER_3D_OPENGL::generateLayerList(), RENDER_3D_OPENGL::generatePlatedHoleShells(), RENDER_3D_OPENGL::generateViaBarrels(), RENDER_3D_OPENGL::generateViaCovers(), RENDER_3D_OPENGL::generateViasAndPads(), RENDER_3D_OPENGL::get3dModelsFromFootprint(), RENDER_3D_OPENGL::get3dModelsSelected(), RENDER_3D_OPENGL::getLayerZPos(), RENDER_3D_RAYTRACE_BASE::getModelMaterial(), RENDER_3D_RAYTRACE_BASE::insertHole(), RENDER_3D_RAYTRACE_BASE::insertHole(), RENDER_3D_RAYTRACE_BASE::load3DModels(), RENDER_3D_OPENGL::load3dModels(), RENDER_3D_RAYTRACE_BASE::postProcessBlurFinish(), RENDER_3D_RAYTRACE_BASE::postProcessShading(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_OPENGL::renderBoardBody(), RENDER_3D_OPENGL::renderModel(), RENDER_3D_OPENGL::renderOpaqueModels(), RENDER_3D_RAYTRACE_BASE::renderPreview(), RENDER_3D_OPENGL::renderSolderMaskLayer(), RENDER_3D_RAYTRACE_BASE::renderTracing(), RENDER_3D_OPENGL::renderTransparentModels(), RENDER_3D_OPENGL::setLayerMaterial(), RENDER_3D_OPENGL::setupMaterials(), RENDER_3D_RAYTRACE_BASE::setupMaterials(), and RENDER_3D_RAYTRACE_BASE::shadeHit().
|
private |
Definition at line 265 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 125 of file render_3d_base.h.
Referenced by CreateBusyIndicator(), and SetBusyIndicatorFactory().
|
protectedinherited |
Definition at line 104 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_RAYTRACE_BASE::renderPreview(), and RENDER_3D_OPENGL::renderTransparentModels().
|
private |
Definition at line 255 of file render_3d_opengl.h.
Referenced by Load3dModelsIfNeeded(), and RENDER_3D_OPENGL().
|
protectedinherited |
Flag if the canvas specific for this render was already initialized.
Definition at line 107 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::initializeOpenGL(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), and RENDER_3D_BASE().
|
private |
Definition at line 273 of file render_3d_opengl.h.
Referenced by backfillPostMachine(), createBoard(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generatePlatedHoleShells(), initializeOpenGL(), Redraw(), RENDER_3D_OPENGL(), and ~RENDER_3D_OPENGL().
| SMATERIAL RENDER_3D_OPENGL::m_Copper |
Definition at line 250 of file render_3d_opengl.h.
|
private |
Definition at line 287 of file render_3d_opengl.h.
Referenced by get3dModelsSelected(), RENDER_3D_OPENGL(), and SetCurrentRollOverItem().
| SMATERIAL RENDER_3D_OPENGL::m_EpoxyBoard |
Definition at line 248 of file render_3d_opengl.h.
| SMATERIAL RENDER_3D_OPENGL::m_GrayMaterial |
Definition at line 252 of file render_3d_opengl.h.
|
private |
oGL list that stores current grid
Definition at line 275 of file render_3d_opengl.h.
Referenced by freeAllLists(), generate3dGrid(), Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 263 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().
|
private |
Stores the last grid type.
Definition at line 276 of file render_3d_opengl.h.
Referenced by Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 257 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
| struct { ... } RENDER_3D_OPENGL::m_materials |
Referenced by renderBoardBody(), setCopperMaterial(), setLayerMaterial(), and setupMaterials().
|
private |
Definition at line 278 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViaBarrels(), Redraw(), and RENDER_3D_OPENGL().
| SMATERIAL RENDER_3D_OPENGL::m_NonPlatedCopper |
Definition at line 249 of file render_3d_opengl.h.
|
private |
Definition at line 261 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 260 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 262 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 270 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 268 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
|
private |
Definition at line 269 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 279 of file render_3d_opengl.h.
Referenced by freeAllLists(), generatePlatedHoleShells(), Redraw(), and RENDER_3D_OPENGL().
| SMATERIAL RENDER_3D_OPENGL::m_Paste |
Definition at line 244 of file render_3d_opengl.h.
| SMATERIAL RENDER_3D_OPENGL::m_Plastic |
Definition at line 251 of file render_3d_opengl.h.
|
private |
Definition at line 259 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 258 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Board material plugs for backdrill/counterbore/countersink.
Definition at line 266 of file render_3d_opengl.h.
Referenced by backfillPostMachine(), freeAllLists(), RENDER_3D_OPENGL(), and renderBoardBody().
|
protectedinherited |
Definition at line 110 of file render_3d_base.h.
Referenced by IsReloadRequestPending(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), ReloadRequest(), and RENDER_3D_BASE().
| SMATERIAL RENDER_3D_OPENGL::m_SilkSBot |
Definition at line 245 of file render_3d_opengl.h.
| SMATERIAL RENDER_3D_OPENGL::m_SilkSTop |
Definition at line 246 of file render_3d_opengl.h.
| SMATERIAL RENDER_3D_OPENGL::m_SolderMask |
Definition at line 247 of file render_3d_opengl.h.
|
private |
Definition at line 291 of file render_3d_opengl.h.
Referenced by getGizmoViewport(), getSelectedGizmoSphere(), handleGizmoMouseInput(), Redraw(), RENDER_3D_OPENGL(), resetSelectedGizmoSphere(), setGizmoViewport(), and ~RENDER_3D_OPENGL().
|
private |
store pointers so can be deleted latter
Definition at line 272 of file render_3d_opengl.h.
Referenced by backfillPostMachine(), freeAllLists(), generateEmptyLayerList(), generateLayerList(), and RENDER_3D_OPENGL().
|
private |
Definition at line 281 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViaCovers(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
|
private |
Definition at line 280 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViaCovers(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
|
protectedinherited |
The window size that this camera is working.
Definition at line 113 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::initializeBlockPositions(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_RAYTRACE_BASE::renderPreview(), RENDER_3D_OPENGL::SetCurWindowSize(), RENDER_3D_RAYTRACE_GL::SetCurWindowSize(), and RENDER_3D_RAYTRACE_RAM::SetCurWindowSize().