60    const float aaa = aTransparency * aTransparency * aTransparency;
 
   63    float ca = 1.0f - aTransparency;
 
   64    ca       = 1.00f - 1.05f * ca * ca * ca;
 
   66    return glm::max( glm::min( aGrayColorValue * ca + aaa, 1.0f ), 0.0f );
 
 
   72#define UNITS3D_TO_UNITSPCB ( pcbIUScale.IU_PER_MM ) 
   83            m_boardAdapter.m_Cfg->m_Render.raytrace_recursivelevel_refractions );
 
   85            m_boardAdapter.m_Cfg->m_Render.raytrace_recursivelevel_reflections );
 
  103    const SFVEC3F copperSpecularLinear =
 
  109            SFVEC3F( 0.0f ), copperSpecularLinear, 0.4f * 128.0f, 0.0f, 0.0f );
 
  116            SFVEC3F( 0.256f, 0.137f, 0.086f ), 0.15f * 128.0f, 0.0f, 0.0f );
 
  128            0.10f * 128.0f, 0.0f, 0.0f );
 
  134                        SFVEC3F( 0.0f ), 
SFVEC3F( 0.10f ) ), 0.078125f * 128.0f, 0.0f, 0.0f );
 
  140    const float solderMask_gray =
 
  151            SFVEC3F( glm::clamp( solderMask_gray * 2.0f, 0.25f, 1.0f ) ), 0.85f * 128.0f,
 
  152            solderMask_transparency, 0.16f );
 
  155    m_materials.m_SolderMask.SetRefractionRayCount( 1 );
 
  176                                                ( 
SFVEC3F( 1.0f ) - bgTop ) / 3.0f,
 
  177                                                0.10f * 128.0f, 1.0f, 0.50f );
 
  179    m_materials.m_Floor.SetReflectionRecursionCount( 1 );
 
 
  184                                            float aZMin, 
float aZMax, 
const MATERIAL* aMaterial,
 
  199        aDstContainer.
Add( objPtr );
 
  206        aDstContainer.
Add( objPtr );
 
  218        aDstContainer.
Add( objPtr );
 
  227        aDstContainer.
Add( objPtr );
 
 
  238                                                   float aLayerZOffset )
 
  240    if( aContainer2d == 
nullptr )
 
  247    if( listObject2d.size() == 0 )
 
  250    for( 
const OBJECT_2D* object2d_A : listObject2d )
 
  258        object2d_B = 
new std::vector<const OBJECT_2D*>();
 
  268            if( layerHolesMap.find( aLayer_id ) != layerHolesMap.end() )
 
  276                for( 
const OBJECT_2D* hole2d : intersecting )
 
  277                    object2d_B->push_back( hole2d );
 
  287            if( !throughHoleOuter.
GetList().empty() )
 
  293                for( 
const OBJECT_2D* hole2d : intersecting )
 
  294                    object2d_B->push_back( hole2d );
 
  305            for( 
const OBJECT_2D* obj : intersecting )
 
  306                object2d_B->push_back( obj );
 
  312            && (    ( aLayer_id == 
B_SilkS && mapLayers.find( 
B_Mask ) != mapLayers.end() )
 
  313                 || ( aLayer_id == 
F_SilkS && mapLayers.find( 
F_Mask ) != mapLayers.end() ) ) )
 
  321            if( containerMaskLayer2d ) 
 
  324            for( 
const OBJECT_2D* obj2d : intersecting )
 
  325                object2d_B->push_back( obj2d );
 
  328        if( object2d_B->empty() )
 
 
  366                                 bool aOnlyLoadCopperAndShapes )
 
  377    if( !aOnlyLoadCopperAndShapes )
 
  382        m_camera.SetBoardLookAtPos( camera_pos );
 
  390    if( aStatusReporter )
 
  391        aStatusReporter->
Report( 
_( 
"Load Raytracing: board" ) );
 
  400    std::bitset<LAYER_3D_END> layerFlags = 
