70 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
71 std::vector<unsigned int> path;
77 path = r->getFaceHistory();
80 path = r->getPrimitiveHistory();
83 path = r->getFaceHistory();
93 double currentDistance = r->getLongueur();
95 if (currentDistance < it->second->getLongueur())
98 replace = it->second->getConstructId();
112 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
113 std::vector<unsigned int> path;
117 path = r->getFaceHistory();
120 path = r->getPrimitiveHistory();
123 path = r->getFaceHistory();
129 r->computeLongueur();
141 selectedPath.insert(std::pair<std::vector<unsigned int>, T*>(path, r));
149 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
150 std::vector<unsigned int> path;
154 path = r->getFaceHistory();
157 path = r->getPrimitiveHistory();
160 path = r->getFaceHistory();
165 r->computeLongueur();
166 double currentDistance = r->getLongueur();
171 if (currentDistance < it->second->getLongueur())
184 selectedPath.insert(std::pair<std::vector<unsigned int>, T*>(path, r));
193 return typeid(
this).
name();
TYPEHISTORY getModeHistory()
Get the TYPEHISTORY of this Selector.
void setModeHistory(TYPEHISTORY _modeHistory)
Set the TYPEHISTORY of this Selector.
bool deletable
Flag to know if the selector may be deleted or not.
std::map< std::vector< unsigned int >, T *, CompareToKey > selectedPath
Histories of all selected rays so far.
virtual const char * getSelectorName()
Return the class type of the selector.
virtual bool insertWithTest(T *r)
Select the ray if it respects the criteria of this Selector.
virtual void insert(T *r)
Select the ray.
TYPEHISTORY modeHistory
TYPEHISTORY used by this Selector (by default, HISTORY_FACE)
virtual SELECTOR_RESPOND canBeInserted(T *r, unsigned long long &replace)
Check if the ray respects the criteria of this Selector and return a SELECTOR_RESPOND.
virtual void reset()
Reset (clear the data) of this Selector.
: To keep only one from two or more rays which have the same history (events on the same primitive) ...
virtual ~FaceSelector()
Destructor.
FaceSelector(TYPEHISTORY _modeHistory=HISTORY_FACE)
Constructor.
Base class for Selector (used to keep or disable rays according different criterias) ...
void setIsDeletable(bool _isDeletable)
Set deletable flag.
virtual Selector< T > * Copy()
Copy Selector.