Skip to content
Snippets Groups Projects
Commit 48554b32 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix minimize

parent 6a057fa6
No related branches found
No related tags found
No related merge requests found
......@@ -2,22 +2,14 @@
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
//
// Contributor(s):
// We lost track of the origin of this octree code. If you happen to
// know the author of the original routines, please send us an email.
#include <iostream>
#include <list>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <list>
#include "GmshMessage.h"
#include "OctreeInternals.h"
using std::list;
int initializeOctantBuckets(double *_orig, double *_size, int _maxElem,
octantBucket **buckets_head, globalInfo **globalPara)
// Initialize the buckets
......@@ -285,13 +277,13 @@ int subdivideOctantBucket(octantBucket *_bucket, globalInfo *_globalPara)
return 1;
}
void * searchElement(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement)
void *searchElement(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement)
{
int flag;
octantBucket *ptrBucket;
ELink ptr1;
list<void *>::iterator iter;
std::list<void*>::iterator iter;
void * ptrToEle = _globalPara->ptrToPrevElement;
if (ptrToEle) {
......@@ -385,12 +377,13 @@ void insertOneBB(void* _region, double *_minPt, double *_maxPt, octantBucket *_b
return;
}
void * searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement, list<void *> *_elements)
void *searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement,
std::list<void*> *_elements)
{
int flag, flag1;
octantBucket *ptrBucket;
list<void *>::iterator iter;
std::list<void*>::iterator iter;
ptrBucket = findElementBucket(_buckets_head, _pt);
if (ptrBucket == NULL) {
......@@ -411,7 +404,6 @@ void * searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_
flag1 = 0;
for (iter = (ptrBucket->listBB).begin();
iter != (ptrBucket->listBB).end(); iter++){
// printf("Enter 1 \n");
flag = xyzInElementBB(_pt, *iter, BBElement);
if (flag == 1)
flag = xyzInElement(*iter, _pt);
......
......@@ -68,14 +68,14 @@ int subdivideOctantBucket(octantBucket *bucket, globalInfo *globalPara);
int initializeOctantBuckets(double *orig, double *size, int maxElem,
octantBucket **buckets, globalInfo **globalPara);
int checkElementInBucket(octantBucket *bucket, void * element);
octantBucket* findElementBucket(octantBucket *buckets, double *pt);
void * searchElement(octantBucket *buckets, double *pt,
globalInfo *globalPara, BBFunction BBElement,
InEleFunction xyzInElement);
octantBucket *findElementBucket(octantBucket *buckets, double *pt);
void *searchElement(octantBucket *buckets, double *pt,
globalInfo *globalPara, BBFunction BBElement,
InEleFunction xyzInElement);
int xyzInElementBB(double *xyz, void *region, BBFunction BBElement);
void insertOneBB(void *, double *, double *, octantBucket *);
void * searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement,
std::list<void *> *_elements);
void *searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara,
BBFunction BBElement, InEleFunction xyzInElement,
std::list<void *> *_elements);
#endif
......@@ -668,16 +668,26 @@ void window_cb(Fl_Widget *w, void *data)
if(!strcmp(str, "minimize")){
for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++)
GUI::instance()->graph[i]->win->iconize();
GUI::instance()->options->win->iconize();
GUI::instance()->plugins->win->iconize();
GUI::instance()->fields->win->iconize();
GUI::instance()->visibility->win->iconize();
GUI::instance()->clipping->win->iconize();
GUI::instance()->manip->win->iconize();
GUI::instance()->stats->win->iconize();
GUI::instance()->messages->win->iconize();
GUI::instance()->menu->win->iconize();
if(GUI::instance()->graph[i]->win->shown())
GUI::instance()->graph[i]->win->iconize();
if(GUI::instance()->options->win->shown())
GUI::instance()->options->win->iconize();
if(GUI::instance()->plugins->win->shown())
GUI::instance()->plugins->win->iconize();
if(GUI::instance()->fields->win->shown())
GUI::instance()->fields->win->iconize();
if(GUI::instance()->visibility->win->shown())
GUI::instance()->visibility->win->iconize();
if(GUI::instance()->clipping->win->shown())
GUI::instance()->clipping->win->iconize();
if(GUI::instance()->manip->win->shown())
GUI::instance()->manip->win->iconize();
if(GUI::instance()->stats->win->shown())
GUI::instance()->stats->win->iconize();
if(GUI::instance()->messages->win->shown())
GUI::instance()->messages->win->iconize();
if(GUI::instance()->menu->win->shown())
GUI::instance()->menu->win->iconize();
}
else if(!strcmp(str, "zoom")){
if(zoom){
......
......@@ -281,15 +281,15 @@ aboutWindow${OBJEXT}: aboutWindow.cpp GUI.h aboutWindow.h paletteWindow.h \
../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
../Common/GmshConfig.h
fileDialogs${OBJEXT}: fileDialogs.cpp ../Common/GmshConfig.h \
../Common/GmshDefines.h GUI.h ../Common/CreateFile.h \
../Common/Options.h ../Post/ColorTable.h Draw.h ../Geo/GModel.h \
../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Common/GmshMessage.h ../Common/GmshDefines.h GUI.h \
../Common/CreateFile.h ../Common/Options.h ../Post/ColorTable.h Draw.h \
../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
../Mesh/meshPartitionOptions.h fileChooser.h
extraDialogs${OBJEXT}: extraDialogs.cpp GUI.h paletteWindow.h \
......
......@@ -212,8 +212,7 @@ clean-fm:
depend: initialtag
mv -f Common/GmshConfig.h .
cp -f utils/misc/GmshConfig.depend Common/GmshConfig.h
for i in ${GMSH_DIRS};\
do (cd $$i && ${MAKE} depend); done
for i in ${GMSH_DIRS}; do (cd $$i && ${MAKE} depend); done
mv -f GmshConfig.h Common/
nodepend:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment