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. 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 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 | 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 | 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 | 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) |
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 48 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_offboardPadsBack, m_offboardPadsFront, m_outerLayerHoles, m_outerThroughHoleRings, m_outerThroughHoles, m_outerViaThroughHoles, m_padHoles, m_platedPadsBack, m_platedPadsFront, m_triangles, and m_vias.
RENDER_3D_OPENGL::~RENDER_3D_OPENGL | ( | ) |
Definition at line 82 of file render_3d_opengl.cpp.
References freeAllLists(), m_circleTexture, and RENDER_3D_BASE::m_logTrace.
|
private |
|
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 672 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(), 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 845 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_offboardPadsBack, m_offboardPadsFront, 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 1225 of file render_3d_opengl.cpp.
References BOARD_ADAPTER::BiuTo3dUnits(), DARKGRAY, delta, BOARD_ADAPTER::GetBoardPos(), BOARD_ADAPTER::GetBoardSize(), BOARD_ADAPTER::GetColor(), EDA_IU_SCALE::IU_PER_MM, KiROUND(), LIGHTBLUE, RENDER_3D_BASE::m_boardAdapter, m_grid, EDA_IU_SCALE::mmToIU(), pcbIUScale, scale, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Redraw().
|
private |
Definition at line 700 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(), OBJECT_2D::GetObjectType(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, and SHAPE_POLY_SET::OutlineCount().
Referenced by reload().
|
private |
Definition at line 303 of file opengl/create_scene.cpp.
References addObjectTriangles(), TRIANGLE_DISPLAY_LIST::AddToMiddleContourns(), BOARD_ADAPTER::BiuTo3dUnits(), getLayerZPos(), CONTAINER_2D_BASE::GetList(), OBJECT_2D::GetObjectType(), RENDER_3D_BASE::m_boardAdapter, m_circleTexture, m_triangles, and SHAPE_POLY_SET::OutlineCount().
Referenced by reload().
|
private |
Definition at line 82 of file opengl/create_scene.cpp.
References delta.
Referenced by addObjectTriangles(), and generateCylinder().
|
private |
Definition at line 734 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, m_circleTexture, m_padHoles, m_vias, SHAPE_POLY_SET::OutlineCount(), pad, PCB_VIA_T, SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::RemoveAllContours(), BOARD::Tracks(), TransformCircleToPolygon(), v1, v2, v3, via, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by reload().
|
private |
Definition at line 962 of file render_3d_opengl.cpp.
References EDA_ANGLE::AsRadians(), BOARD_ADAPTER::BiuTo3dUnits(), BOARD_ADAPTER::GetFootprintZPos(), 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 920 of file render_3d_opengl.cpp.
References BOARD::Footprints(), get3dModelsFromFootprint(), BOARD_ADAPTER::GetBoard(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::highlight_on_rollover, BOARD_ADAPTER::IsFootprintShown(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, m_currentRollOverItem, BOARD_ADAPTER::m_IsBoardView, and EDA_3D_VIEWER_SETTINGS::m_Render.
Referenced by renderOpaqueModels(), and renderTransparentModels().
|
private |
Definition at line 686 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 92 of file render_3d_opengl.cpp.
|
private |
Definition at line 783 of file render_3d_opengl.cpp.
References IMAGE::CircleFilled(), IMAGE::EfxFilter_SkipCenter(), IMAGE::GetHeight(), IMAGE::GetWidth(), 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 914 of file opengl/create_scene.cpp.
References _, FP_LIB_TABLE::FindRow(), BOARD::Footprints(), 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, BOARD_ADAPTER::m_IsPreviewer, 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 894 of file opengl/create_scene.cpp.
References load3dModels(), m_3dModelMap, and RENDER_3D_BASE::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 447 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::differentiate_plated_copper, OPENGL_RENDER_LIST::DrawAll(), OPENGL_RENDER_LIST::DrawCulled(), F_Cu, F_Mask, F_Paste, F_SilkS, generate3dGrid(), BOARD_ADAPTER::GetLayerBottomZPos(), BOARD_ADAPTER::GetLayerTopZPos(), CAMERA::GetPos(), CAMERA::GetProjectionMatrix(), CAMERA::GetViewMatrix(), BOARD_ADAPTER::GetVisibleLayers(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, initializeOpenGL(), LAYER_3D_BOARD, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, 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_offboardPadsBack, m_offboardPadsFront, 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, 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_thickness_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_vias_disableOnMove, LSET::PhysicalLayersMask(), reload, render3dArrows(), renderBoardBody(), renderOpaqueModels(), renderSolderMaskLayer(), renderTransparentModels(), REPORTER::Report(), setCopperMaterial(), setLayerMaterial(), setLightBottom(), setLightFront(), setLightTop(), setPlatedCopperAndDepthOffset(), setupMaterials(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_axis, 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 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_annuli, SHAPE_POLY_SET::CloneDropTriangulation(), createBoard(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::differentiate_plated_copper, F_Cu, F_Mask, F_SilkS, freeAllLists(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generateViasAndPads(), BOARD_ADAPTER::GetBackPlatedPadPolys(), BOARD_ADAPTER::GetBoard(), BOARD_ADAPTER::GetBoardCenter(), BOARD_ADAPTER::GetBoardPoly(), BOARD_ADAPTER::GetFrontPlatedPadPolys(), BOARD_ADAPTER::GetHoleIdPolysMap(), BOARD_ADAPTER::GetHoleOdPolysMap(), BOARD_ADAPTER::GetLayerHoleMap(), BOARD_ADAPTER::GetLayerMap(), BOARD::GetLayerName(), getLayerZPos(), CONTAINER_2D_BASE::GetList(), BOARD_ADAPTER::GetNPTH_ODPolys(), BOARD_ADAPTER::GetOffboardPadsBack(), BOARD_ADAPTER::GetOffboardPadsFront(), BOARD_ADAPTER::GetPlatedPadsBack(), BOARD_ADAPTER::GetPlatedPadsFront(), BOARD_ADAPTER::GetPolyMap(), GetRunningMicroSecs(), BOARD_ADAPTER::GetTH_IDs(), BOARD_ADAPTER::GetTH_ODPolys(), BOARD_ADAPTER::GetTH_ODs(), BOARD_ADAPTER::GetViaAnnuli(), BOARD_ADAPTER::GetViaAnnuliPolys(), BOARD_ADAPTER::GetViaTH_ODPolys(), BOARD_ADAPTER::GetViaTH_ODs(), BOARD_ADAPTER::GetVisibleLayers(), 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_offboardPadsBack, m_offboardPadsFront, 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(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_copper_thickness, SHAPE_POLY_SET::Outline(), LSET::PhysicalLayersMask(), SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_POLY_SET::RemoveAllContours(), REPORTER::Report(), OBJECT_2D_STATS::ResetStats(), CAMERA::SetBoardLookAtPos(), SHAPE_LINE_CHAIN::SetClosed(), OPENGL_RENDER_LIST::SetItIsTransparent(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_off_board_silk, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk.
|
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 137 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 |
Definition at line 420 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 1185 of file render_3d_opengl.cpp.
References MODEL_3D::Draw(), MODEL_3D::DrawBbox(), MODEL_3D::DrawBboxes(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, 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, EDA_3D_VIEWER_SETTINGS::m_Render, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_model_bbox.
Referenced by renderOpaqueModels(), and renderTransparentModels().
|
private |
Definition at line 1053 of file render_3d_opengl.cpp.
References MODEL_3D::BeginDrawMulti(), MODEL_3D::EndDrawMulti(), get3dModelsSelected(), BOARD_ADAPTER::GetColor(), RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_Cfg, BOARD_ADAPTER::m_IsBoardView, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, and renderModel().
Referenced by Redraw().
|
private |
Definition at line 898 of file render_3d_opengl.cpp.
References OPENGL_RENDER_LIST::ApplyScalePosition(), B_Mask, OPENGL_RENDER_LIST::DrawCulled(), F_Mask, BOARD_ADAPTER::GetNonCopperLayerThickness(), m_board, RENDER_3D_BASE::m_boardAdapter, m_layers, m_outerThroughHoles, OPENGL_RENDER_LIST::SetItIsTransparent(), and setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 1097 of file render_3d_opengl.cpp.
References MODEL_3D::BeginDrawMulti(), MODEL_3D::EndDrawMulti(), get3dModelsSelected(), BBOX_3D::GetCenter(), BOARD_ADAPTER::GetColor(), CAMERA::GetPos(), RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, BOARD_ADAPTER::m_Cfg, BOARD_ADAPTER::m_IsBoardView, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, and renderModel().
Referenced by Redraw().
|
private |
Definition at line 826 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 400 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 98 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_windowSize.
|
private |
Definition at line 267 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_CopperColor, BOARD_ADAPTER::m_ECO1Color, BOARD_ADAPTER::m_ECO2Color, m_materials, BOARD_ADAPTER::m_SilkScreenColorBot, BOARD_ADAPTER::m_SilkScreenColorTop, BOARD_ADAPTER::m_SolderMaskColorBot, BOARD_ADAPTER::m_SolderMaskColorTop, BOARD_ADAPTER::m_SolderPasteColor, BOARD_ADAPTER::m_UserCommentsColor, BOARD_ADAPTER::m_UserDrawingsColor, Margin, and OglSetMaterial().
Referenced by Redraw(), renderSolderMaskLayer(), and setPlatedCopperAndDepthOffset().
|
private |
Definition at line 128 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 110 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 119 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 406 of file render_3d_opengl.cpp.
References setLayerMaterial().
Referenced by Redraw().
|
private |
Definition at line 176 of file render_3d_opengl.cpp.
References RENDER_3D_BASE::m_boardAdapter, BOARD_ADAPTER::m_CopperColor, m_materials, BOARD_ADAPTER::m_SilkScreenColorBot, BOARD_ADAPTER::m_SilkScreenColorTop, BOARD_ADAPTER::m_SolderPasteColor, and mapf().
Referenced by Redraw().
|
private |
Definition at line 414 of file render_3d_opengl.cpp.
Referenced by Redraw().
|
private |
Definition at line 235 of file render_3d_opengl.h.
Referenced by freeAllLists(), get3dModelsFromFootprint(), load3dModels(), Load3dModelsIfNeeded(), and RENDER_3D_OPENGL().
|
private |
Definition at line 236 of file render_3d_opengl.h.
Referenced by freeAllLists(), and get3dModelsFromFootprint().
|
private |
Definition at line 220 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 240 of file render_3d_opengl.h.
Referenced by generateViasAndPads(), and reload().
|
private |
Definition at line 218 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(), get3dModelsFromFootprint(), get3dModelsSelected(), 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(), RENDER_3D_RAYTRACE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE::renderBlockTracing(), renderBoardBody(), renderModel(), renderOpaqueModels(), renderSolderMaskLayer(), renderTransparentModels(), setLayerMaterial(), setupMaterials(), RENDER_3D_RAYTRACE::setupMaterials(), and RENDER_3D_RAYTRACE::shadeHit().
|
private |
Definition at line 219 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 renderTransparentModels().
|
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 226 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 206 of file render_3d_opengl.h.
|
private |
Definition at line 238 of file render_3d_opengl.h.
Referenced by get3dModelsSelected(), RENDER_3D_OPENGL(), and SetCurrentRollOverItem().
SMATERIAL RENDER_3D_OPENGL::m_EpoxyBoard |
Definition at line 204 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_GrayMaterial |
Definition at line 208 of file render_3d_opengl.h.
|
private |
oGL list that stores current grid
Definition at line 228 of file render_3d_opengl.h.
Referenced by freeAllLists(), generate3dGrid(), Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 217 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 229 of file render_3d_opengl.h.
Referenced by Redraw(), and RENDER_3D_OPENGL().
|
private |
Definition at line 211 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().
SMATERIAL RENDER_3D_OPENGL::m_NonPlatedCopper |
Definition at line 205 of file render_3d_opengl.h.
|
private |
Definition at line 215 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 214 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 216 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 223 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 221 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), RENDER_3D_OPENGL(), and renderSolderMaskLayer().
|
private |
Definition at line 222 of file render_3d_opengl.h.
Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 232 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateViasAndPads(), Redraw(), and RENDER_3D_OPENGL().
SMATERIAL RENDER_3D_OPENGL::m_Paste |
Definition at line 200 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_Plastic |
Definition at line 207 of file render_3d_opengl.h.
|
private |
Definition at line 213 of file render_3d_opengl.h.
Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().
|
private |
Definition at line 212 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 201 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_SilkSTop |
Definition at line 202 of file render_3d_opengl.h.
SMATERIAL RENDER_3D_OPENGL::m_SolderMask |
Definition at line 203 of file render_3d_opengl.h.
|
private |
store pointers so can be deleted latter
Definition at line 225 of file render_3d_opengl.h.
Referenced by freeAllLists(), generateEmptyLayerList(), generateLayerList(), and RENDER_3D_OPENGL().
|
private |
Definition at line 231 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().