23 typedef std::map<signature, std::deque<Ray*>>
families;
56 for (
unsigned int i = 0; i <
_tabRays->size(); i++)
58 mapFamilies[
_tabRays->at(i)->getSignature(typeEv)].push_back(
_tabRays->at(i));
61 return mapFamilies.size();
72 std::map<signature, std::deque<Ray*>>::iterator it_families;
73 for (it_families = mapFamilies.begin(); it_families != mapFamilies.end(); it_families++)
75 std::deque<Ray*>& aTabRay = (*it_families).second;
76 for (
unsigned int i = 0; i < aTabRay.size(); i++)
91 for (
unsigned int i = 0; i < tabRay.size(); i++)
94 seqMap[seq].push_back(tabRay.at(i));
107 return sqrt(thickness * thickness + d_R * d_R);
118 for (
unsigned int i = 0; i < ray->
getNbEvents(); i++)
120 if (ray->
getEvents()->at(i).get()->getType() == evType)
122 res.push_back(ray->
getEvents()->at(i).get());
129 inline virtual std::deque<Ray*>::iterator
erase_element(std::deque<Ray*>& tabRays,
130 std::deque<Ray*>::iterator& iter)
135 return tabRays.erase(iter);
std::map< signature, std::deque< Ray * > > families
std::map< sequence, std::deque< Ray * > > sequenceMap
std::list< Event * > sequence
std::pair< bitSet, bitSet > signature
Base class of Event, Material, PostFilter, Ray, Repere, Scene, Shape, Simulation, Source.
Class to apply a filter to the group of valid rays found by ray tracing.
virtual std::deque< Ray * >::iterator erase_element(std::deque< Ray * > &tabRays, std::deque< Ray * >::iterator &iter)
Delete an element in the rays array.
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 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.
virtual sequence buildSequence(const signature &sig, Ray *ray, const typeevent &evType)
Build the sequence of physical shape encountered by the ray.
virtual unsigned int Process()
Apply a filter to the group of valid rays found by ray tracing.
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...
virtual void rebuildTabRays(families &mapFamilies)
Rebuild rays tab after treatment.
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...
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.