netgen/libsrc/meshing/geomsearch.hpp

118 lines
1.9 KiB
C++
Raw Normal View History

2009-01-13 04:40:13 +05:00
#ifndef FILE_GEOMSEARCH
#define FILE_GEOMSEARCH
/**************************************************************************/
/* File: geomsearch.hh */
/* Author: Johannes Gerstmayr */
/* Date: 19. Nov. 97 */
/**************************************************************************/
class FrontPoint3;
class FrontFace;
class MiniElement2d;
/// class for quick access of 3D-elements; class cannot delete elements, but only append
class GeomSearch3d
{
public:
///
GeomSearch3d();
///
virtual ~GeomSearch3d();
///
2013-04-03 02:29:53 +06:00
void Init (Array <FrontPoint3,PointIndex::BASE, PointIndex> *pointsi, Array <FrontFace> *facesi);
2009-01-13 04:40:13 +05:00
///get elements max extension
void ElemMaxExt(Point3d& minp, Point3d& maxp, const MiniElement2d& elem);
///get minimum coordinates of two points ->p2
void MinCoords(const Point3d& p1, Point3d& p2);
///get minimum coordinates of two points ->p2
void MaxCoords(const Point3d& p1, Point3d& p2);
///create a hashtable from an existing array of triangles
///sizei = number of pieces in one direction
void Create();
///add new element to Hashtable
void AddElem(const MiniElement2d& elem, INDEX elemnum);
///GetLocal faces in sphere with radius xh and middlepoint p
2009-01-25 17:35:25 +05:00
void GetLocals(Array<MiniElement2d> & locfaces, Array<INDEX> & findex,
2009-01-13 04:40:13 +05:00
INDEX fstind, const Point3d& p0, double xh);
private:
2009-01-25 17:35:25 +05:00
Array <FrontFace> *faces; // Pointers to Arrays in Adfront
2013-04-03 02:29:53 +06:00
Array <FrontPoint3,PointIndex::BASE, PointIndex> *points;
2009-01-13 04:40:13 +05:00
2009-01-25 17:35:25 +05:00
Array <Array <int>*> hashtable;
2009-01-13 04:40:13 +05:00
Point3d minext; //extension of Hashdomain
Point3d maxext;
Point3d maxextreal;
Vec3d elemsize; //size of one Hash-Element
threeint size; // size of Hashtable in each direction
int reset;
int hashcount;
};
#endif