KiCad PCB EDA Suite
Loading...
Searching...
No Matches
RENDER_3D_OPENGL Class Reference

Object to render the board using openGL. More...

#include <render_3d_opengl.h>

Inheritance diagram for RENDER_3D_OPENGL:
RENDER_3D_BASE

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 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_INDICATORCreateBusyIndicator () const
 Return a created busy indicator, if a factory has been set, else a null pointer.
 

Protected Attributes

BOARD_ADAPTERm_boardAdapter
 
CAMERAm_camera
 Flag if the canvas specific for this render was already initialized.
 
bool m_canvasInitialized
 
bool m_reloadRequested
 The window size that this camera is working.
 
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.
 

Private Member Functions

OPENGL_RENDER_LISTgenerateHoles (const LIST_OBJECT2D &aListHolesObject2d, const SHAPE_POLY_SET &aPoly, float aZtop, float aZbot, bool aInvertFaces, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
 
OPENGL_RENDER_LISTgenerateLayerList (const BVH_CONTAINER_2D *aContainer, const SHAPE_POLY_SET *aPolyList, PCB_LAYER_ID aLayer, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
 
OPENGL_RENDER_LISTgenerateEmptyLayerList (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.
 
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.
 
void setupMaterials ()
 
void setCopperMaterial ()
 
void setPlatedCopperAndDepthOffset (PCB_LAYER_ID aLayer_id)
 
void unsetDepthOffset ()
 
void setLayerMaterial (PCB_LAYER_ID aLayerID)
 
bool initializeOpenGL ()
 
OPENGL_RENDER_LISTcreateBoard (const SHAPE_POLY_SET &aBoardPoly, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
 
void reload (REPORTER *aStatusReporter, REPORTER *aWarningReporter)
 
void setArrowMaterial ()
 
void freeAllLists ()
 

Private Attributes

struct {
   SMATERIAL   m_Paste
 
   SMATERIAL   m_SilkSBot
 
   SMATERIAL   m_SilkSTop
 
   SMATERIAL   m_SolderMask
 
   SMATERIAL   m_EpoxyBoard
 
   SMATERIAL   m_NonPlatedCopper
 
   SMATERIAL   m_Copper
 
   SMATERIAL   m_Plastic
 
   SMATERIAL   m_GrayMaterial
 
m_materials
 
EDA_3D_CANVASm_canvas
 
MAP_OGL_DISP_LISTS m_layers
 
OPENGL_RENDER_LISTm_platedPadsFront
 
OPENGL_RENDER_LISTm_platedPadsBack
 
OPENGL_RENDER_LISTm_offboardPadsFront
 
OPENGL_RENDER_LISTm_offboardPadsBack
 
MAP_OGL_DISP_LISTS m_outerLayerHoles
 
MAP_OGL_DISP_LISTS m_innerLayerHoles
 
OPENGL_RENDER_LISTm_board
 
OPENGL_RENDER_LISTm_boardWithHoles
 
OPENGL_RENDER_LISTm_antiBoard
 
OPENGL_RENDER_LISTm_outerThroughHoles
 
OPENGL_RENDER_LISTm_outerViaThroughHoles
 
OPENGL_RENDER_LISTm_outerThroughHoleRings
 
LIST_TRIANGLES m_triangles
 store pointers so can be deleted latter
 
GLuint m_circleTexture
 
GLuint m_grid
 oGL list that stores current grid
 
GRID3D_TYPE m_lastGridType
 Stores the last grid type.
 
OPENGL_RENDER_LISTm_vias
 
OPENGL_RENDER_LISTm_padHoles
 
std::map< wxString, MODEL_3D * > m_3dModelMap
 
std::map< std::vector< float >, glm::mat4 > m_3dModelMatrixMap
 
BOARD_ITEMm_currentRollOverItem
 
SHAPE_POLY_SET m_antiBoardPolys
 The negative polygon representation of the board outline.
 
BUSY_INDICATOR::FACTORY m_busyIndicatorFactory
 < Factory that returns a suitable busy indicator for the context.
 

Detailed Description

Object to render the board using openGL.

Definition at line 52 of file render_3d_opengl.h.

Constructor & Destructor Documentation

◆ RENDER_3D_OPENGL()

◆ ~RENDER_3D_OPENGL()

RENDER_3D_OPENGL::~RENDER_3D_OPENGL ( )

Definition at line 86 of file render_3d_opengl.cpp.

References freeAllLists(), m_circleTexture, and RENDER_3D_BASE::m_logTrace.

Member Function Documentation

◆ addObjectTriangles() [1/5]

void RENDER_3D_OPENGL::addObjectTriangles ( const FILLED_CIRCLE_2D aCircle,
TRIANGLE_DISPLAY_LIST aDstLayer,
float  aZtop,
float  aZbot 
)
private

◆ addObjectTriangles() [2/5]

void RENDER_3D_OPENGL::addObjectTriangles ( const POLYGON_4PT_2D aPoly,
TRIANGLE_DISPLAY_LIST aDstLayer,
float  aZtop,
float  aZbot 
)
private

◆ addObjectTriangles() [3/5]

◆ addObjectTriangles() [4/5]

◆ addObjectTriangles() [5/5]

void RENDER_3D_OPENGL::addObjectTriangles ( const TRIANGLE_2D aTri,
TRIANGLE_DISPLAY_LIST aDstLayer,
float  aZtop,
float  aZbot 
)
private

◆ addTopAndBottomTriangles()

void RENDER_3D_OPENGL::addTopAndBottomTriangles ( TRIANGLE_DISPLAY_LIST aDst,
const SFVEC2F v0,
const SFVEC2F v1,
const SFVEC2F v2,
float  top,
float  bot 
)
private

◆ createBoard()

◆ CreateBusyIndicator()

std::unique_ptr< BUSY_INDICATOR > RENDER_3D_BASE::CreateBusyIndicator ( ) const
protectedinherited

Return a created busy indicator, if a factory has been set, else a null pointer.

Settings reference in use for this render.

Definition at line 69 of file render_3d_base.cpp.

References RENDER_3D_BASE::m_busyIndicatorFactory.

Referenced by Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().

◆ freeAllLists()

◆ generate3dGrid()

void RENDER_3D_OPENGL::generate3dGrid ( GRID3D_TYPE  aGridType)
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 1260 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().

◆ generateCylinder()

void RENDER_3D_OPENGL::generateCylinder ( const SFVEC2F aCenter,
float  aInnerRadius,
float  aOuterRadius,
float  aZtop,
float  aZbot,
unsigned int  aNr_sides_per_circle,
TRIANGLE_DISPLAY_LIST aDstLayer 
)
private

◆ generateEmptyLayerList()

OPENGL_RENDER_LIST * RENDER_3D_OPENGL::generateEmptyLayerList ( PCB_LAYER_ID  aLayer)
private

Definition at line 380 of file opengl/create_scene.cpp.

References getLayerZPos(), m_circleTexture, and m_triangles.

Referenced by reload().

◆ generateHoles()

OPENGL_RENDER_LIST * RENDER_3D_OPENGL::generateHoles ( const LIST_OBJECT2D aListHolesObject2d,
const SHAPE_POLY_SET aPoly,
float  aZtop,
float  aZbot,
bool  aInvertFaces,
const BVH_CONTAINER_2D aThroughHoles = nullptr 
)
private

◆ generateLayerList()

◆ generateRing()

void RENDER_3D_OPENGL::generateRing ( const SFVEC2F aCenter,
float  aInnerRadius,
float  aOuterRadius,
unsigned int  aNr_sides_per_circle,
std::vector< SFVEC2F > &  aInnerContourResult,
std::vector< SFVEC2F > &  aOuterContourResult,
bool  aInvertOrder 
)
private

Definition at line 84 of file opengl/create_scene.cpp.

References delta.

Referenced by addObjectTriangles(), and generateCylinder().

◆ generateViasAndPads()

◆ get3dModelsFromFootprint()

◆ get3dModelsSelected()

void RENDER_3D_OPENGL::get3dModelsSelected ( std::list< MODELTORENDER > &  aDstRenderList,
bool  aGetTop,
bool  aGetBot,
bool  aRenderTransparentOnly,
bool  aRenderSelectedOnly 
)
private

◆ getLayerZPos()

void RENDER_3D_OPENGL::getLayerZPos ( PCB_LAYER_ID  aLayerID,
float &  aOutZtop,
float &  aOutZbot 
) const
private

◆ GetWaitForEditingTimeOut()

int RENDER_3D_OPENGL::GetWaitForEditingTimeOut ( )
overridevirtual

Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode).

Returns
a value in milliseconds

Implements RENDER_3D_BASE.

Definition at line 96 of file render_3d_opengl.cpp.

◆ initializeOpenGL()

◆ IsReloadRequestPending()

bool RENDER_3D_BASE::IsReloadRequestPending ( ) const
inlineinherited

Query if there is a pending reload request.

Returns
true if it wants to reload, false if there is no reload pending

Definition at line 77 of file render_3d_base.h.

References RENDER_3D_BASE::m_reloadRequested.

Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::IsReloadRequestPending(), and EDA_3D_CANVAS::OnMouseMove().

◆ load3dModels()

◆ Load3dModelsIfNeeded()

void RENDER_3D_OPENGL::Load3dModelsIfNeeded ( )

Load footprint models if they are not already loaded, i.e.

if m_3dModelMap is empty

Definition at line 896 of file opengl/create_scene.cpp.

References load3dModels(), m_3dModelMap, and m_canvas.

Referenced by APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged().

◆ Redraw()

bool RENDER_3D_OPENGL::Redraw ( bool  aIsMoving,
REPORTER aStatusReporter,
REPORTER aWarningReporter 
)
overridevirtual

Redraw the view.

Parameters
aIsMovingif the user is moving the scene, it should be render in preview mode.
aStatusReportera pointer to the status progress reporter.
Returns
true if the render would like to redraw again.

Implements RENDER_3D_BASE.

Definition at line 471 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::DrawAll(), OPENGL_RENDER_LIST::DrawCulled(), F_Cu, F_Mask, F_Paste, F_SilkS, generate3dGrid(), GL_CONTEXT_MANAGER::Get(), BOARD_ADAPTER::GetLayerBottomZPos(), BOARD_ADAPTER::GetLayerTopZPos(), CAMERA::GetPos(), CAMERA::GetProjectionMatrix(), CAMERA::GetViewMatrix(), BOARD_ADAPTER::GetVisibleLayers(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, initializeOpenGL(), IsCopperLayer(), 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, RENDER_3D_BASE::m_canvasInitialized, BOARD_ADAPTER::m_Cfg, m_circleTexture, m_grid, 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(), premultiplyAlpha(), reload, render3dArrows(), renderBoardBody(), renderOpaqueModels(), renderSolderMaskLayer(), renderTransparentModels(), REPORTER::Report(), GL_CONTEXT_MANAGER::RunWithoutCtxLock(), 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().

◆ reload()

void RENDER_3D_OPENGL::reload ( REPORTER aStatusReporter,
REPORTER aWarningReporter 
)
private

Definition at line 450 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::DifferentiatePlatedCopper(), F_Cu, F_Mask, F_SilkS, freeAllLists(), generateEmptyLayerList(), generateHoles(), generateLayerList(), generateViasAndPads(), BOARD_ADAPTER::GetBackPlatedPadAndGraphicPolys(), BOARD_ADAPTER::GetBoard(), BOARD_ADAPTER::GetBoardCenter(), BOARD_ADAPTER::GetBoardPoly(), BOARD_ADAPTER::GetFrontPlatedPadAndGraphicPolys(), 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.

◆ ReloadRequest()

void RENDER_3D_BASE::ReloadRequest ( )
inlineinherited
Todo:
This must be reviewed to add flags to improve specific render.

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().

◆ render3dArrows()

void RENDER_3D_OPENGL::render3dArrows ( )
private

◆ renderBoardBody()

◆ renderModel()

◆ renderOpaqueModels()

◆ renderSolderMaskLayer()

void RENDER_3D_OPENGL::renderSolderMaskLayer ( PCB_LAYER_ID  aLayerID,
float  aZPos,
bool  aShowThickness,
bool  aSkipRenderHoles 
)
private

◆ renderTransparentModels()

◆ setArrowMaterial()

void RENDER_3D_OPENGL::setArrowMaterial ( )
private

Definition at line 858 of file render_3d_opengl.cpp.

Referenced by render3dArrows().

◆ SetBusyIndicatorFactory()

void RENDER_3D_BASE::SetBusyIndicatorFactory ( BUSY_INDICATOR::FACTORY  aNewFactory)
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 RENDER_3D_BASE::m_busyIndicatorFactory.

◆ setCopperMaterial()

void RENDER_3D_OPENGL::setCopperMaterial ( )
private

Definition at line 418 of file render_3d_opengl.cpp.

References m_materials, and OglSetMaterial().

Referenced by Redraw().

◆ SetCurrentRollOverItem()

void RENDER_3D_OPENGL::SetCurrentRollOverItem ( BOARD_ITEM aRollOverItem)
inline

Definition at line 64 of file render_3d_opengl.h.

References m_currentRollOverItem.

Referenced by EDA_3D_CANVAS::OnMouseMove().

◆ SetCurWindowSize()

void RENDER_3D_OPENGL::SetCurWindowSize ( const wxSize &  aSize)
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.

Parameters
aSizethe current size of the render window

Implements RENDER_3D_BASE.

Definition at line 102 of file render_3d_opengl.cpp.

References RENDER_3D_BASE::m_windowSize.

◆ setLayerMaterial()

◆ setLightBottom()

void RENDER_3D_OPENGL::setLightBottom ( bool  enabled)
private

Definition at line 132 of file render_3d_opengl.cpp.

Referenced by Redraw().

◆ setLightFront()

void RENDER_3D_OPENGL::setLightFront ( bool  enabled)
private

Definition at line 114 of file render_3d_opengl.cpp.

Referenced by Redraw().

◆ setLightTop()

void RENDER_3D_OPENGL::setLightTop ( bool  enabled)
private

Definition at line 123 of file render_3d_opengl.cpp.

Referenced by Redraw().

◆ setPlatedCopperAndDepthOffset()

void RENDER_3D_OPENGL::setPlatedCopperAndDepthOffset ( PCB_LAYER_ID  aLayer_id)
private

Definition at line 424 of file render_3d_opengl.cpp.

References setLayerMaterial().

Referenced by Redraw().

◆ setupMaterials()

◆ unsetDepthOffset()

void RENDER_3D_OPENGL::unsetDepthOffset ( )
private

Definition at line 432 of file render_3d_opengl.cpp.

Referenced by Redraw().

Member Data Documentation

◆ m_3dModelMap

std::map<wxString, MODEL_3D*> RENDER_3D_OPENGL::m_3dModelMap
private

◆ m_3dModelMatrixMap

std::map<std::vector<float>, glm::mat4> RENDER_3D_OPENGL::m_3dModelMatrixMap
private

Definition at line 238 of file render_3d_opengl.h.

Referenced by freeAllLists(), and get3dModelsFromFootprint().

◆ m_antiBoard

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_antiBoard
private

Definition at line 222 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_antiBoardPolys

SHAPE_POLY_SET RENDER_3D_OPENGL::m_antiBoardPolys
private

The negative polygon representation of the board outline.

Definition at line 242 of file render_3d_opengl.h.

Referenced by generateViasAndPads(), and reload().

◆ m_board

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_board
private

◆ m_boardAdapter

◆ m_boardWithHoles

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_boardWithHoles
private

Definition at line 221 of file render_3d_opengl.h.

Referenced by freeAllLists(), reload(), RENDER_3D_OPENGL(), and renderBoardBody().

◆ m_busyIndicatorFactory

BUSY_INDICATOR::FACTORY RENDER_3D_BASE::m_busyIndicatorFactory
privateinherited

< Factory that returns a suitable busy indicator for the context.

Definition at line 125 of file render_3d_base.h.

Referenced by RENDER_3D_BASE::CreateBusyIndicator(), and RENDER_3D_BASE::SetBusyIndicatorFactory().

◆ m_camera

CAMERA& RENDER_3D_BASE::m_camera
protectedinherited

◆ m_canvas

EDA_3D_CANVAS* RENDER_3D_OPENGL::m_canvas
private

Definition at line 211 of file render_3d_opengl.h.

Referenced by Load3dModelsIfNeeded().

◆ m_canvasInitialized

bool RENDER_3D_BASE::m_canvasInitialized
protectedinherited
Todo:
This must be reviewed in order to flag change types.

Definition at line 107 of file render_3d_base.h.

Referenced by initializeOpenGL(), Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), and RENDER_3D_BASE::RENDER_3D_BASE().

◆ m_circleTexture

◆ m_Copper

SMATERIAL RENDER_3D_OPENGL::m_Copper

Definition at line 206 of file render_3d_opengl.h.

◆ m_currentRollOverItem

BOARD_ITEM* RENDER_3D_OPENGL::m_currentRollOverItem
private

◆ m_EpoxyBoard

SMATERIAL RENDER_3D_OPENGL::m_EpoxyBoard

Definition at line 204 of file render_3d_opengl.h.

◆ m_GrayMaterial

SMATERIAL RENDER_3D_OPENGL::m_GrayMaterial

Definition at line 208 of file render_3d_opengl.h.

◆ m_grid

GLuint RENDER_3D_OPENGL::m_grid
private

oGL list that stores current grid

Definition at line 230 of file render_3d_opengl.h.

Referenced by freeAllLists(), generate3dGrid(), Redraw(), and RENDER_3D_OPENGL().

◆ m_innerLayerHoles

MAP_OGL_DISP_LISTS RENDER_3D_OPENGL::m_innerLayerHoles
private

Definition at line 219 of file render_3d_opengl.h.

Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().

◆ m_lastGridType

GRID3D_TYPE RENDER_3D_OPENGL::m_lastGridType
private

Stores the last grid type.

Definition at line 231 of file render_3d_opengl.h.

Referenced by Redraw(), and RENDER_3D_OPENGL().

◆ m_layers

MAP_OGL_DISP_LISTS RENDER_3D_OPENGL::m_layers
private

◆ 

struct { ... } RENDER_3D_OPENGL::m_materials

◆ m_NonPlatedCopper

SMATERIAL RENDER_3D_OPENGL::m_NonPlatedCopper

Definition at line 205 of file render_3d_opengl.h.

◆ m_offboardPadsBack

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_offboardPadsBack
private

Definition at line 217 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_offboardPadsFront

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_offboardPadsFront
private

Definition at line 216 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_outerLayerHoles

MAP_OGL_DISP_LISTS RENDER_3D_OPENGL::m_outerLayerHoles
private

Definition at line 218 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_outerThroughHoleRings

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_outerThroughHoleRings
private

Definition at line 225 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_outerThroughHoles

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_outerThroughHoles
private

◆ m_outerViaThroughHoles

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_outerViaThroughHoles
private

Definition at line 224 of file render_3d_opengl.h.

Referenced by freeAllLists(), reload(), and RENDER_3D_OPENGL().

◆ m_padHoles

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_padHoles
private

Definition at line 234 of file render_3d_opengl.h.

Referenced by freeAllLists(), generateViasAndPads(), Redraw(), and RENDER_3D_OPENGL().

◆ m_Paste

SMATERIAL RENDER_3D_OPENGL::m_Paste

Definition at line 200 of file render_3d_opengl.h.

◆ m_Plastic

SMATERIAL RENDER_3D_OPENGL::m_Plastic

Definition at line 207 of file render_3d_opengl.h.

◆ m_platedPadsBack

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_platedPadsBack
private

Definition at line 215 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_platedPadsFront

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_platedPadsFront
private

Definition at line 214 of file render_3d_opengl.h.

Referenced by freeAllLists(), Redraw(), reload(), and RENDER_3D_OPENGL().

◆ m_reloadRequested

bool RENDER_3D_BASE::m_reloadRequested
protectedinherited

◆ m_SilkSBot

SMATERIAL RENDER_3D_OPENGL::m_SilkSBot

Definition at line 201 of file render_3d_opengl.h.

◆ m_SilkSTop

SMATERIAL RENDER_3D_OPENGL::m_SilkSTop

Definition at line 202 of file render_3d_opengl.h.

◆ m_SolderMask

SMATERIAL RENDER_3D_OPENGL::m_SolderMask

Definition at line 203 of file render_3d_opengl.h.

◆ m_triangles

LIST_TRIANGLES RENDER_3D_OPENGL::m_triangles
private

store pointers so can be deleted latter

Definition at line 227 of file render_3d_opengl.h.

Referenced by freeAllLists(), generateEmptyLayerList(), generateLayerList(), and RENDER_3D_OPENGL().

◆ m_vias

OPENGL_RENDER_LIST* RENDER_3D_OPENGL::m_vias
private

Definition at line 233 of file render_3d_opengl.h.

Referenced by freeAllLists(), generateViasAndPads(), Redraw(), and RENDER_3D_OPENGL().

◆ m_windowSize


The documentation for this class was generated from the following files: