Skip to content
Snippets Groups Projects
Forked from gmsh / gmsh
18736 commits behind the upstream repository.
  • Christophe Geuzaine's avatar
    95f5910a
    · 95f5910a
    Christophe Geuzaine authored
    - cleaned up the octree code (renamed some files, added copyright
      notices, indented everything)
    
    - backported JF's doc from the texinfo file into the c++ code (the
      documentation is actually generated automatically by Gmsh with
      "gmsh -doc"!)
    
    - replaced nPoints with nPointsU and nPointsV in CutGrid
    
    - fixed a couple of printfs + removed some unused variables
    95f5910a
    History
    Christophe Geuzaine authored
    - cleaned up the octree code (renamed some files, added copyright
      notices, indented everything)
    
    - backported JF's doc from the texinfo file into the c++ code (the
      documentation is actually generated automatically by Gmsh with
      "gmsh -doc"!)
    
    - replaced nPoints with nPointsU and nPointsV in CutGrid
    
    - fixed a couple of printfs + removed some unused variables
Octree.h 1.46 KiB
#ifndef _OCTREE_H_
#define _OCTREE_H_

// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
// 
// Please report all bugs and problems to <gmsh@geuz.org>.

#include <list>
#include "OctreeInternals.h"

using std::list;

Octree* Octree_Create(int maxElements, // max. num of elts allowed in an octant
		      double *origin, // smallest x,y, z of model's bounding box
		      double *size, // size in x, y, z of model bounding box
		      void  (*BB)(void *, double*, double*),
		      void  (*Centroid)(void *, double *),
		      int   (*InEle)(void *, double *));

void  Octree_Delete(Octree *);  
void  Octree_Insert(void *, Octree *);
void  Octree_Arrange(Octree *);
void * Octree_Search(double *, Octree *);
void  Octree_SearchAll(double *, Octree *, list<void *> *);

#endif