[Mesh] Gui: So*: remove unused includes

- also some sorting
This commit is contained in:
Uwe
2022-12-04 16:00:03 +01:00
parent 3f05568ab9
commit e89596bd86
12 changed files with 85 additions and 114 deletions

View File

@@ -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 <algorithm>
# include <climits>
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
# include <OpenGL/glext.h>
# include <OpenGL/gl.h>
# include <OpenGL/glext.h>
# include <OpenGL/glu.h>
# else
# include <GL/gl.h>
# include <GL/glu.h>
# include <GL/glext.h>
# include <GL/gl.h>
# include <GL/glext.h>
# include <GL/glu.h>
# endif
# include <Inventor/actions/SoGLRenderAction.h>
# include <Inventor/actions/SoSearchAction.h>
@@ -56,19 +55,16 @@
# include <Inventor/errors/SoDebugError.h>
# include <Inventor/nodes/SoCoordinate3.h>
#endif
#include <Inventor/C/glue/gl.h>
#include <Inventor/misc/SoContextHandler.h>
#include <Gui/GLBuffer.h>
#include <Gui/SoFCInteractiveElement.h>
#include <Gui/SoFCSelectionAction.h>
#include <Gui/GLBuffer.h>
#include "SoFCIndexedFaceSet.h"
#define RENDER_GL_VAO
//#define RENDER_GLARRAYS
using namespace MeshGui;

View File

@@ -23,15 +23,15 @@
#ifndef MESHGUI_SOFCINDEXEDFACESET_H
#define MESHGUI_SOFCINDEXEDFACESET_H
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/elements/SoMaterialBindingElement.h>
#include <Inventor/engines/SoSubEngine.h>
#include <Inventor/fields/SoSFBool.h>
#include <Inventor/fields/SoMFColor.h>
#include <Inventor/fields/SoSFBool.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#ifndef MESH_GLOBAL_H
#include <Mod/Mesh/MeshGlobal.h>
#endif
class SoGLCoordinateElement;
class SoTextureCoordinateBundle;

View File