m_boardAdapter.GetVisibleLayers();
 
  402    if( !aOnlyLoadCopperAndShapes )
 
  404        const int outlineCount = 
m_boardAdapter.GetBoardPoly().OutlineCount();
 
  406        if( outlineCount > 0 )
 
  408            float divFactor = 0.0f;
 
  425            for( 
int ii = 0; ii < antiboardPoly.
OutlineCount(); ii++ )
 
  436            for( 
int ii = 0; ii < boardPolyCopy.
OutlineCount(); ii++ )
 
  447                for( 
const OBJECT_2D* object2d_A : listObjects )
 
  449                    std::vector<const OBJECT_2D*>* object2d_B = 
new std::vector<const OBJECT_2D*>();
 
  459                        for( 
const OBJECT_2D* hole : intersecting )
 
  461                            if( object2d_A->Intersects( hole->GetBBox() ) )
 
  462                                object2d_B->push_back( hole );
 
  473                        for( 
const OBJECT_2D* obj : intersecting )
 
  474                            object2d_B->push_back( obj );
 
  477                    if( object2d_B->empty() )
 
  522                    for( 
const OBJECT_2D* hole2d : holeList )
 
  532                            if( !intersecting.empty() )
 
  536                        switch( hole2d->GetObjectType() )
 
  540                            const float radius = hole2d->GetBBox().GetExtent().x * 0.5f * 0.999f;
 
  564    if( aStatusReporter )
 
  565        aStatusReporter->
Report( 
_( 
"Load Raytracing: layers" ) );
 
  568    for( 
const std::pair<const PCB_LAYER_ID, BVH_CONTAINER_2D*>& entry :
 
  643            else if( 
m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
 
  645                layerColor = 
SFVEC3F( 184.0f / 255.0f, 115.0f / 255.0f, 50.0f / 255.0f );
 
  673    if( !aOnlyLoadCopperAndShapes )
 
  685            for( 
const std::pair<const PCB_LAYER_ID, BVH_CONTAINER_2D*>& entry :
 
  713                const float zLayerMin = 
m_boardAdapter.GetLayerBottomZPos( layer_id );
 
  714                const float zLayerMax = 
m_boardAdapter.GetLayerTopZPos( layer_id );
 
  719                    std::vector<const OBJECT_2D*>* object2d_B = 
new std::vector<const OBJECT_2D*>();
 
  729                        for( 
const OBJECT_2D* hole : intersecting )
 
  731                            if( object2d_A->Intersects( hole->GetBBox() ) )
 
  732                                object2d_B->push_back( hole );
 
  738                    if( !container2d->
GetList().empty() )
 
  744                        for( 
const OBJECT_2D* obj : intersecting )
 
  745                            object2d_B->push_back( obj );
 
  748                    if( object2d_B->empty() )
 
  758                                     materialLayer, layerColor );
 
  772                                                                      object2d_A->GetBoardItem() );
 
  789#ifdef PRINT_STATISTICS_3D_VIEWER 
  791    int64_t stats_startLoad3DmodelsTime = stats_endConvertTime;
 
  794    if( aStatusReporter )
 
  795        aStatusReporter->
Report( 
_( 
"Loading 3D models..." ) );
 
  799#ifdef PRINT_STATISTICS_3D_VIEWER 
  803    if( !aOnlyLoadCopperAndShapes )
 
  812                boardBBox.
Scale( 3.0f );
 
  818                    containerBBox.
Scale( 1.3f );
 
  823                    const float minZ = glm::min( containerBBox.
Min().z, boardBBox.
Min().z );
 
  827                            + 
SFVEC3F( centerBBox.x, centerBBox.y, 0.0f );
 
  831                            + 
SFVEC3F( centerBBox.x, centerBBox.y, 0.0f );
 
  847                    newTriangle1->
SetColor( floorColor );
 
  848                    newTriangle2->
SetColor( floorColor );
 
  851                    const float maxZ = glm::max( containerBBox.
Max().z, boardBBox.
Max().z );
 
  867                    newTriangle3->
SetColor( floorColor );
 
  868                    newTriangle4->
SetColor( floorColor );
 
  882                    return ( ( aSource.r < ( 1.0f / 255.0f ) ) && ( aSource.g < ( 1.0f / 255.0f ) )
 
  883                           && ( aSource.b < ( 1.0f / 255.0f ) ) );
 
  896        if( !IsColorZero( cameraLightColor ) )
 
  901        if( !IsColorZero( topLightColor ) )
 
  908        if( !IsColorZero( bottomLightColor ) )
 
  912                                                 bottomLightColor ) );
 
  915        for( 
size_t i = 0; i < 
m_boardAdapter.m_Cfg->m_Render.raytrace_lightColor.size(); ++i )
 
  920            if( !IsColorZero( lightColor ) )
 
  943        if( min_zoom > max_zoom )
 
  944            std::swap( min_zoom, max_zoom );
 
  946        float zoom_ratio = max_zoom / min_zoom;
 
  950        steps -= 
