Loading 3d-viewer/3d_draw.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -488,7 +488,7 @@ void EDA_3D_CANVAS::Redraw() glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value ); glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x ); if( isEnabled( FL_RENDER_TEXTURES ) && isRealisticMode() ) if( isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ) ) { glEnable( GL_TEXTURE_2D ); } Loading Loading @@ -684,6 +684,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) bool remove_Holes = isEnabled( FL_RENDER_SHOW_HOLES_IN_ZONES ); bool realistic_mode = isRealisticMode(); bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ); // Number of segments to convert a circle to polygon // Boost polygon (at least v 1.54, v1.55 and previous) in very rare cases crashes Loading Loading @@ -886,7 +887,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) bufferPolys.ImportFrom( currLayerPolyset ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); if( isEnabled( FL_USE_COPPER_THICKNESS ) == true ) { Loading @@ -898,7 +899,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) if( bufferZonesPolys.GetCornersCount() ) Draw3D_SolidHorizontalPolyPolygons( bufferZonesPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); throughHolesListBuilt = true; } Loading Loading @@ -973,7 +974,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) if( bufferPcbOutlines.GetCornersCount() ) { Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2.0, board_thickness, GetPrm3DVisu().m_BiuTo3Dunits ); board_thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); } glEndList(); Loading @@ -983,6 +984,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) void EDA_3D_CANVAS::BuildTechLayers3DView() { BOARD* pcb = GetBoard(); bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ); // Number of segments to draw a circle using segments const int segcountforcircle = 18; Loading Loading @@ -1185,7 +1187,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() setGLTechLayersColor( layer ); glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); } } Loading Loading @@ -1287,7 +1289,7 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() setGLTechLayersColor( layer ); glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); thickness, GetPrm3DVisu().m_BiuTo3Dunits, false ); } } Loading 3d-viewer/3d_draw_basic_functions.cpp +27 −20 Original line number Diff line number Diff line Loading @@ -42,6 +42,12 @@ #define CALLBACK #endif // Variables used to pass a value to call back openGL functions static float s_textureScale; static double s_currentZpos; static double s_biuTo3Dunits; bool s_useTextures; // CALLBACK functions for GLU_TESS static void CALLBACK tessBeginCB( GLenum which ); static void CALLBACK tessEndCB(); Loading Loading @@ -136,13 +142,11 @@ void SetGLColor( S3D_COLOR& aColor, float aTransparency ) } static float m_texture_scale; void SetGLTexture( GLuint text_id, float scale ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, text_id ); m_texture_scale = scale; s_textureScale = scale; // for Tess callback functions } Loading @@ -155,8 +159,13 @@ void SetGLTexture( GLuint text_id, float scale ) * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ) int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ) { // for Tess callback functions: s_biuTo3Dunits = aBiuTo3DUnits; s_useTextures = aUseTextures; GLUtesselator* tess = gluNewTess(); gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*) () )tessBeginCB ); Loading @@ -166,7 +175,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, GLdouble v_data[3]; double zpos = ( aZpos + (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; s_currentZpos = zpos; // for Tess callback functions v_data[2] = aZpos + (aThickness / 2.0); // Set normal toward positive Z axis, for a solid object on the top side Loading Loading @@ -219,7 +228,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, // Prepare the bottom side of solid areas zpos = ( aZpos - (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; s_currentZpos = zpos; // for Tess callback functions v_data[2] = zpos; // Set normal toward negative Z axis, for a solid object on bottom side SetNormalZneg(); Loading Loading @@ -249,12 +258,12 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, */ void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ) double aBiuTo3DUnits, bool aUseTextures ) { CPOLYGONS_LIST polygon; ConvertPolysListWithHolesToOnePolygon( aPolysList, polygon ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, aThickness, aBiuTo3DUnits, aUseTextures ); } Loading Loading @@ -301,13 +310,13 @@ void Draw3D_ZaxisCylinder( wxPoint aCenterPos, int aRadius, ConvertPolysListWithHolesToOnePolygon( outer_cornerBuffer, polygon ); // draw top (front) horizontal ring Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits, false ); if( aHeight ) { // draw bottom (back) horizontal ring SetNormalZneg(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits, false ); } } Loading Loading @@ -361,13 +370,13 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos, // draw top (front) horizontal side (ring) SetNormalZpos(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits, false ); if( aHeight ) { // draw bottom (back) horizontal side (ring) SetNormalZneg(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits, false ); } } Loading @@ -389,7 +398,7 @@ void Draw3D_SolidSegment( const wxPoint& aStart, const wxPoint& aEnd, TransformRoundedEndsSegmentToPolygon( cornerBuffer, aStart, aEnd, slice, aWidth ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false ); } Loading @@ -403,7 +412,7 @@ void Draw3D_ArcSegment( const wxPoint& aCenterPos, const wxPoint& aStartPoint, TransformArcToPolygon( cornerBuffer, aCenterPos, aStartPoint, aArcAngle, slice, aWidth ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false ); } Loading @@ -428,15 +437,13 @@ void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ) // cast back to double type const CPolyPt* ptr = (const CPolyPt*) data; if( g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.GetFlag( FL_RENDER_TEXTURES ) ) if( s_useTextures ) { glTexCoord2f( ptr->x* g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale, -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale); glTexCoord2f( ptr->x * s_biuTo3Dunits * s_textureScale, -ptr->y * s_biuTo3Dunits * s_textureScale); } glVertex3d( ptr->x * g_Parm_3D_Visu.m_BiuTo3Dunits, -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits, g_Parm_3D_Visu.m_CurrentZpos ); glVertex3d( ptr->x * s_biuTo3Dunits, -ptr->y * s_biuTo3Dunits, s_currentZpos ); } Loading 3d-viewer/3d_draw_basic_functions.h +6 −2 Original line number Diff line number Diff line Loading @@ -36,13 +36,15 @@ * @param aZpos = z position in board internal units * @param aThickness = thickness in board internal units * @param aBiuTo3DUnits = board internal units to 3D units scaling value * @param aUseTextures = true to use textxures for the polygons * If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos. * If aThickness > 0, a solid object is drawn. * The top side is located at aZpos + aThickness / 2 * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ); int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ); /** draw the solid polygon found in aPolysList * The first polygonj is the main polygon, others are holes Loading @@ -50,13 +52,15 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, * @param aZpos = z position in board internal units * @param aThickness = thickness in board internal units * @param aBiuTo3DUnits = board internal units to 3D units scaling value * @param aUseTextures = true to use textxures for the polygons * If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos. * If aThickness > 0, a solid object is drawn. * The top side is located at aZpos + aThickness / 2 * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ); int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ); /** draw a thick segment using 3D primitives, in a XY plane * @param aStart = YX position of start point in board units Loading 3d-viewer/3d_mesh_model.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #ifdef USE_OPENMP #include <omp.h> #endif /* USE_OPENMP */ #endif // USE_OPENMP S3D_MESH::S3D_MESH() { Loading 3d-viewer/info3d_visu.h +1 −3 Original line number Diff line number Diff line Loading @@ -104,9 +104,7 @@ public: double m_BiuTo3Dunits; // Normalization scale to convert board // internal units to 3D units // to scale 3D units between -1.0 and +1.0 double m_CurrentZpos; // temporary storage of current value of Z position, // used in some calculation // to normalize 3D units between -1.0 and +1.0 double zpos_offset; Loading Loading
3d-viewer/3d_draw.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -488,7 +488,7 @@ void EDA_3D_CANVAS::Redraw() glMateriali ( GL_FRONT_AND_BACK, GL_SHININESS, shininess_value ); glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.x ); if( isEnabled( FL_RENDER_TEXTURES ) && isRealisticMode() ) if( isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ) ) { glEnable( GL_TEXTURE_2D ); } Loading Loading @@ -684,6 +684,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) bool remove_Holes = isEnabled( FL_RENDER_SHOW_HOLES_IN_ZONES ); bool realistic_mode = isRealisticMode(); bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ); // Number of segments to convert a circle to polygon // Boost polygon (at least v 1.54, v1.55 and previous) in very rare cases crashes Loading Loading @@ -886,7 +887,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) bufferPolys.ImportFrom( currLayerPolyset ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); if( isEnabled( FL_USE_COPPER_THICKNESS ) == true ) { Loading @@ -898,7 +899,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) if( bufferZonesPolys.GetCornersCount() ) Draw3D_SolidHorizontalPolyPolygons( bufferZonesPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); throughHolesListBuilt = true; } Loading Loading @@ -973,7 +974,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) if( bufferPcbOutlines.GetCornersCount() ) { Draw3D_SolidHorizontalPolyPolygons( bufferPcbOutlines, zpos + board_thickness/2.0, board_thickness, GetPrm3DVisu().m_BiuTo3Dunits ); board_thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); } glEndList(); Loading @@ -983,6 +984,7 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList) void EDA_3D_CANVAS::BuildTechLayers3DView() { BOARD* pcb = GetBoard(); bool useTextures = isRealisticMode() && isEnabled( FL_RENDER_TEXTURES ); // Number of segments to draw a circle using segments const int segcountforcircle = 18; Loading Loading @@ -1185,7 +1187,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView() setGLTechLayersColor( layer ); glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); thickness, GetPrm3DVisu().m_BiuTo3Dunits, useTextures ); } } Loading Loading @@ -1287,7 +1289,7 @@ void EDA_3D_CANVAS::BuildBoard3DAuxLayers() setGLTechLayersColor( layer ); glNormal3f( 0.0, 0.0, Get3DLayer_Z_Orientation( layer ) ); Draw3D_SolidHorizontalPolyPolygons( bufferPolys, zpos, thickness, GetPrm3DVisu().m_BiuTo3Dunits ); thickness, GetPrm3DVisu().m_BiuTo3Dunits, false ); } } Loading
3d-viewer/3d_draw_basic_functions.cpp +27 −20 Original line number Diff line number Diff line Loading @@ -42,6 +42,12 @@ #define CALLBACK #endif // Variables used to pass a value to call back openGL functions static float s_textureScale; static double s_currentZpos; static double s_biuTo3Dunits; bool s_useTextures; // CALLBACK functions for GLU_TESS static void CALLBACK tessBeginCB( GLenum which ); static void CALLBACK tessEndCB(); Loading Loading @@ -136,13 +142,11 @@ void SetGLColor( S3D_COLOR& aColor, float aTransparency ) } static float m_texture_scale; void SetGLTexture( GLuint text_id, float scale ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, text_id ); m_texture_scale = scale; s_textureScale = scale; // for Tess callback functions } Loading @@ -155,8 +159,13 @@ void SetGLTexture( GLuint text_id, float scale ) * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ) int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ) { // for Tess callback functions: s_biuTo3Dunits = aBiuTo3DUnits; s_useTextures = aUseTextures; GLUtesselator* tess = gluNewTess(); gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*) () )tessBeginCB ); Loading @@ -166,7 +175,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, GLdouble v_data[3]; double zpos = ( aZpos + (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; s_currentZpos = zpos; // for Tess callback functions v_data[2] = aZpos + (aThickness / 2.0); // Set normal toward positive Z axis, for a solid object on the top side Loading Loading @@ -219,7 +228,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, // Prepare the bottom side of solid areas zpos = ( aZpos - (aThickness / 2.0) ) * aBiuTo3DUnits; g_Parm_3D_Visu.m_CurrentZpos = zpos; s_currentZpos = zpos; // for Tess callback functions v_data[2] = zpos; // Set normal toward negative Z axis, for a solid object on bottom side SetNormalZneg(); Loading Loading @@ -249,12 +258,12 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, */ void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ) double aBiuTo3DUnits, bool aUseTextures ) { CPOLYGONS_LIST polygon; ConvertPolysListWithHolesToOnePolygon( aPolysList, polygon ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, aThickness, aBiuTo3DUnits, aUseTextures ); } Loading Loading @@ -301,13 +310,13 @@ void Draw3D_ZaxisCylinder( wxPoint aCenterPos, int aRadius, ConvertPolysListWithHolesToOnePolygon( outer_cornerBuffer, polygon ); // draw top (front) horizontal ring Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits, false ); if( aHeight ) { // draw bottom (back) horizontal ring SetNormalZneg(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits, false ); } } Loading Loading @@ -361,13 +370,13 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos, // draw top (front) horizontal side (ring) SetNormalZpos(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos + aHeight, 0, aBiuTo3DUnits, false ); if( aHeight ) { // draw bottom (back) horizontal side (ring) SetNormalZneg(); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( polygon, aZpos, 0, aBiuTo3DUnits, false ); } } Loading @@ -389,7 +398,7 @@ void Draw3D_SolidSegment( const wxPoint& aStart, const wxPoint& aEnd, TransformRoundedEndsSegmentToPolygon( cornerBuffer, aStart, aEnd, slice, aWidth ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false ); } Loading @@ -403,7 +412,7 @@ void Draw3D_ArcSegment( const wxPoint& aCenterPos, const wxPoint& aStartPoint, TransformArcToPolygon( cornerBuffer, aCenterPos, aStartPoint, aArcAngle, slice, aWidth ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits ); Draw3D_SolidHorizontalPolyPolygons( cornerBuffer, aZpos, aThickness, aBiuTo3DUnits, false ); } Loading @@ -428,15 +437,13 @@ void CALLBACK tessCPolyPt2Vertex( const GLvoid* data ) // cast back to double type const CPolyPt* ptr = (const CPolyPt*) data; if( g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.GetFlag( FL_RENDER_TEXTURES ) ) if( s_useTextures ) { glTexCoord2f( ptr->x* g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale, -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits * m_texture_scale); glTexCoord2f( ptr->x * s_biuTo3Dunits * s_textureScale, -ptr->y * s_biuTo3Dunits * s_textureScale); } glVertex3d( ptr->x * g_Parm_3D_Visu.m_BiuTo3Dunits, -ptr->y * g_Parm_3D_Visu.m_BiuTo3Dunits, g_Parm_3D_Visu.m_CurrentZpos ); glVertex3d( ptr->x * s_biuTo3Dunits, -ptr->y * s_biuTo3Dunits, s_currentZpos ); } Loading
3d-viewer/3d_draw_basic_functions.h +6 −2 Original line number Diff line number Diff line Loading @@ -36,13 +36,15 @@ * @param aZpos = z position in board internal units * @param aThickness = thickness in board internal units * @param aBiuTo3DUnits = board internal units to 3D units scaling value * @param aUseTextures = true to use textxures for the polygons * If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos. * If aThickness > 0, a solid object is drawn. * The top side is located at aZpos + aThickness / 2 * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ); int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ); /** draw the solid polygon found in aPolysList * The first polygonj is the main polygon, others are holes Loading @@ -50,13 +52,15 @@ void Draw3D_SolidHorizontalPolyPolygons( const CPOLYGONS_LIST& aPolysList, * @param aZpos = z position in board internal units * @param aThickness = thickness in board internal units * @param aBiuTo3DUnits = board internal units to 3D units scaling value * @param aUseTextures = true to use textxures for the polygons * If aThickness = 0, a polygon area is drawn in a XY plane at Z position = aZpos. * If aThickness > 0, a solid object is drawn. * The top side is located at aZpos + aThickness / 2 * The bottom side is located at aZpos - aThickness / 2 */ void Draw3D_SolidHorizontalPolygonWithHoles( const CPOLYGONS_LIST& aPolysList, int aZpos, int aThickness, double aBiuTo3DUnits ); int aZpos, int aThickness, double aBiuTo3DUnits, bool aUseTextures ); /** draw a thick segment using 3D primitives, in a XY plane * @param aStart = YX position of start point in board units Loading
3d-viewer/3d_mesh_model.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #ifdef USE_OPENMP #include <omp.h> #endif /* USE_OPENMP */ #endif // USE_OPENMP S3D_MESH::S3D_MESH() { Loading
3d-viewer/info3d_visu.h +1 −3 Original line number Diff line number Diff line Loading @@ -104,9 +104,7 @@ public: double m_BiuTo3Dunits; // Normalization scale to convert board // internal units to 3D units // to scale 3D units between -1.0 and +1.0 double m_CurrentZpos; // temporary storage of current value of Z position, // used in some calculation // to normalize 3D units between -1.0 and +1.0 double zpos_offset; Loading