|
KiCad PCB EDA Suite
|
#include <render_3d_raytrace_ram.h>
Public Member Functions | |
| RENDER_3D_RAYTRACE_RAM (BOARD_ADAPTER &aAdapter, CAMERA &aCamera) | |
| ~RENDER_3D_RAYTRACE_RAM () | |
| uint8_t * | GetBuffer () |
| wxSize | GetRealBufferSize () |
| 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) 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 | Reload (bool aOnlyLoadCopperAndShapes, std::stop_token aStop={}) |
| void | InvalidateHitTesting () |
| Drop the hover BVH so IntersectBoardItem becomes a no-op. | |
| BOARD_ITEM * | IntersectBoardItem (const RAY &aRay) |
| void | ReloadRequest () |
| bool | IsReloadRequestPending () const |
| Query if there is a pending reload request. | |
| virtual void | JoinBgWorker () |
| Block until any in-progress background loading has finished. | |
| virtual void | StopBgWorker () |
| Request stop and join any in-progress background loading. | |
| void | SetBusyIndicatorFactory (BUSY_INDICATOR::FACTORY aNewFactory) |
| Set a new busy indicator factory. | |
| void | SetReporters (std::shared_ptr< REPORTER > aActivityReporter, std::shared_ptr< REPORTER > aWarningReporter) |
| Set the reporters for activity and warning messages. | |
Static Public Attributes | |
| static constexpr float | MIN_DISTANCE_IU = 4 * PCB_IU_PER_MM |
Protected Member Functions | |
| void | createItemsFromContainer (const BVH_CONTAINER_2D *aContainer2d, PCB_LAYER_ID aLayer_id, const MATERIAL *aMaterialLayer, const SFVEC3F &aLayerColor, float aLayerZOffset) |
| void | restartRenderState () |
| void | renderTracing (uint8_t *ptrPBO) |
| void | postProcessShading (uint8_t *ptrPBO) |
| void | postProcessBlurFinish (uint8_t *ptrPBO) |
| void | renderBlockTracing (uint8_t *ptrPBO, signed int iBlock) |
| void | renderFinalColor (uint8_t *ptrPBO, const SFVEC4F &rgbColor, bool applyColorSpaceConversion) |
| void | renderRayPackets (const SFVEC4F *bgColorY, const RAY *aRayPkt, HITINFO_PACKET *aHitPacket, bool is_testShadow, SFVEC4F *aOutHitColor) |
| void | renderAntiAliasPackets (const SFVEC4F *aBgColorY, const HITINFO_PACKET *aHitPck_X0Y0, const HITINFO_PACKET *aHitPck_AA_X1Y1, const RAY *aRayPck, SFVEC4F *aOutHitColor) |
| void | setupMaterials () |
| SFVEC4F | shadeHit (const SFVEC4F &aBgColor, const RAY &aRay, HITINFO &aHitInfo, bool aIsInsideObject, unsigned int aRecursiveLevel, bool is_testShadow) const |
| void | createObject (CONTAINER_3D &aDstContainer, const OBJECT_2D *aObject2D, float aZMin, float aZMax, const MATERIAL *aMaterial, const SFVEC3F &aObjColor) |
| Create one or more 3D objects form a 2D object and Z positions. | |
| void | addPadsAndVias () |
| void | insertHole (const PCB_VIA *aVia) |
| void | insertHole (const PAD *aPad) |
| void | addCounterborePlating (const BOARD_ITEM &aSource, const SFVEC2F &aCenter, float aInnerRadius, float aDepth, float aSurfaceZ, bool aIsFront) |
| void | addCountersinkPlating (const SFVEC2F &aCenter, float aTopInnerRadius, float aBottomInnerRadius, float aSurfaceZ, float aDepth, bool aIsFront) |
| void | backfillPostMachine () |
| void | load3DModels (CONTAINER_3D &aDstContainer, bool aSkipMaterialInformation, std::stop_token aStop={}) |
| void | addPlaceholderToRaytracer (CONTAINER_3D &aDstContainer, const FOOTPRINT *aFootprint, const glm::mat4 &aFpMatrix, bool aHasExtrudedBody=false, float aOpacity=1.0f) |
| bool | addExtrudedBodyToRaytracer (CONTAINER_3D &aDstContainer, const FOOTPRINT *aFootprint) |
| void | addModels (CONTAINER_3D &aDstContainer, const S3DMODEL *a3DModel, const glm::mat4 &aModelMatrix, float aFPOpacity, bool aSkipMaterialInformation, BOARD_ITEM *aBoardItem) |
| MODEL_MATERIALS * | getModelMaterial (const S3DMODEL *a3DModel) |
| void | initializeBlockPositions () |
| void | render (uint8_t *ptrPBO) |
| void | renderPreview (uint8_t *ptrPBO) |
| std::unique_ptr< BUSY_INDICATOR > | CreateBusyIndicator () const |
| Return a created busy indicator, if a factory has been set, else a null pointer. | |
Static Protected Member Functions | |
| static SFVEC4F | premultiplyAlpha (const SFVEC4F &aInput) |
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 | |
| void | initPbo () override |
| void | deletePbo () override |
Private Attributes | |
| uint8_t * | m_outputBuffer |
| uint32_t | m_pboDataSize |
| BUSY_INDICATOR::FACTORY | m_busyIndicatorFactory |
| Factory that returns a suitable busy indicator for the context. | |
Definition at line 28 of file render_3d_raytrace_ram.h.
|
explicit |
Definition at line 26 of file render_3d_raytrace_ram.cpp.
References m_outputBuffer, m_pboDataSize, and RENDER_3D_RAYTRACE_BASE::RENDER_3D_RAYTRACE_BASE().
| RENDER_3D_RAYTRACE_RAM::~RENDER_3D_RAYTRACE_RAM | ( | ) |
Definition at line 34 of file render_3d_raytrace_ram.cpp.
References deletePbo().
|
protectedinherited |
Definition at line 1130 of file raytracing/create_scene.cpp.
References ConvertSRGBToLinear(), RENDER_3D_BASE::m_boardAdapter, m_containerWithObjectsToDelete, m_materials, m_objectContainer, LAYER_ITEM::SetColor(), and OBJECT_3D::SetMaterial().
Referenced by insertHole(), and insertHole().
|
protectedinherited |
Definition at line 1157 of file raytracing/create_scene.cpp.
References ConvertSRGBToLinear(), copperColor(), RENDER_3D_BASE::m_boardAdapter, m_materials, m_objectContainer, radius, TRIANGLE::SetColor(), OBJECT_3D::SetMaterial(), and TRIANGLE.
Referenced by insertHole(), and insertHole().
|
protectedinherited |
Definition at line 2110 of file raytracing/create_scene.cpp.
References KIGFX::COLOR4D::a, CONTAINER_3D_BASE::Add(), addOutlineToRaytracerObjects(), ApplyExtrusionTransform(), KIGFX::COLOR4D::b, ConvertSRGBToLinear(), SHAPE_POLY_SET::Fracture(), KIGFX::COLOR4D::g, EXTRUDED_3D_BODY::GetDefaultColor(), FOOTPRINT::GetExtrudedBody(), GetExtrusionOutline(), GetExtrusionPinOutline(), GetMaterialProps(), FOOTPRINT::GetPosition(), FOOTPRINT::IsFlipped(), EXTRUSION_MATERIAL_PROPS::m_Ambient, RENDER_3D_BASE::m_boardAdapter, EXTRUDED_3D_BODY::m_color, m_containerWithObjectsToDelete, m_extrusionMaterials, EXTRUDED_3D_BODY::m_height, EXTRUDED_3D_BODY::m_material, m_materials, EXTRUDED_3D_BODY::m_offset, EXTRUDED_3D_BODY::m_scale, EXTRUSION_MATERIAL_PROPS::m_Shininess, EXTRUSION_MATERIAL_PROPS::m_Specular, EXTRUDED_3D_BODY::m_standoff, SHAPE_POLY_SET::OutlineCount(), pcbIUScale, KIGFX::COLOR4D::r, OBJECT_3D::SetBoardItem(), LAYER_ITEM::SetColor(), OBJECT_3D::SetMaterial(), OBJECT_3D::SetModelTransparency(), SHAPE_POLY_SET::Simplify(), KIGFX::COLOR4D::UNSPECIFIED, and VECTOR3< T >::z.
Referenced by load3DModels().
|
protectedinherited |
Definition at line 2481 of file raytracing/create_scene.cpp.
References CONTAINER_3D_BASE::Add(), CAD_MODE, ConvertSRGBToLinear(), getModelMaterial(), MATERIAL::GetTransparency(), IsTriangleInRange(), RENDER_3D_BASE::m_boardAdapter, SMESH::m_Color, SMATERIAL::m_Diffuse, SMESH::m_FaceIdx, SMESH::m_FaceIdxSize, SMESH::m_MaterialIdx, S3DMODEL::m_Materials, S3DMODEL::m_MaterialsSize, S3DMODEL::m_Meshes, S3DMODEL::m_MeshesSize, SMESH::m_Normals, SMESH::m_Positions, SMESH::m_VertexSize, MaterialDiffuseToColorCAD(), OBJECT_3D::SetBoardItem(), TRIANGLE::SetColor(), OBJECT_3D::SetMaterial(), OBJECT_3D::SetModelTransparency(), TRIANGLE, v1, and v2.
Referenced by load3DModels().
|
protectedinherited |
Definition at line 1937 of file raytracing/create_scene.cpp.
References insertHole(), RENDER_3D_BASE::m_boardAdapter, NPTH, pad, PCB_VIA_T, and via.
Referenced by Reload().
|
protectedinherited |
Definition at line 1966 of file raytracing/create_scene.cpp.
References std::abs(), CONTAINER_3D_BASE::Add(), CalcPlaceholderLocalBox(), BOX2< Vec >::GetCenter(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), FOOTPRINT::IsFlipped(), m_materials, pcbIUScale, OBJECT_3D::SetBoardItem(), TRIANGLE::SetColor(), OBJECT_3D::SetMaterial(), OBJECT_3D::SetModelTransparency(), TRIANGLE, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by load3DModels().
|
protectedinherited |
Definition at line 1254 of file raytracing/create_scene.cpp.
References EDA_ANGLE::AsRadians(), B_Cu, center, CIRCLE, ConvertSRGBToLinear(), COUNTERSINK, F_Cu, RENDER_3D_BASE::m_boardAdapter, m_containerWithObjectsToDelete, m_materials, m_objectContainer, NOT_POST_MACHINED, NPTH, pad, PCB_VIA_T, LAYER_ITEM::SetColor(), TRUNCATED_CONE::SetColor(), OBJECT_3D::SetMaterial(), TENTHS_OF_A_DEGREE_T, UNKNOWN, and via.
Referenced by Reload().
|
protectedinherited |
Return a created busy indicator, if a factory has been set, else a null pointer.
Definition at line 65 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().
|
protectedinherited |
Definition at line 245 of file raytracing/create_scene.cpp.
References B_Cu, B_Mask, B_Paste, B_SilkS, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annuli, ConvertSRGBToLinear(), CSGITEM_EMPTY, CSGITEM_FULL, F_Cu, F_Mask, F_Paste, F_SilkS, OBJECT_2D::GetBoardItem(), BVH_CONTAINER_2D::GetIntersectingObjects(), CONTAINER_2D_BASE::GetList(), m_antioutlineBoard2dObjects, RENDER_3D_BASE::m_boardAdapter, m_containerWithObjectsToDelete, m_objectContainer, LAYER_ITEM::SetColor(), OBJECT_3D::SetMaterial(), and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk.
Referenced by Reload().
|
protectedinherited |
Create one or more 3D objects form a 2D object and Z positions.
It tries to optimize some types of objects that will be faster to trace than the LAYER_ITEM object.
Definition at line 194 of file raytracing/create_scene.cpp.
References CONTAINER_3D_BASE::Add(), ConvertSRGBToLinear(), DUMMYBLOCK, OBJECT_2D::GetBBox(), OBJECT_2D::GetObjectType(), m_converted2dRoundSegmentCount, m_convertedDummyBlockCount, BBOX_2D::Max(), BBOX_2D::Min(), ROUNDSEG, LAYER_ITEM::SetColor(), ROUND_SEGMENT::SetColor(), XY_PLANE::SetColor(), and OBJECT_3D::SetMaterial().
Referenced by Reload().
|
overrideprivatevirtual |
Implements RENDER_3D_RAYTRACE_BASE.
Definition at line 52 of file render_3d_raytrace_ram.cpp.
References m_outputBuffer.
Referenced by initPbo(), and ~RENDER_3D_RAYTRACE_RAM().
| uint8_t * RENDER_3D_RAYTRACE_RAM::GetBuffer | ( | ) |
Definition at line 40 of file render_3d_raytrace_ram.cpp.
References m_outputBuffer.
Referenced by EDA_3D_VIEWER_FRAME::captureRaytracingScreenshot(), and PCBNEW_JOBS_HANDLER::JobExportRender().
|
protectedinherited |
Definition at line 2378 of file raytracing/create_scene.cpp.
References ConvertSRGBToLinear(), SMATERIAL::m_Ambient, RENDER_3D_BASE::m_boardAdapter, m_brushedMetalMaterial, SMATERIAL::m_Diffuse, SMATERIAL::m_Emissive, S3DMODEL::m_Materials, S3DMODEL::m_MaterialsSize, m_modelMaterialMap, m_plasticMaterial, SMATERIAL::m_Shininess, m_shinyPlasticMaterial, SMATERIAL::m_Specular, SMATERIAL::m_Transparency, NORMAL, RGBtoGray(), and MATERIAL::SetGenerator().
Referenced by addModels().
| wxSize RENDER_3D_RAYTRACE_RAM::GetRealBufferSize | ( | ) |
Definition at line 46 of file render_3d_raytrace_ram.cpp.
References RENDER_3D_RAYTRACE_BASE::m_realBufferSize.
Referenced by EDA_3D_VIEWER_FRAME::captureRaytracingScreenshot(), and PCBNEW_JOBS_HANDLER::JobExportRender().
|
overridevirtualinherited |
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 132 of file render_3d_raytrace_base.cpp.
|
protectedinherited |
Definition at line 1659 of file render_3d_raytrace_base.cpp.
References DecodeMorton2X(), DecodeMorton2Y(), initPbo(), m_blockPositions, m_blockPositionsFast, m_fastPreviewModeSize, m_postShaderSsao, m_realBufferSize, m_shaderBuffer, RENDER_3D_BASE::m_windowSize, m_xoffset, m_yoffset, RAYPACKET_DIM, and RAYPACKET_INVMASK.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
overrideprivatevirtual |
Implements RENDER_3D_RAYTRACE_BASE.
Definition at line 148 of file render_3d_raytrace_ram.cpp.
References deletePbo(), m_outputBuffer, m_pboDataSize, and RENDER_3D_RAYTRACE_BASE::m_realBufferSize.
Referenced by SetCurWindowSize().
|
protectedinherited |
Definition at line 1707 of file raytracing/create_scene.cpp.
References addCounterborePlating(), addCountersinkPlating(), B_Cu, ConvertSRGBToLinear(), COUNTERBORE, COUNTERSINK, CSGITEM_EMPTY, CSGITEM_FULL, end, F_Cu, PAD::GetBackPostMachining(), PAD::GetBackPostMachiningDepth(), PAD::GetBackPostMachiningSize(), OBJECT_2D::GetBBox(), PAD::GetDrillSize(), PAD::GetFrontPostMachining(), PAD::GetFrontPostMachiningDepth(), PAD::GetFrontPostMachiningSize(), PAD::GetOrientation(), PAD::GetPosition(), OBJECT_2D::Intersects(), m_antioutlineBoard2dObjects, RENDER_3D_BASE::m_boardAdapter, m_containerWithObjectsToDelete, m_materials, m_objectContainer, NOT_POST_MACHINED, RotatePoint(), LAYER_ITEM::SetColor(), OBJECT_3D::SetMaterial(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
protectedinherited |
Definition at line 1627 of file raytracing/create_scene.cpp.
References addCounterborePlating(), addCountersinkPlating(), PADSTACK::BackPostMachining(), center, ConvertSRGBToLinear(), COUNTERBORE, COUNTERSINK, PADSTACK::POST_MACHINING_PROPS::depth, PADSTACK::FrontPostMachining(), PCB_VIA::GetBackPostMachining(), PCB_VIA::GetBackPostMachiningSize(), PCB_VIA::GetDrillValue(), PCB_VIA::GetFrontPostMachining(), PCB_VIA::GetFrontPostMachiningSize(), PCB_TRACK::GetStart(), PCB_VIA::LayerPair(), RENDER_3D_BASE::m_boardAdapter, m_containerWithObjectsToDelete, m_materials, m_objectContainer, PADSTACK::POST_MACHINING_PROPS::mode, NOT_POST_MACHINED, PCB_VIA::Padstack(), LAYER_ITEM::SetColor(), OBJECT_3D::SetMaterial(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addPadsAndVias().
|
inherited |
Definition at line 1770 of file render_3d_raytrace_base.cpp.
References OBJECT_3D::GetBoardItem(), m_accelerator, m_hitTestMutex, HITINFO::m_tHit, and HITINFO::pHitObject.
|
inherited |
Drop the hover BVH so IntersectBoardItem becomes a no-op.
Must be called before board-adapter layers are destroyed/rebuilt (e.g. OpenGL CreateLayers), because LAYER_ITEM still references those OBJECT_2Ds.
Definition at line 1762 of file render_3d_raytrace_base.cpp.
References m_accelerator, and m_hitTestMutex.
|
inlineinherited |
Query if there is a pending reload request.
Definition at line 71 of file render_3d_base.h.
References m_reloadRequested.
|
inlinevirtualinherited |
Block until any in-progress background loading has finished.
Reimplemented in RENDER_3D_OPENGL.
Definition at line 84 of file render_3d_base.h.
|
protectedinherited |
Definition at line 2233 of file raytracing/create_scene.cpp.
References addExtrudedBodyToRaytracer(), addModels(), addPlaceholderToRaytracer(), PROJECT_PCB::FootprintLibAdapter(), LIBRARY_MANAGER::GetFullURI(), S3D_CACHE::GetModel(), LIBRARY_MANAGER_ADAPTER::GetRow(), RENDER_3D_BASE::m_boardAdapter, model, UNITS3D_TO_UNITSPCB, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Reload().
|
protectedinherited |
Definition at line 735 of file render_3d_raytrace_base.cpp.
References convertLinearToSRGBA(), RENDER_3D_BASE::m_boardAdapter, m_postShaderSsao, m_realBufferSize, m_renderState, renderFinalColor(), and RT_RENDER_STATE_FINISH.
Referenced by render().
|
protectedinherited |
Definition at line 683 of file render_3d_raytrace_base.cpp.
References _, RENDER_3D_BASE::m_activityReporter, RENDER_3D_BASE::m_boardAdapter, m_postShaderSsao, m_realBufferSize, m_renderState, m_shaderBuffer, RT_RENDER_STATE_FINISH, and RT_RENDER_STATE_POST_PROCESS_BLUR_AND_FINISH.
Referenced by render().
|
staticprotectedinherited |
Definition at line 176 of file render_3d_raytrace_base.cpp.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), render(), and renderPreview().
|
overridevirtual |
Redraw the view.
| aIsMoving | if the user is moving the scene, it should be render in preview mode. |
Implements RENDER_3D_BASE.
Definition at line 70 of file render_3d_raytrace_ram.cpp.
References _, RENDER_3D_BASE::CreateBusyIndicator(), RENDER_3D_RAYTRACE_BASE::initializeBlockPositions(), RENDER_3D_BASE::m_activityReporter, RENDER_3D_BASE::m_camera, RENDER_3D_RAYTRACE_BASE::m_cameraLight, RENDER_3D_BASE::m_canvasInitialized, RENDER_3D_RAYTRACE_BASE::m_oldWindowsSize, m_outputBuffer, RENDER_3D_BASE::m_reloadRequested, RENDER_3D_RAYTRACE_BASE::m_renderState, RENDER_3D_BASE::m_windowSize, RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_RAYTRACE_BASE::renderPreview(), RT_RENDER_STATE_FINISH, and RT_RENDER_STATE_MAX.
Referenced by EDA_3D_VIEWER_FRAME::captureRaytracingScreenshot(), and PCBNEW_JOBS_HANDLER::JobExportRender().
|
inherited |
Definition at line 403 of file raytracing/create_scene.cpp.
References _, addPadsAndVias(), B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, backfillPostMachine(), SHAPE_POLY_SET::BooleanSubtract(), buildBoardBoundingBoxPoly(), Cmts_User, ConvertPolygonToBlocks(), ConvertSRGBToLinear(), createItemsFromContainer(), createObject(), CSGITEM_EMPTY, CSGITEM_FULL, CYLINDER, CAMERA::DEFAULT_MAX_ZOOM, Dwgs_User, Eco1_User, Eco2_User, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, FILLED_CIRCLE, SHAPE_POLY_SET::Fracture(), BBOX_3D::GetCenter(), BVH_CONTAINER_2D::GetIntersectingObjects(), CONTAINER_2D_BASE::GetList(), GetRunningMicroSecs(), OBJECT_2D_STATS::Instance(), OBJECT_3D_STATS::Instance(), IsCopperLayer(), BBOX_3D::IsInitialized(), LAYER_3D_BOARD, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, LAYER_3D_USER_1, LAYER_3D_USER_45, load3DModels(), m_accelerator, RENDER_3D_BASE::m_activityReporter, m_antioutlineBoard2dObjects, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, m_cameraLight, m_containerWithObjectsToDelete, m_extrusionMaterials, m_hitTestMutex, m_lights, m_materials, m_modelMaterialMap, m_objectContainer, m_outlineBoard2dObjects, RENDER_3D_BASE::m_reloadRequested, RENDER_3D_BASE::m_warningReporter, MapPCBLayerTo3DLayer(), BBOX_3D::Max(), MIDDLE, BBOX_3D::Min(), MIN_DISTANCE_IU, NextFloatDown(), NextFloatUp(), SHAPE_POLY_SET::OutlineCount(), radius, RANGE_SCALE_3D, OBJECT_2D_STATS::ResetStats(), OBJECT_3D_STATS::ResetStats(), BBOX_3D::Scale(), CYLINDER::SetColor(), LAYER_ITEM::SetColor(), TRIANGLE::SetColor(), OBJECT_3D::SetMaterial(), setupMaterials(), SphericalToCartesian(), TRIANGLE, v1, v2, v3, v4, and v5.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
inlineinherited |
Definition at line 64 of file render_3d_base.h.
References m_reloadRequested.
|
protectedinherited |
Definition at line 182 of file render_3d_raytrace_base.cpp.
References _, ConvertSRGBAToLinear(), GetRunningMicroSecs(), RENDER_3D_BASE::m_activityReporter, m_backgroundColorBottom, m_backgroundColorTop, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, m_cameraLight, m_realBufferSize, m_renderStartTime, m_renderState, OPENGL, postProcessBlurFinish(), postProcessShading(), premultiplyAlpha(), renderTracing(), restartRenderState(), RT_RENDER_STATE_FINISH, RT_RENDER_STATE_MAX, RT_RENDER_STATE_POST_PROCESS_BLUR_AND_FINISH, RT_RENDER_STATE_POST_PROCESS_SHADE, and RT_RENDER_STATE_TRACING.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
protectedinherited |
Definition at line 358 of file render_3d_raytrace_base.cpp.
References HITINFO::m_acc_node_info, m_accelerator, RENDER_3D_BASE::m_boardAdapter, HITINFO_PACKET::m_HitInfo, HITINFO::m_tHit, RAYPACKET_DIM, RAYPACKET_RAYS_PER_PACKET, and shadeHit().
Referenced by renderBlockTracing().
|
protectedinherited |
Definition at line 469 of file render_3d_raytrace_base.cpp.
References RAY::at(), DISP_FACTOR, HITINFO_PACKET_init(), m_accelerator, m_backgroundColorBottom, m_backgroundColorTop, m_blockPositions, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, HITINFO_PACKET::m_HitInfo, HITINFO::m_HitNormal, m_postShaderSsao, RAYPACKET::m_ray, m_realBufferSize, HITINFO::m_ShadowFactor, HITINFO::m_tHit, RENDER_3D_BASE::m_windowSize, m_xoffset, m_yoffset, ORTHO, RAYPACKET_DIM, RAYPACKET_InitRays_with2DDisplacement(), RAYPACKET_RAYS_PER_PACKET, renderAntiAliasPackets(), renderFinalColor(), and renderRayPackets().
Referenced by renderTracing().
|
protectedinherited |
Definition at line 301 of file render_3d_raytrace_base.cpp.
References convertLinearToSRGB().
Referenced by postProcessBlurFinish(), and renderBlockTracing().
|
protectedinherited |
Definition at line 792 of file render_3d_raytrace_base.cpp.
References BlendColor(), ConvertSRGBAToLinear(), RAY::Init(), OBJECT_3D::Intersect(), HITINFO::m_acc_node_info, m_accelerator, m_backgroundColorBottom, m_backgroundColorTop, m_blockPositions, m_blockPositionsFast, RENDER_3D_BASE::m_boardAdapter, RENDER_3D_BASE::m_camera, RAY::m_Dir, HITINFO_PACKET::m_HitInfo, HITINFO::m_HitNormal, m_isPreview, RAY::m_Origin, RAYPACKET::m_ray, m_realBufferSize, HITINFO::m_tHit, RENDER_3D_BASE::m_windowSize, m_xoffset, m_yoffset, HITINFO::pHitObject, premultiplyAlpha(), RAYPACKET_DIM, RAYPACKET_RAYS_PER_PACKET, SetPixelSRGBA(), and shadeHit().
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
protectedinherited |
Definition at line 336 of file render_3d_raytrace_base.cpp.
References RAYPACKET_DIM, and shadeHit().
Referenced by renderBlockTracing().
|
protectedinherited |
Definition at line 242 of file render_3d_raytrace_base.cpp.
References _, GetKiCadThreadPool(), RENDER_3D_BASE::m_activityReporter, m_blockPositions, m_blockPositionsWasProcessed, m_blockRenderProgressCount, RENDER_3D_BASE::m_boardAdapter, m_isPreview, m_renderState, renderBlockTracing(), RT_RENDER_STATE_FINISH, RT_RENDER_STATE_POST_PROCESS_SHADE, and tp.
Referenced by render().
|
protectedinherited |
Definition at line 138 of file render_3d_raytrace_base.cpp.
References GetRunningMicroSecs(), m_blockPositions, m_blockPositionsWasProcessed, m_blockRenderProgressCount, m_postShaderSsao, m_renderStartTime, m_renderState, and RT_RENDER_STATE_TRACING.
Referenced by render().
|
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 59 of file render_3d_base.cpp.
References m_busyIndicatorFactory.
|
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 59 of file render_3d_raytrace_ram.cpp.
References initPbo(), and RENDER_3D_BASE::m_windowSize.
Referenced by EDA_3D_VIEWER_FRAME::captureRaytracingScreenshot(), and PCBNEW_JOBS_HANDLER::JobExportRender().
|
inlineinherited |
Set the reporters for activity and warning messages.
| aActivityReporter | a shared pointer to the activity reporter. |
| aWarningReporter | a shared pointer to the warning reporter. |
Definition at line 105 of file render_3d_base.h.
References m_activityReporter, and m_warningReporter.
Referenced by PCBNEW_JOBS_HANDLER::JobExportRender().
|
protectedinherited |
Definition at line 76 of file raytracing/create_scene.cpp.
References ConvertSRGBToLinear(), RENDER_3D_BASE::m_boardAdapter, m_boardMaterial, m_brushedMetalMaterial, m_copperMaterial, m_materials, m_plasticMaterial, m_platedCopperMaterial, m_shinyPlasticMaterial, m_silkScreenMaterial, m_solderMaskMaterial, pcbIUScale, MATERIAL::SetDefaultReflectionRayCount(), MATERIAL::SetDefaultReflectionRecursionCount(), MATERIAL::SetDefaultRefractionRayCount(), MATERIAL::SetDefaultRefractionRecursionCount(), and TransparencyControl().
Referenced by Reload().
|
protectedinherited |
Definition at line 1399 of file render_3d_raytrace_base.cpp.
References RAY::at(), MATERIAL::GetAbsorvance(), MATERIAL::GetAmbientColor(), OBJECT_3D::GetDiffuseColor(), MATERIAL::GetEmissiveColor(), OBJECT_3D::GetMaterial(), OBJECT_3D::GetModelTransparency(), MATERIAL::GetReflection(), MATERIAL::GetReflectionRayCount(), MATERIAL::GetRefractionRayCount(), MATERIAL::GetSpecularColor(), RAY::Init(), m_accelerator, RENDER_3D_BASE::m_boardAdapter, RAY::m_Dir, HITINFO::m_HitNormal, HITINFO::m_HitPoint, m_isPreview, m_lights, HITINFO::m_ShadowFactor, HITINFO::m_tHit, HITINFO::pHitObject, Refract(), MATERIAL::Shade(), shadeHit(), and UniformRandomHemisphereDirection().
Referenced by renderAntiAliasPackets(), renderPreview(), renderRayPackets(), and shadeHit().
|
inlinevirtualinherited |
Request stop and join any in-progress background loading.
Reimplemented in RENDER_3D_OPENGL.
Definition at line 89 of file render_3d_base.h.
|
protectedinherited |
Definition at line 197 of file render_3d_raytrace_base.h.
Referenced by IntersectBoardItem(), InvalidateHitTesting(), Reload(), renderAntiAliasPackets(), renderBlockTracing(), renderPreview(), and shadeHit().
|
protectedinherited |
Definition at line 131 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::bgWorker(), RENDER_3D_OPENGL::load3dModels(), RENDER_3D_RAYTRACE_BASE::postProcessShading(), 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_RAYTRACE_BASE::renderTracing(), SetReporters(), and RENDER_3D_OPENGL::StopBgWorker().
|
protectedinherited |
Definition at line 195 of file render_3d_raytrace_base.h.
Referenced by createItemsFromContainer(), insertHole(), Reload(), RENDER_3D_RAYTRACE_BASE(), and ~RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Definition at line 203 of file render_3d_raytrace_base.h.
Referenced by render(), renderBlockTracing(), and renderPreview().
|
protectedinherited |
Definition at line 202 of file render_3d_raytrace_base.h.
Referenced by render(), renderBlockTracing(), and renderPreview().
|
protectedinherited |
Encode Morton code positions.
Definition at line 209 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), renderBlockTracing(), renderPreview(), renderTracing(), and restartRenderState().
|
protectedinherited |
Encode the Morton code positions (on fast preview mode).
Definition at line 215 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), and renderPreview().
|
protectedinherited |
Flag if a position was already processed (cleared each new render).
Definition at line 212 of file render_3d_raytrace_base.h.
Referenced by renderTracing(), and restartRenderState().
|
protectedinherited |
Save the number of blocks progress of the render.
Definition at line 178 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE(), renderTracing(), and restartRenderState().
|
protectedinherited |
Settings reference in use for this render.
Definition at line 118 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::addCounterborePlating(), RENDER_3D_RAYTRACE_BASE::addCountersinkPlating(), RENDER_3D_RAYTRACE_BASE::addExtrudedBodyToRaytracer(), 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::bgWorker(), 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::renderExtrudedBodies(), RENDER_3D_OPENGL::renderExtrudedBodies(), RENDER_3D_OPENGL::renderModel(), RENDER_3D_OPENGL::renderOpaqueModels(), RENDER_3D_OPENGL::renderPlaceholderForFootprint(), 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().
|
protectedinherited |
Definition at line 159 of file render_3d_raytrace_base.h.
Referenced by setupMaterials().
|
protectedinherited |
Definition at line 165 of file render_3d_raytrace_base.h.
Referenced by getModelMaterial(), and setupMaterials().
|
privateinherited |
Factory that returns a suitable busy indicator for the context.
Definition at line 144 of file render_3d_base.h.
Referenced by CreateBusyIndicator(), and SetBusyIndicatorFactory().
|
protectedinherited |
Definition at line 120 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().
|
protectedinherited |
Definition at line 184 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), Reload(), render(), and RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Flag if the canvas specific for this render was already initialized.
Definition at line 123 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::freeAllLists(), RENDER_3D_OPENGL::initializeOpenGL(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_BASE(), and RENDER_3D_OPENGL::~RENDER_3D_OPENGL().
|
protectedinherited |
Store the list of created objects special for RT that will be clear in the end.
Definition at line 192 of file render_3d_raytrace_base.h.
Referenced by addCounterborePlating(), addExtrudedBodyToRaytracer(), backfillPostMachine(), createItemsFromContainer(), insertHole(), insertHole(), and Reload().
|
protectedinherited |
Definition at line 233 of file render_3d_raytrace_base.h.
Referenced by createObject(), and RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Definition at line 232 of file render_3d_raytrace_base.h.
Referenced by createObject(), and RENDER_3D_RAYTRACE_BASE().
|
inherited |
Definition at line 152 of file render_3d_raytrace_base.h.
|
protectedinherited |
Definition at line 160 of file render_3d_raytrace_base.h.
Referenced by setupMaterials().
|
inherited |
Definition at line 151 of file render_3d_raytrace_base.h.
|
protectedinherited |
Definition at line 157 of file render_3d_raytrace_base.h.
Referenced by addExtrudedBodyToRaytracer(), and Reload().
|
protectedinherited |
Definition at line 218 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions().
|
protectedinherited |
Definition at line 220 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE().
|
inherited |
Definition at line 154 of file render_3d_raytrace_base.h.
|
protectedinherited |
Serializes hover BVH use.
Definition at line 200 of file render_3d_raytrace_base.h.
Referenced by IntersectBoardItem(), InvalidateHitTesting(), and Reload().
|
protectedinherited |
Definition at line 168 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Definition at line 169 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE(), renderPreview(), renderTracing(), and shadeHit().
|
protectedinherited |
Definition at line 182 of file render_3d_raytrace_base.h.
Referenced by Reload(), and shadeHit().
| struct { ... } RENDER_3D_RAYTRACE_BASE::m_materials |
|
protectedinherited |
Stores materials of the 3D models.
Definition at line 229 of file render_3d_raytrace_base.h.
Referenced by getModelMaterial(), and Reload().
|
inherited |
Definition at line 153 of file render_3d_raytrace_base.h.
|
protectedinherited |
Definition at line 189 of file render_3d_raytrace_base.h.
Referenced by addCounterborePlating(), addCountersinkPlating(), backfillPostMachine(), createItemsFromContainer(), insertHole(), insertHole(), and Reload().
|
protectedinherited |
Used to see if the windows size changed.
Definition at line 206 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), and RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Definition at line 194 of file render_3d_raytrace_base.h.
Referenced by Reload(), RENDER_3D_RAYTRACE_BASE(), and ~RENDER_3D_RAYTRACE_BASE().
|
private |
Definition at line 49 of file render_3d_raytrace_ram.h.
Referenced by deletePbo(), GetBuffer(), initPbo(), Redraw(), and RENDER_3D_RAYTRACE_RAM().
|
inherited |
Definition at line 148 of file render_3d_raytrace_base.h.
|
private |
Definition at line 50 of file render_3d_raytrace_ram.h.
Referenced by initPbo(), and RENDER_3D_RAYTRACE_RAM().
|
protectedinherited |
Definition at line 163 of file render_3d_raytrace_base.h.
Referenced by getModelMaterial(), and setupMaterials().
|
protectedinherited |
Definition at line 161 of file render_3d_raytrace_base.h.
Referenced by setupMaterials().
|
protectedinherited |
Definition at line 180 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), postProcessBlurFinish(), postProcessShading(), RENDER_3D_RAYTRACE_BASE(), renderBlockTracing(), and restartRenderState().
|
protectedinherited |
Definition at line 217 of file render_3d_raytrace_base.h.
Referenced by RENDER_3D_RAYTRACE_RAM::GetRealBufferSize(), initializeBlockPositions(), RENDER_3D_RAYTRACE_GL::initPbo(), RENDER_3D_RAYTRACE_RAM::initPbo(), postProcessBlurFinish(), postProcessShading(), RENDER_3D_RAYTRACE_GL::Redraw(), render(), renderBlockTracing(), and renderPreview().
|
protectedinherited |
Definition at line 126 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().
|
protectedinherited |
Time that the render starts.
Definition at line 175 of file render_3d_raytrace_base.h.
Referenced by render(), RENDER_3D_RAYTRACE_BASE(), and restartRenderState().
|
protectedinherited |
State used on quality render.
Definition at line 172 of file render_3d_raytrace_base.h.
Referenced by postProcessBlurFinish(), postProcessShading(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), render(), RENDER_3D_RAYTRACE_BASE(), renderTracing(), and restartRenderState().
|
protectedinherited |
Definition at line 222 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), postProcessShading(), RENDER_3D_RAYTRACE_BASE(), and ~RENDER_3D_RAYTRACE_BASE().
|
protectedinherited |
Definition at line 164 of file render_3d_raytrace_base.h.
Referenced by getModelMaterial(), and setupMaterials().
|
inherited |
Definition at line 149 of file render_3d_raytrace_base.h.
|
protectedinherited |
Definition at line 166 of file render_3d_raytrace_base.h.
Referenced by setupMaterials().
|
inherited |
Definition at line 150 of file render_3d_raytrace_base.h.
|
protectedinherited |
Definition at line 162 of file render_3d_raytrace_base.h.
Referenced by setupMaterials().
|
protectedinherited |
Definition at line 132 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), and SetReporters().
|
protectedinherited |
The window size that this camera is working.
Definition at line 129 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().
|
protectedinherited |
Definition at line 225 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_BASE(), renderBlockTracing(), and renderPreview().
|
protectedinherited |
Definition at line 226 of file render_3d_raytrace_base.h.
Referenced by initializeBlockPositions(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_BASE(), renderBlockTracing(), and renderPreview().
|
staticconstexpr |
Definition at line 33 of file render_3d_raytrace_ram.h.