diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index 7759676088..8a7957acd0 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -20,12 +20,11 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef FC_OS_WIN32 # ifndef GL_GLEXT_PROTOTYPES -# define GL_GLEXT_PROTOTYPES 1 +# define GL_GLEXT_PROTOTYPES 1 # endif #endif @@ -33,13 +32,13 @@ # include # include # ifdef FC_OS_MACOSX -# include -# include -# include +# include +# include +# include # else -# include -# include -# include +# include +# include +# include # endif # include # include @@ -56,19 +55,16 @@ # include # include #endif - #include -#include +#include #include #include -#include + #include "SoFCIndexedFaceSet.h" + #define RENDER_GL_VAO -//#define RENDER_GLARRAYS - - using namespace MeshGui; diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.h b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.h index e8eea9142b..21ea610430 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.h +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.h @@ -23,15 +23,15 @@ #ifndef MESHGUI_SOFCINDEXEDFACESET_H #define MESHGUI_SOFCINDEXEDFACESET_H -#include -#include #include -#include #include +#include +#include #ifndef MESH_GLOBAL_H #include #endif + class SoGLCoordinateElement; class SoTextureCoordinateBundle; diff --git a/src/Mod/Mesh/Gui/SoFCMeshFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCMeshFaceSet.cpp index d6100bb62e..af063502ee 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshFaceSet.cpp @@ -20,17 +20,15 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # ifdef FC_OS_WIN32 -# include +# include # endif # ifdef FC_OS_MACOSX -# include +# include # else -# include +# include # endif # include # include @@ -41,7 +39,6 @@ # include # include # include -# include # include # include # include @@ -50,23 +47,21 @@ # include # include # include -# include -# include # include +# include #endif -#include - #include #include #include +#include #include #include -#include -#include + #include "SoFCMeshFaceSet.h" #include "SoFCMeshVertex.h" + using namespace MeshGui; @@ -456,7 +451,7 @@ void SoFCMeshFaceSet::notify(SoNotList * node) void SoFCMeshFaceSet::createProxyModel(const MeshCore::MeshPointArray* rPoints, const MeshCore::MeshFacetArray* rFaces, SbBool simplest) { Base::BoundBox3f cBox; - for ( MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); ++it ) + for (MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); ++it) cBox &= (*it); if ( simplest ) { @@ -469,14 +464,14 @@ void SoFCMeshFaceSet::createProxyModel(const MeshCore::MeshPointArray* rPoints, 6,1,2,6,5,1 }; SbVec3f points[8] = { - SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), - SbVec3f(cBox.MaxX,cBox.MinY,cBox.MinZ), - SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MinZ), - SbVec3f(cBox.MinX,cBox.MaxY,cBox.MinZ), - SbVec3f(cBox.MinX,cBox.MinY,cBox.MaxZ), - SbVec3f(cBox.MaxX,cBox.MinY,cBox.MaxZ), - SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ), - SbVec3f(cBox.MinX,cBox.MaxY,cBox.MaxZ) + SbVec3f(cBox.MinX, cBox.MinY, cBox.MinZ), + SbVec3f(cBox.MaxX, cBox.MinY, cBox.MinZ), + SbVec3f(cBox.MaxX, cBox.MaxY, cBox.MinZ), + SbVec3f(cBox.MinX, cBox.MaxY, cBox.MinZ), + SbVec3f(cBox.MinX, cBox.MinY, cBox.MaxZ), + SbVec3f(cBox.MaxX, cBox.MinY, cBox.MaxZ), + SbVec3f(cBox.MaxX, cBox.MaxY, cBox.MaxZ), + SbVec3f(cBox.MinX, cBox.MaxY, cBox.MaxZ) }; coordIndex.setValues(0,36,triangles); @@ -1032,11 +1027,11 @@ void SoFCMeshFaceSet::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢e const MeshCore::MeshPointArray * rPoints = SoFCMeshVertexElement::get(state); if (rPoints && rPoints->size() > 0) { Base::BoundBox3f cBox; - for ( MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); ++it ) + for (MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); cBox &= (*it); box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); - Base::Vector3f mid = cBox.CalcCenter(); + Base::Vector3f mid = cBox.GetCenter(); center.setValue(mid.x,mid.y,mid.z); } else { @@ -1180,11 +1175,13 @@ void SoFCMeshOpenEdgeSet::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &c const MeshCore::MeshPointArray * rPoints = SoFCMeshVertexElement::get(state); if (rPoints && rPoints->size() > 0) { Base::BoundBox3f cBox; - for ( MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); ++it ) - cBox &= (*it); + for (MeshCore::MeshPointArray::_TConstIterator it = rPoints->begin(); it != rPoints->end(); + ++it) + ; + //cBox &= (*it); box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); - Base::Vector3f mid = cBox.CalcCenter(); + Base::Vector3f mid = cBox.GetCenter(); center.setValue(mid.x,mid.y,mid.z); } else { diff --git a/src/Mod/Mesh/Gui/SoFCMeshFaceSet.h b/src/Mod/Mesh/Gui/SoFCMeshFaceSet.h index a27ba0bead..14d3837ed9 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshFaceSet.h +++ b/src/Mod/Mesh/Gui/SoFCMeshFaceSet.h @@ -23,16 +23,15 @@ #ifndef MESHGUI_SOFC_MESHFACESET_H #define MESHGUI_SOFC_MESHFACESET_H -#include -#include -#include - - #include +#include +#include +#include #include #include -#include -#include + +#include + class SoMaterialBundle; diff --git a/src/Mod/Mesh/Gui/SoFCMeshNode.cpp b/src/Mod/Mesh/Gui/SoFCMeshNode.cpp index 7bc47fab2b..0214454e84 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshNode.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshNode.cpp @@ -20,17 +20,15 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # ifdef FC_OS_WIN32 -# include +# include # endif # ifdef FC_OS_MACOSX -# include +# include # else -# include +# include # endif # include # include @@ -44,18 +42,18 @@ # include # include # include -# include # include #endif #include +#include +#include #include #include -#include -#include -#include + #include "SoFCMeshNode.h" + using namespace MeshGui; /** @@ -552,7 +550,7 @@ void SoFCMeshNode::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) const Base::BoundBox3f& cBox = _mesh->getKernel().GetBoundBox(); box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); - Base::Vector3f mid = cBox.CalcCenter(); + Base::Vector3f mid = cBox.GetCenter(); center.setValue(mid.x,mid.y,mid.z); } else { @@ -732,7 +730,7 @@ void SoFCMeshOpenEdge::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢ const Base::BoundBox3f& cBox = _mesh->getKernel().GetBoundBox(); box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); - Base::Vector3f mid = cBox.CalcCenter(); + Base::Vector3f mid = cBox.GetCenter(); center.setValue(mid.x,mid.y,mid.z); } else { diff --git a/src/Mod/Mesh/Gui/SoFCMeshNode.h b/src/Mod/Mesh/Gui/SoFCMeshNode.h index e7ecae3d1f..8a8a687ca2 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshNode.h +++ b/src/Mod/Mesh/Gui/SoFCMeshNode.h @@ -23,10 +23,10 @@ #ifndef MESHGUI_SOFC_MESH_NODE_H #define MESHGUI_SOFC_MESH_NODE_H -#include -#include -#include #include +#include +#include + namespace Mesh { class MeshObject; diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp index 7a7844c929..5e85a0c10e 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp @@ -20,21 +20,19 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # include # include # ifdef FC_OS_WIN32 -# include +# include # endif # ifdef FC_OS_MACOSX -# include -# include +# include +# include # else -# include -# include +# include +# include # endif # include # include @@ -45,29 +43,27 @@ # include # include # include -# include # include # include # include # include -# include # include #endif -#include "SoFCMeshObject.h" #include #include #include #include #include -#include -#include #include #include +#include + +#include "SoFCMeshObject.h" + using namespace MeshGui; - class SoOutputStreambuf : public std::streambuf { public: diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.h b/src/Mod/Mesh/Gui/SoFCMeshObject.h index 8db16d0516..56fcfed4cf 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.h +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.h @@ -25,15 +25,13 @@ #include #include -#include #include #include -#include #include #include -#include #include + using GLuint = unsigned int; using GLint = int; using GLfloat = float; diff --git a/src/Mod/Mesh/Gui/SoFCMeshVertex.cpp b/src/Mod/Mesh/Gui/SoFCMeshVertex.cpp index bb75f4e7e7..0a14ac526b 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshVertex.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshVertex.cpp @@ -20,32 +20,30 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # ifdef FC_OS_WIN32 -# include +# include # endif # ifdef FC_OS_MACOSX -# include +# include # else -# include +# include # endif + # include # include # include # include # include -# include # include # include #endif #include "SoFCMeshVertex.h" -using namespace MeshGui; +using namespace MeshGui; // Defines all required member variables and functions for a // single-value field diff --git a/src/Mod/Mesh/Gui/SoFCMeshVertex.h b/src/Mod/Mesh/Gui/SoFCMeshVertex.h index ace1fd975e..13c4adafdf 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshVertex.h +++ b/src/Mod/Mesh/Gui/SoFCMeshVertex.h @@ -23,12 +23,12 @@ #ifndef MESHGUI_SOFCMESHVERTEX_H #define MESHGUI_SOFCMESHVERTEX_H -#include -#include -#include #include +#include + #include + namespace MeshGui { class MeshGuiExport SoSFMeshPointArray : public SoSField { diff --git a/src/Mod/Mesh/Gui/SoPolygon.cpp b/src/Mod/Mesh/Gui/SoPolygon.cpp index 9024fd990d..a25c8695a1 100644 --- a/src/Mod/Mesh/Gui/SoPolygon.cpp +++ b/src/Mod/Mesh/Gui/SoPolygon.cpp @@ -20,40 +20,31 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # ifdef FC_OS_WIN32 -# include +# include # endif # ifdef FC_OS_MACOSX -# include +# include # else -# include +# include # endif -# include # include -# include -# include -# include +# include + # include -# include -# include # include # include -# include -# include +# include +# include # include #endif -# include -# include - #include "SoPolygon.h" -using namespace MeshGui; +using namespace MeshGui; SO_NODE_SOURCE(SoPolygon) diff --git a/src/Mod/Mesh/Gui/SoPolygon.h b/src/Mod/Mesh/Gui/SoPolygon.h index bd842cccf2..930fa22265 100644 --- a/src/Mod/Mesh/Gui/SoPolygon.h +++ b/src/Mod/Mesh/Gui/SoPolygon.h @@ -23,17 +23,15 @@ #ifndef MESHGUI_SOPOLYGON_H #define MESHGUI_SOPOLYGON_H -#include -#include -#include -#include -#include -#include #include +#include +#include +#include #ifndef MESH_GLOBAL_H -#include +# include #endif + namespace MeshGui { class MeshGuiExport SoPolygon : public SoShape {