static_cast<int>( ceil( log( zoom_ratio ) / log( 1.26f ) ) );
 
  951        steps = std::max( steps, 0 );
 
  954        float increased_zoom = pow( 1.26f, steps / 2 );
 
  955        max_zoom *= increased_zoom;
 
  956        min_zoom /= increased_zoom;
 
  961        min_zoom = std::min( min_zoom, 1.0f );
 
  971    if( aStatusReporter )
 
  974        double calculation_time = (double) ( 
GetRunningMicroSecs() - stats_startReloadTime ) / 1e6;
 
  976        aStatusReporter->
Report( wxString::Format( 
_( 
"Reload time %.3f s" ), calculation_time ) );
 
 
  986    aVia->
LayerPair( &top_layer, &bottom_layer );
 
 
 1018    const bool     hasHole = drillsize.
x && drillsize.
y;
 
 1031    if( drillsize.
x == drillsize.
y ) 
 
 1036        int innerRadius = drillsize.
x / 2;
 
 1037        int outerRadius = innerRadius + 
m_boardAdapter.GetHolePlatingThickness();
 
 1051                                                                 antiOutlineIntersectionList );
 
 1054        if( !antiOutlineIntersectionList.empty() )
 
 1061            std::vector<const OBJECT_2D*>* object2d_B = 
new std::vector<const OBJECT_2D*>();
 
 1062            object2d_B->push_back( innerCircle );
 
 1071            object2d_A = itemCSG2d;
 
 1079        if( drillsize.
x > drillsize.
y ) 
 
 1081            ends_offset.
x = ( drillsize.
x - drillsize.
y ) / 2;
 
 1082            width         = drillsize.
y;
 
 1086            ends_offset.
y = ( drillsize.
y - drillsize.
x ) / 2;
 
 1087            width         = drillsize.
x;
 
 1111        std::vector<const OBJECT_2D*>* object2d_B = 
new std::vector<const OBJECT_2D*>();
 
 1112        object2d_B->push_back( innerSeg );
 
 1120        object2d_A = itemCSG2d;
 
 1125                                                                 antiOutlineIntersectionList );
 
 1131        std::vector<const OBJECT_2D*>* object2d_B = 
