23 typedef std::map< signature, std::deque<Ray*> >
families;
42 virtual unsigned int Process() {
return 0; }
50 for (
unsigned int i = 0; i <
_tabRays->size(); i++)
52 mapFamilies[
_tabRays->at(i)->getSignature(typeEv)].push_back(
_tabRays->at(i));
55 return mapFamilies.size();
66 std::map< signature, std::deque<Ray*> >::iterator it_families;
67 for (it_families = mapFamilies.begin(); it_families != mapFamilies.end(); it_families++)
69 std::deque<Ray*>& aTabRay= (*it_families).second;
70 for (
unsigned int i=0; i<aTabRay.size(); i++)
72 _tabRays->push_back( aTabRay.at(i) );
84 for (
unsigned int i = 0; i < tabRay.size(); i++)
87 seqMap[seq].push_back(tabRay.at(i));
100 return sqrt(thickness * thickness + d_R * d_R);
111 for (
unsigned int i = 0; i < ray->
getNbEvents(); i++)
113 if (ray->
getEvents()->at(i).get()->getType() == evType) { res.push_back(ray->
getEvents()->at(i).get()); }
119 inline virtual std::deque<Ray*>::iterator
erase_element(std::deque<Ray*>& tabRays, std::deque<Ray*>::iterator& iter)
124 return tabRays.erase(iter);
134 #endif //POST_FILTER_H decimal minimum_distance(const decimal &thickness, const decimal &d_R) const
compute minimum acceptable distance between two rays thickness is the thickness of a ray after a give...
Base class of Event, Material, PostFilter, Ray, Repere, Scene, Shape, Simulation, Source...
std::pair< bitSet, bitSet > signature
std::list< Event * > sequence
Class to apply a filter to the group of valid rays found by ray tracing.
unsigned int getNbEvents() const
Return the total number of events.
std::vector< boost::shared_ptr< Event > > * getEvents()
Return the events array encountered by the ray.
virtual unsigned int Process()
Apply a filter to the group of valid rays found by ray tracing.
std::deque< Ray * > * _tabRays
Rays tab: pointers list of rays.
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
std::map< signature, std::deque< Ray * > > families
std::map< sequence, std::deque< Ray * > > sequenceMap
virtual std::deque< Ray * >::iterator erase_element(std::deque< Ray *> &tabRays, std::deque< Ray *>::iterator &iter)
Delete an element in the rays array.
virtual void rebuildTabRays(families &mapFamilies)
Rebuild rays tab after treatment.
virtual sequenceMap buildSequenceMap(const signature &sig, std::vector< Ray *> tabRay, const typeevent &evType)
Sort rays by events of type evType encountered along is path.
virtual sequence buildSequence(const signature &sig, Ray *ray, const typeevent &evType)
Build the sequence of physical shape encountered by the ray.
virtual unsigned int buildFamilies(families &mapFamilies, typeevent typeEv)
Group rays with the same signature (same source and receptor events of same kind in the same order) ...
PostFilter(std::deque< Ray *> *tabRay)
Constructor.