@@ -20,17 +20,15 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <windows.h>
# include <windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# include <GL/gl.h>
# endif
# include <Inventor/SbBox.h>
# include <Inventor/SoOutput.h>
@@ -41,7 +39,6 @@
# include <Inventor/actions/SoGetPrimitiveCountAction.h>
# include <Inventor/actions/SoPickAction.h>
# include <Inventor/actions/SoRayPickAction.h>
# include <Inventor/actions/SoWriteAction.h>
# include <Inventor/bundles/SoMaterialBundle.h>
# include <Inventor/bundles/SoTextureCoordinateBundle.h>
# include <Inventor/caches/SoBoundingBoxCache.h>
@@ -50,23 +47,21 @@
# include <Inventor/details/SoPointDetail.h>
# include <Inventor/elements/SoGLCacheContextElement.h>
# include <Inventor/elements/SoLazyElement.h>
# include <Inventor/elements/SoLightModelElement.h>
# include <Inventor/misc/SoState.h>
# include <Inventor/errors/SoReadError.h>
# include <Inventor/misc/SoState.h>
#endif
#include <Inventor/caches/SoBoundingBoxCache.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Gui/SoFCInteractiveElement.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/Core/Elements.h>
#include <Mod/Mesh/App/Core/Grid.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/Core/MeshIO.h>
#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 &cente
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 {

View File

@@ -23,16 +23,15 @@
#ifndef MESHGUI_SOFC_MESHFACESET_H
#define MESHGUI_SOFC_MESHFACESET_H
#include <Inventor/fields/SoSField.h>
#include <Inventor/fields/SoSubField.h>
#include <Mod/Mesh/App/Core/Elements.h>
#include <Inventor/elements/SoReplacedElement.h>
#include <Inventor/fields/SoMFInt32.h>
#include <Inventor/fields/SoMFVec3f.h>
#include <Inventor/fields/SoSField.h>
#include <Inventor/nodes/SoNode.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/fields/SoMFVec3f.h>
#include <Inventor/fields/SoMFInt32.h>
#include <Mod/Mesh/App/Core/Elements.h>
class SoMaterialBundle;

View File

@@ -20,17 +20,15 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <windows.h>
# include <windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# include <GL/gl.h>
# endif
# include <Inventor/SbBox.h>
# include <Inventor/SoOutput.h>
@@ -44,18 +42,18 @@
# include <Inventor/details/SoPointDetail.h>
# include <Inventor/elements/SoGLCacheContextElement.h>
# include <Inventor/elements/SoLazyElement.h>
# include <Inventor/elements/SoLightModelElement.h>
# include <Inventor/misc/SoState.h>
#endif
#include <Gui/SoFCInteractiveElement.h>
#include <Mod/Mesh/App/Mesh.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/Core/Elements.h>
#include <Mod/Mesh/App/Core/Grid.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/Core/MeshIO.h>
#include <Mod/Mesh/App/Mesh.h>
#include "SoFCMeshNode.h"
using namespace MeshGui;
/**
@@ -552,7 +550,7 @@ void SoFCMeshNode::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
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 &cent
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 {

View File

@@ -23,10 +23,10 @@
#ifndef MESHGUI_SOFC_MESH_NODE_H
#define MESHGUI_SOFC_MESH_NODE_H
#include <Inventor/nodes/SoNode.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/fields/SoMFVec3f.h>
#include <Inventor/fields/SoMFInt32.h>
#include <Inventor/fields/SoMFVec3f.h>
#include <Inventor/nodes/SoShape.h>
namespace Mesh {
class MeshObject;

View File

@@ -20,21 +20,19 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <algorithm>
# include <climits>
# ifdef FC_OS_WIN32
# include <windows.h>
# include <windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
# else
# include <GL/gl.h>
# include <GL/glu.h>
# include <GL/gl.h>
# include <GL/glu.h>
# endif
# include <Inventor/SbLine.h>
# include <Inventor/SoPickedPoint.h>
@@ -45,29 +43,27 @@
# include <Inventor/actions/SoGLRenderAction.h>
# include <Inventor/actions/SoPickAction.h>
# include <Inventor/actions/SoSearchAction.h>
# include <Inventor/actions/SoWriteAction.h>
# include <Inventor/bundles/SoMaterialBundle.h>
# include <Inventor/bundles/SoTextureCoordinateBundle.h>
# include <Inventor/details/SoFaceDetail.h>
# include <Inventor/details/SoLineDetail.h>
# include <Inventor/errors/SoReadError.h>
# include <Inventor/misc/SoState.h>
#endif
#include "SoFCMeshObject.h"
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Gui/SoFCInteractiveElement.h>
#include <Gui/SoFCSelectionAction.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/Core/MeshIO.h>
#include <Mod/Mesh/App/Core/MeshKernel.h>
#include <Mod/Mesh/App/Core/Elements.h>
#include <Mod/Mesh/App/Core/Grid.h>
#include <Mod/Mesh/App/Core/MeshKernel.h>
#include "SoFCMeshObject.h"
using namespace MeshGui;
class SoOutputStreambuf : public std::streambuf
{
public:

View File

@@ -25,15 +25,13 @@
#include <Inventor/fields/SoSField.h>
#include <Inventor/fields/SoSFUInt32.h>
#include <Inventor/fields/SoSubField.h>
#include <Inventor/fields/SoSFVec3f.h>
#include <Inventor/fields/SoSFVec3s.h>
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/elements/SoReplacedElement.h>
#include <Mod/Mesh/App/Core/Elements.h>
#include <Mod/Mesh/App/Mesh.h>
using GLuint = unsigned int;
using GLint = int;
using GLfloat = float;

View File

@@ -20,32 +20,30 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <windows.h>
# include <windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# include <GL/gl.h>
# endif
# include <Inventor/actions/SoCallbackAction.h>
# include <Inventor/actions/SoGetBoundingBoxAction.h>
# include <Inventor/actions/SoGetPrimitiveCountAction.h>
# include <Inventor/actions/SoGLRenderAction.h>
# include <Inventor/actions/SoPickAction.h>
# include <Inventor/actions/SoWriteAction.h>
# include <Inventor/errors/SoReadError.h>
# include <Inventor/misc/SoState.h>
#endif
#include "SoFCMeshVertex.h"
using namespace MeshGui;
using namespace MeshGui;
// Defines all required member variables and functions for a
// single-value field

View File

@@ -23,12 +23,12 @@
#ifndef MESHGUI_SOFCMESHVERTEX_H
#define MESHGUI_SOFCMESHVERTEX_H
#include <Inventor/fields/SoSField.h>
#include <Inventor/fields/SoSubField.h>
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/elements/SoReplacedElement.h>
#include <Inventor/fields/SoSField.h>
#include <Mod/Mesh/App/Core/Elements.h>
namespace MeshGui {
class MeshGuiExport SoSFMeshPointArray : public SoSField {

View File

@@ -20,40 +20,31 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <Windows.h>
# include <Windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# include <GL/gl.h>
# endif
# include <cfloat>
# include <algorithm>
# include <Inventor/actions/SoCallbackAction.h>
# include <Inventor/actions/SoGetBoundingBoxAction.h>
# include <Inventor/actions/SoGetPrimitiveCountAction.h>
# include <cfloat>
# include <Inventor/actions/SoGLRenderAction.h>
# include <Inventor/actions/SoPickAction.h>
# include <Inventor/actions/SoWriteAction.h>
# include <Inventor/bundles/SoMaterialBundle.h>
# include <Inventor/bundles/SoTextureCoordinateBundle.h>
# include <Inventor/elements/SoGLCacheContextElement.h>
# include <Inventor/errors/SoReadError.h>
# include <Inventor/elements/SoCoordinateElement.h>
# include <Inventor/elements/SoLazyElement.h>
# include <Inventor/misc/SoState.h>
#endif
# include <Inventor/elements/SoCoordinateElement.h>
# include <cfloat>
#include "SoPolygon.h"
using namespace MeshGui;
using namespace MeshGui;
SO_NODE_SOURCE(SoPolygon)

View File

@@ -23,17 +23,15 @@
#ifndef MESHGUI_SOPOLYGON_H
#define MESHGUI_SOPOLYGON_H
#include <Inventor/fields/SoSFUInt32.h>
#include <Inventor/fields/SoSFInt32.h>
#include <Inventor/fields/SoSFBool.h>
#include <Inventor/fields/SoSubField.h>
#include <Inventor/nodes/SoSubNode.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/elements/SoReplacedElement.h>
#include <Inventor/fields/SoSFBool.h>
#include <Inventor/fields/SoSFInt32.h>
#include <Inventor/nodes/SoShape.h>
#ifndef MESH_GLOBAL_H
#include <Mod/Mesh/MeshGlobal.h>
# include <Mod/Mesh/MeshGlobal.h>
#endif
namespace MeshGui {
class MeshGuiExport SoPolygon : public SoShape {