new std::vector<const OBJECT_2D*>();
 
 1141            for( 
const OBJECT_2D* hole2d : intersecting )
 
 1143                if( object2d_A->
Intersects( hole2d->GetBBox() ) )
 
 1144                    object2d_B->push_back( hole2d );
 
 1148        for( 
const OBJECT_2D* obj : antiOutlineIntersectionList )
 
 1149            object2d_B->push_back( obj );
 
 1151        if( object2d_B->empty() )
 
 
 1203        for( 
PAD* 
pad : footprint->Pads() )
 
 
 1213                                            bool aSkipMaterialInformation )
 
 1229        if( !fp->Models().empty()
 
 1232            double zpos = 
m_boardAdapter.GetFootprintZPos( fp->IsFlipped() );
 
 1236            glm::mat4 fpMatrix = glm::mat4( 1.0f );
 
 1238            fpMatrix = glm::translate( fpMatrix,
 
 1243            if( !fp->GetOrientation().IsZero() )
 
 1245                fpMatrix = glm::rotate( fpMatrix, (
float) fp->GetOrientation().AsRadians(),
 
 1246                                        SFVEC3F( 0.0f, 0.0f, 1.0f ) );
 
 1249            if( fp->IsFlipped() )
 
 1251                fpMatrix = glm::rotate( fpMatrix, glm::pi<float>(), 
SFVEC3F( 0.0f, 1.0f, 0.0f ) );
 
 1253                fpMatrix = glm::rotate( fpMatrix, glm::pi<float>(), 
SFVEC3F( 0.0f, 0.0f, 1.0f ) );
 
 1256            const double modelunit_to_3d_units_factor =
 
 1259            fpMatrix = glm::scale(
 
 1260                    fpMatrix, 
SFVEC3F( modelunit_to_3d_units_factor, modelunit_to_3d_units_factor,
 
 1261                                       modelunit_to_3d_units_factor ) );
 
 1266            wxString                libraryName = fp->GetFPID().GetLibNickname();
 
 1268            wxString                footprintBasePath = wxEmptyString;
 
 1277                                ->
FindRow( libraryName, 
false );
 
 1280                        footprintBasePath = fpRow->
GetFullURI( 
true );
 
 1290                if( !model.m_Show || model.m_Filename.empty() )
 
 1294                std::vector<const EMBEDDED_FILES*> embeddedFilesStack;
 
 1295                embeddedFilesStack.push_back( fp->GetEmbeddedFiles() );
 
 1296                embeddedFilesStack.push_back( 
m_boardAdapter.GetBoard()->GetEmbeddedFiles() );
 
 1298                const S3DMODEL* modelPtr = cacheMgr->
GetModel( model.m_Filename, footprintBasePath,
 
 1299                                                               std::move( embeddedFilesStack ) );
 
 1304                    glm::mat4 modelMatrix = fpMatrix;
 
 1306                    modelMatrix = glm::translate( modelMatrix,
 
 1307                            SFVEC3F( model.m_Offset.x, model.m_Offset.y, model.m_Offset.z ) );
 
 1309                    modelMatrix = glm::rotate( modelMatrix,
 
 1310                            (
float) -( model.m_Rotation.z / 180.0f ) * glm::pi<float>(),
 
 1311                            SFVEC3F( 0.0f, 0.0f, 1.0f ) );
 
 1313                    modelMatrix = glm::rotate( modelMatrix,
 
 1314                            (
float) -( model.m_Rotation.y / 180.0f ) * glm::pi<float>(),
 
 1315                            SFVEC3F( 0.0f, 1.0f, 0.0f ) );
 
 1317                    modelMatrix = glm::rotate( modelMatrix,
 
 1318                            (
float) -( model.m_Rotation.x / 180.0f ) * glm::pi<float>(),
 
 1319                            SFVEC3F( 1.0f, 0.0f, 0.0f ) );
 
 1321                    modelMatrix = glm::scale( modelMatrix,
 
 1322                            SFVEC3F( model.m_Scale.x, model.m_Scale.y, model.m_Scale.z ) );
 
 1324                    addModels( aDstContainer, modelPtr, modelMatrix, (
float) model.m_Opacity,
 
 1325                               aSkipMaterialInformation, fp );
 
 
 1353        for( 
unsigned int imat = 0; imat < a3DModel->
m_MaterialsSize; ++imat )
 
 1361                float reflectionFactor = 0.0f;
 
 1363                if( ( material.
m_Shininess - 0.35f ) > FLT_EPSILON )
 
 1365                    reflectionFactor = glm::clamp(
 
 1366                            glm::sqrt( ( material.
m_Shininess - 0.35f ) ) * 0.40f - 0.05f, 0.0f,
 
 1377                if( 
m_boardAdapter.m_Cfg->m_Render.raytrace_procedural_textures )
 
 1432    return materialVector;
 
 
 1437                                         const glm::mat4& aModelMatrix, 
float aFPOpacity,
 
 1438                                         bool aSkipMaterialInformation, 
BOARD_ITEM* aBoardItem )
 
 1441    wxASSERT( a3DModel != 
nullptr );
 
 1443    if( a3DModel == 
nullptr )
 
 1447    wxASSERT( a3DModel->
m_Meshes != 
nullptr );
 
 1451    if( aFPOpacity > 1.0f )
 
 1454    if( aFPOpacity < 0.0f )
 
 1462        if( !aSkipMaterialInformation )
 
 1467        const glm::mat3 normalMatrix = glm::transpose( glm::inverse( glm::mat3( aModelMatrix ) ) );
 
 1469        for( 
unsigned int mesh_i = 0; mesh_i < a3DModel->
m_MeshesSize; ++mesh_i )
 
 1486                float                       fpTransparency;
 
 1489                if( !aSkipMaterialInformation )
 
 1498                for( 
unsigned int faceIdx = 0; faceIdx < mesh.
m_FaceIdxSize; faceIdx += 3 )
 
 1500                    const unsigned int idx0 = mesh.
m_FaceIdx[faceIdx + 0];
 
 1501                    const unsigned int idx1 = mesh.
m_FaceIdx[faceIdx + 1];
 
 1502                    const unsigned int idx2 = mesh.
m_FaceIdx[faceIdx + 2];
 
 1520                        const SFVEC3F vt0 = 
SFVEC3F( aModelMatrix * glm::vec4( v0, 1.0f ) );
 
 1524                        const SFVEC3F nt0 = glm::normalize( 
SFVEC3F( normalMatrix * n0 ) );
 
 1525                        const SFVEC3F nt1 = glm::normalize( 
SFVEC3F( normalMatrix * n1 ) );
 
 1526                        const SFVEC3F nt2 = glm::normalize( 
SFVEC3F( normalMatrix * n2 ) );
 
 1532                        aDstContainer.
Add( newTriangle );
 
 1534                        if( !aSkipMaterialInformation )
 
 
@ NORMAL
Use all material properties from model file.
 
@ CAD_MODE
Use a gray shading based on diffuse material.
 
Defines math related functions.
 
float NextFloatDown(float v)
 
float NextFloatUp(float v)
 
Defines math related functions.
 
float RGBtoGray(const SFVEC3F &aColor)
 
SFVEC3F MaterialDiffuseToColorCAD(const SFVEC3F &aDiffuseColor)
 
SFVEC3F SphericalToCartesian(float aInclination, float aAzimuth)
https://en.wikipedia.org/wiki/Spherical_coordinate_system
 
constexpr EDA_IU_SCALE pcbIUScale
 
std::map< PCB_LAYER_ID, BVH_CONTAINER_2D * > MAP_CONTAINER_2D_BASE
A type that stores a container of 2d objects for each layer id.
 
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
 
This BVH implementation is based on the source code implementation from the book "Physically Based Re...
 
Blinn Phong based material https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
Information pertinent to a Pcbnew printed circuit board.
 
void GetIntersectingObjects(const BBOX_2D &aBBox, CONST_LIST_OBJECT2D &aOutList) const override
Get a list of objects that intersects a bounding box.
 
static const float DEFAULT_MAX_ZOOM
 
const LIST_OBJECT2D & GetList() const
 
void Add(OBJECT_3D *aObject)
 
Procedural generation of the copper normals.
 
void SetColor(SFVEC3F aObjColor)
 
A light source based only on a directional vector.
 
Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN object in t...
 
const FP_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an FP_LIB_TABLE_ROW if aNickName is found in this table or in any chained fall back table frag...
 
Make solid geometry for objects on layers.
 
void SetColor(SFVEC3F aObjColor)
 
const wxString GetFullURI(bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
 
A base light class to derive to implement other light classes.
 
Base material class that can be used to derive other material implementations.
 
static void SetDefaultReflectionRayCount(unsigned int aCount)
 
static void SetDefaultRefractionRayCount(unsigned int aCount)
 
static void SetDefaultRefractionRecursionCount(unsigned int aCount)
 
void SetGenerator(const MATERIAL_GENERATOR *aGenerator)
 
float GetTransparency() const
 
static void SetDefaultReflectionRecursionCount(unsigned int aCount)
 
static OBJECT_2D_STATS & Instance()
 
virtual bool Intersects(const BBOX_2D &aBBox) const =0
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅)
 
const BBOX_2D & GetBBox() const
 
const BOARD_ITEM & GetBoardItem() const
 
OBJECT_2D_TYPE GetObjectType() const
 
static OBJECT_3D_STATS & Instance()
 
void SetMaterial(const MATERIAL *aMaterial)
 
void SetModelTransparency(float aModelTransparency)
 
void SetBoardItem(BOARD_ITEM *aBoardItem)
 
const VECTOR2I & GetDrillSize() const
 
VECTOR2I GetPosition() const override
 
EDA_ANGLE GetOrientation() const
Return the rotation angle of the pad.
 
const VECTOR2I & GetStart() const
 
int GetDrillValue() const
Calculate the drill value for vias (m_drill if > 0, or default drill value for the board).
 
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Return the 2 layers used by the via (the via actually uses all layers between these 2 layers)
 
Procedural generation of the plastic normals.
 
Procedural generation of the shiny plastic normals.
 
Point light source based on http://ogldev.atspace.co.uk/www/tutorial20/tutorial20....
 
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
 
BOARD_ADAPTER & m_boardAdapter
Settings reference in use for this render.
 
SILK_SCREEN_NORMAL m_silkScreenMaterial
 
struct RENDER_3D_RAYTRACE_BASE::@013206213056006125230376122042346155134272177300 m_materials
 
void Reload(REPORTER *aStatusReporter, REPORTER *aWarningReporter, bool aOnlyLoadCopperAndShapes)
 
BOARD_NORMAL m_boardMaterial
 
CONTAINER_3D m_objectContainer
 
COPPER_NORMAL m_copperMaterial
 
void load3DModels(CONTAINER_3D &aDstContainer, bool aSkipMaterialInformation)
 
void insertHole(const PCB_VIA *aVia)
 
BRUSHED_METAL_NORMAL m_brushedMetalMaterial
 
static constexpr float MIN_DISTANCE_IU
 
PLATED_COPPER_NORMAL m_platedCopperMaterial
 
PLASTIC_NORMAL m_plasticMaterial
 
ACCELERATOR_3D * m_accelerator
 
void createItemsFromContainer(const BVH_CONTAINER_2D *aContainer2d, PCB_LAYER_ID aLayer_id, const MATERIAL *aMaterialLayer, const SFVEC3F &aLayerColor, float aLayerZOffset)
 
DIRECTIONAL_LIGHT * m_cameraLight
 
PLASTIC_SHINE_NORMAL m_shinyPlasticMaterial
 
unsigned int m_convertedDummyBlockCount
 
CONTAINER_2D * m_outlineBoard2dObjects
 
BVH_CONTAINER_2D * m_antioutlineBoard2dObjects
 
CONTAINER_2D m_containerWithObjectsToDelete
Store the list of created objects special for RT that will be clear in the end.
 
MODEL_MATERIALS * getModelMaterial(const S3DMODEL *a3DModel)
 
SOLDER_MASK_NORMAL m_solderMaskMaterial
 
void addModels(CONTAINER_3D &aDstContainer, const S3DMODEL *a3DModel, const glm::mat4 &aModelMatrix, float aFPOpacity, bool aSkipMaterialInformation, BOARD_ITEM *aBoardItem)
 
std::list< LIGHT * > m_lights
 
MAP_MODEL_MATERIALS m_modelMaterialMap
Stores materials of the 3D models.
 
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.
 
unsigned int m_converted2dRoundSegmentCount
 
A pure virtual class used to derive REPORTER objects from.
 
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
 
void SetColor(SFVEC3F aObjColor)
 
Cache for storing the 3D shapes.
 
S3DMODEL * GetModel(const wxString &aModelFileName, const wxString &aBasePath, std::vector< const EMBEDDED_FILES * > aEmbeddedFilesStack)
Attempt to load the scene data for a model and to translate it into an S3D_MODEL structure for displa...
 
Represent a set of closed polygons.
 
void Fracture()
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
 
int OutlineCount() const
Return the number of outlines in the set.
 
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
 
Procedural generation of the solder mask.
 
void SetColor(const SFVEC3F &aColor)
 
A plane that is parallel to XY plane.
 
void SetColor(SFVEC3F aObjColor)
 
std::list< OBJECT_2D * > LIST_OBJECT2D
 
std::list< const OBJECT_2D * > CONST_LIST_OBJECT2D
 
#define UNITS3D_TO_UNITSPCB
Implements a model viewer canvas.
 
Declaration of the eda_3d_viewer class.
 
int MapPCBLayerTo3DLayer(PCB_LAYER_ID aLayer)
 
@ LAYER_3D_SOLDERMASK_TOP
 
@ LAYER_3D_SOLDERMASK_BOTTOM
 
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
 
void ConvertPolygonToBlocks(const SHAPE_POLY_SET &aMainPath, CONTAINER_2D_BASE &aDstContainer, float aBiuTo3dUnitsScale, float aDivFactor, const BOARD_ITEM &aBoardItem, int aPolyIndex)
Use a polygon in the format of the ClipperLib::Path and process it and create multiple 2d objects (PO...
 
int64_t GetRunningMicroSecs()
An alternate way to calculate an elapsed time (in microsecondes) to class PROF_COUNTER.
 
void buildBoardBoundingBoxPoly(const BOARD *aBoard, SHAPE_POLY_SET &aOutline)
Get the complete bounding box of the board (including all items).
 
static float TransparencyControl(float aGrayColorValue, float aTransparency)
Perform an interpolation step to easy control the transparency based on the gray color value and tran...
 
SFVEC3F ConvertSRGBToLinear(const SFVEC3F &aSRGBcolor)
 
std::vector< BLINN_PHONG_MATERIAL > MODEL_MATERIALS
Vector of materials.
 
const SFVEC2F & Min() const
 
const SFVEC2F & Max() const
 
Manage a bounding box defined by two SFVEC3F min max points.
 
SFVEC3F GetCenter() const
Return the center point of the bounding box.
 
const SFVEC3F & Min() const
Return the minimum vertex pointer.
 
const SFVEC3F & Max() const
Return the maximum vertex pointer.
 
bool IsInitialized() const
Check if this bounding box is already initialized.
 
void Scale(float aScale)
Scales a bounding box by its center.
 
bool clip_silk_on_via_annuli
 
bool subtract_mask_from_silk
 
Store the a model based on meshes and materials.
 
SMATERIAL * m_Materials
The materials list of this model.
 
unsigned int m_MeshesSize
Number of meshes in the array.
 
SMESH * m_Meshes
The meshes list of this model.
 
unsigned int m_MaterialsSize
Number of materials in the material array.
 
float m_Transparency
1.0 is completely transparent, 0.0 completely opaque
 
SFVEC3F m_Diffuse
Default diffuse color if m_Color is NULL.
 
Per-vertex normal/color/texcoors structure.
 
unsigned int * m_FaceIdx
Triangle Face Indexes.
 
SFVEC3F * m_Normals
Vertex normals array.
 
unsigned int m_MaterialIdx
Material Index to be used in this mesh (must be < m_MaterialsSize )
 
unsigned int m_VertexSize
Number of vertex in the arrays.
 
unsigned int m_FaceIdxSize
Number of elements of the m_FaceIdx array.
 
SFVEC3F * m_Color
Vertex color array, can be NULL.
 
SFVEC3F * m_Positions
Vertex position array.
 
Implement a triangle ray intersection based on article http://www.flipcode.com/archives/Raytracing_To...
 
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
 
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
 
VECTOR2< int32_t > VECTOR2I