25#ifndef RENDER_3D_OPENGL_H 
   26#define RENDER_3D_OPENGL_H 
   48#define SIZE_OF_CIRCLE_TEXTURE 1024 
   96                             float aZtop, 
float aZbot );
 
   99                             float aZtop, 
float aZbot );
 
  102                             float aZtop, 
float aZbot );
 
  105                             float aZtop, 
float aZbot );
 
  108                             float aZtop, 
float aZbot );
 
  111                                bool aSkipRenderHoles );
 
  118                       unsigned int aNr_sides_per_circle,
 
  119                       std::vector< SFVEC2F >& aInnerContourResult,
 
  120                       std::vector< SFVEC2F >& aOuterContourResult, 
bool aInvertOrder );
 
  123                           float aZtop, 
float aZbot, 
unsigned int aNr_sides_per_circle,
 
  170    void renderModel( 
const glm::mat4 &aCameraViewMatrix, 
const MODELTORENDER &aModelToRender,
 
  174    void get3dModelsSelected( std::list<MODELTORENDER> &aDstRenderList, 
bool aGetTop, 
bool aGetBot,
 
  175                              bool aRenderTransparentOnly, 
bool aRenderSelectedOnly );
 
  178                                   const FOOTPRINT* aFootprint, 
bool aRenderTransparentOnly,
 
 
defines the basic data associated with a single 3D model.
 
A simplified non-intersecting 4 point polygon.
 
Helper class to handle information needed to display 3D board.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
A class used to derive camera objects from.
 
Implement a canvas based on a wxGLCanvas.
 
Store the OpenGL display lists to related with a layer.
 
Simple non-intersecting polygon with 4 points.
 
RENDER_3D_BASE(BOARD_ADAPTER &aBoardAdapter, CAMERA &aCamera)
 
OPENGL_RENDER_LIST * m_board
 
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)
 
void generateCylinder(const SFVEC2F &aCenter, float aInnerRadius, float aOuterRadius, float aZtop, float aZbot, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer)
 
OPENGL_RENDER_LIST * m_outerThroughHoleRings
 
OPENGL_RENDER_LIST * m_offboardPadsFront
 
SPHERES_GIZMO::GizmoSphereSelection getSelectedGizmoSphere() 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)
 
SHAPE_POLY_SET m_antiBoardPolys
The negative polygon representation of the board outline.
 
void load3dModels(REPORTER *aStatusReporter)
Load footprint models from the cache and load it to openGL lists in the form of MODEL_3D objects.
 
void generateViasAndPads()
 
GRID3D_TYPE m_lastGridType
Stores the last grid type.
 
std::tuple< int, int, int, int > getGizmoViewport() const
 
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 * m_microviaHoles
 
void renderOpaqueModels(const glm::mat4 &aCameraViewMatrix)
 
OPENGL_RENDER_LIST * createBoard(const SHAPE_POLY_SET &aBoardPoly, const BVH_CONTAINER_2D *aThroughHoles=nullptr)
 
void Load3dModelsIfNeeded()
Load footprint models if they are not already loaded, i.e.
 
void generate3dGrid(GRID3D_TYPE aGridType)
Create a 3D grid to an OpenGL display list.
 
void setLightFront(bool enabled)
 
void addObjectTriangles(const RING_2D *aRing, TRIANGLE_DISPLAY_LIST *aDstLayer, float aZtop, float aZbot)
 
bool Redraw(bool aIsMoving, REPORTER *aStatusReporter, REPORTER *aWarningReporter) override
Redraw the view.
 
MAP_OGL_DISP_LISTS m_layers
 
MAP_OGL_DISP_LISTS m_innerLayerHoles
 
OPENGL_RENDER_LIST * m_boardWithHoles
 
RENDER_3D_OPENGL(EDA_3D_CANVAS *aCanvas, BOARD_ADAPTER &aAdapter, CAMERA &aCamera)
 
MAP_OGL_DISP_LISTS m_outerLayerHoles
 
OPENGL_RENDER_LIST * m_offboardPadsBack
 
BOARD_ITEM * m_currentRollOverItem
 
void renderBoardBody(bool aSkipRenderHoles)
 
std::map< std::vector< float >, glm::mat4 > m_3dModelMatrixMap
 
