| [cae614] | 1 | /*
 | 
|---|
 | 2 |  * BaseFillerPrepator.hpp
 | 
|---|
 | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Sep 2, 2014
 | 
|---|
 | 5 |  *      Author: heber
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | #ifndef BASEFILLERPREPARATOR_HPP_
 | 
|---|
 | 9 | #define BASEFILLERPREPARATOR_HPP_
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 | // include config.h
 | 
|---|
 | 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 13 | #include <config.h>
 | 
|---|
 | 14 | #endif
 | 
|---|
 | 15 | 
 | 
|---|
| [aa91de0] | 16 | #include <cstddef>
 | 
|---|
 | 17 | 
 | 
|---|
| [cae614] | 18 | class atom;
 | 
|---|
 | 19 | class Filler;
 | 
|---|
 | 20 | class FillPredicate;
 | 
|---|
 | 21 | class Inserter;
 | 
|---|
 | 22 | class LinkedCell_deprecated;
 | 
|---|
 | 23 | class Mesh;
 | 
|---|
 | 24 | class molecule;
 | 
|---|
 | 25 | class Tesselation;
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | #include <vector>
 | 
|---|
 | 28 | 
 | 
|---|
 | 29 | /** BaseFillerPrepator is the base class for all specific filler preparators.
 | 
|---|
 | 30 |  *
 | 
|---|
 | 31 |  * Specific preparators combine all the various aspects of filling into a specific
 | 
|---|
 | 32 |  * package for easy and convenient calling for returning a filler function.
 | 
|---|
 | 33 |  *
 | 
|---|
 | 34 |  * It defines both the interface and implements some common functions.
 | 
|---|
 | 35 |  */
 | 
|---|
 | 36 | class BaseFillerPreparator
 | 
|---|
 | 37 | {
 | 
|---|
 | 38 | public:
 | 
|---|
 | 39 |   BaseFillerPreparator(molecule *_filler);
 | 
|---|
 | 40 |   virtual ~BaseFillerPreparator();
 | 
|---|
 | 41 | 
 | 
|---|
 | 42 |   void addSurfacePredicate(
 | 
|---|
 | 43 |       const double _radius,
 | 
|---|
| [df0c80] | 44 |       std::vector<atom *> &_atoms,
 | 
|---|
 | 45 |       const double minimum_distance = 0.);
 | 
|---|
| [cae614] | 46 |   void addRandomInserter(
 | 
|---|
 | 47 |       const double _RandAtomDisplacement,
 | 
|---|
 | 48 |       const double _RandMoleculeDisplacement,
 | 
|---|
 | 49 |       const bool _DoRotate);
 | 
|---|
 | 50 |   void addVoidPredicate(
 | 
|---|
 | 51 |       const double _mindistance);
 | 
|---|
 | 52 |   bool operator()();
 | 
|---|
 | 53 | 
 | 
|---|
 | 54 |   /* The operator is just a getter for the constructed fillerFunction.
 | 
|---|
 | 55 |    *
 | 
|---|
 | 56 |    * \return allocated Filler (is not deleted here)
 | 
|---|
 | 57 |    */
 | 
|---|
 | 58 |   Filler* obtainFiller()
 | 
|---|
 | 59 |   {
 | 
|---|
 | 60 |     Filler *temp = fillerFunction;
 | 
|---|
 | 61 |     fillerFunction = NULL;
 | 
|---|
 | 62 |     return temp;
 | 
|---|
 | 63 |   }
 | 
|---|
 | 64 | 
 | 
|---|
 | 65 | protected:
 | 
|---|
 | 66 |   molecule *filler;
 | 
|---|
 | 67 |   FillPredicate * surface_predicate;
 | 
|---|
 | 68 |   LinkedCell_deprecated * LC;
 | 
|---|
 | 69 |   Tesselation * TesselStruct;
 | 
|---|
 | 70 |   FillPredicate *voidnode_predicate;
 | 
|---|
 | 71 |   FillPredicate *Andpredicate;
 | 
|---|
 | 72 |   Mesh *mesh;
 | 
|---|
 | 73 |   Inserter *inserter;
 | 
|---|
 | 74 |   Filler *fillerFunction;
 | 
|---|
 | 75 | };
 | 
|---|
 | 76 | 
 | 
|---|
 | 77 | 
 | 
|---|
 | 78 | #endif /* BASEFILLERPREPARATOR_HPP_ */
 | 
|---|