std::map< wxString, MODEL_3D * > m_3dModelMap
 
OPENGL_RENDER_LIST * m_viaBackCover
 
void SetCurrentRollOverItem(BOARD_ITEM *aRollOverItem)
 
OPENGL_RENDER_LIST * m_viaFrontCover
 
OPENGL_RENDER_LIST * generateEmptyLayerList(PCB_LAYER_ID aLayer)
 
LIST_TRIANGLES m_triangles
store pointers so can be deleted latter
 
OPENGL_RENDER_LIST * m_outerViaThroughHoles
 
OPENGL_RENDER_LIST * m_outerThroughHoles
 
void setLayerMaterial(PCB_LAYER_ID aLayerID)
 
OPENGL_RENDER_LIST * m_platedPadsFront
 
void resetSelectedGizmoSphere()
 
struct RENDER_3D_OPENGL::@136145154067207014164113243162246125147361200233 m_materials
 
void renderModel(const glm::mat4 &aCameraViewMatrix, const MODELTORENDER &aModelToRender, const SFVEC3F &aSelColor, const SFVEC3F *aCameraWorldPos)
 
int GetWaitForEditingTimeOut() override
Give the interface the time (in ms) that it should wait for editing or movements before (this works f...
 
SMATERIAL m_NonPlatedCopper
 
void renderSolderMaskLayer(PCB_LAYER_ID aLayerID, float aZPos, bool aShowThickness, bool aSkipRenderHoles)
 
void renderTransparentModels(const glm::mat4 &aCameraViewMatrix)
 
void generateDisk(const SFVEC2F &aCenter, float aRadius, float aZ, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer, bool aTop)
 
void get3dModelsSelected(std::list< MODELTORENDER > &aDstRenderList, bool aGetTop, bool aGetBot, bool aRenderTransparentOnly, bool aRenderSelectedOnly)
 
void setPlatedCopperAndDepthOffset(PCB_LAYER_ID aLayer_id)
 
OPENGL_RENDER_LIST * m_antiBoard
 
void getLayerZPos(PCB_LAYER_ID aLayerID, float &aOutZtop, float &aOutZbot) const
 
void SetCurWindowSize(const wxSize &aSize) override
Before each render, the canvas will tell the render what is the size of its windows,...
 
OPENGL_RENDER_LIST * m_padHoles
 
void addTopAndBottomTriangles(TRIANGLE_DISPLAY_LIST *aDst, const SFVEC2F &v0, const SFVEC2F &v1, const SFVEC2F &v2, float top, float bot)
 
SPHERES_GIZMO * m_spheres_gizmo
 
GLuint m_grid
oGL list that stores current grid
 
OPENGL_RENDER_LIST * m_platedPadsBack
 
void generateDimple(const SFVEC2F &aCenter, float aRadius, float aZ, float aDepth, unsigned int aNr_sides_per_circle, TRIANGLE_DISPLAY_LIST *aDstLayer, bool aTop)
 
void get3dModelsFromFootprint(std::list< MODELTORENDER > &aDstRenderList, const FOOTPRINT *aFootprint, bool aRenderTransparentOnly, bool aIsSelected)
 
void handleGizmoMouseInput(int mouseX, int mouseY)
 
void setLightBottom(bool enabled)
 
void setGizmoViewport(int x, int y, int width, int height)
 
void setLightTop(bool enabled)
 
A pure virtual class used to derive REPORTER objects from.
 
Represent a set of closed polygons.
 
Renders a set of colored spheres in 3D space that act as a directional orientation gizmo.
 
GizmoSphereSelection
Enum to indicate which sphere (direction) is selected.
 
Store arrays of triangles to be used to create display lists.
 
std::list< OBJECT_2D * > LIST_OBJECT2D
 
PCB_LAYER_ID
A quick note on layer IDs:
 
std::list< TRIANGLE_DISPLAY_LIST * > LIST_TRIANGLES
 
std::map< PCB_LAYER_ID, OPENGL_RENDER_LIST * > MAP_OGL_DISP_LISTS
 
MODELTORENDER(glm::mat4 aModelWorldMat, const MODEL_3D *aNodel, float aOpacity, bool aIsTransparent, bool aIsSelected)
 
glm::mat4 m_modelWorldMat