78 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
79 std::vector<unsigned int> path;
85 path = r->getFaceHistory();
88 path = r->getPrimitiveHistory();
91 path = r->getFaceHistory();
101 r->computeLongueur();
102 double currentDistance = r->getLongueur();
104 if (currentDistance < it->second->getLongueur())
107 replace = it->second->getConstructId();
120 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
121 std::vector<unsigned int> path;
125 path = r->getFaceHistory();
128 path = r->getPrimitiveHistory();
131 path = r->getFaceHistory();
137 r->computeLongueur();
150 selectedPath.insert(std::pair<std::vector<unsigned int>, T*>(path, r));
158 typename std::map<std::vector<unsigned int>, T*,
CompareToKey>::iterator it;
159 std::vector<unsigned int> path;
163 path = r->getFaceHistory();
166 path = r->getPrimitiveHistory();
169 path = r->getFaceHistory();
175 r->computeLongueur();
176 double currentDistance = r->getLongueur();
181 if (currentDistance < it->second->getLongueur())
195 selectedPath.insert(std::pair<std::vector<unsigned int>, T*>(path, r));
205 return typeid(
this).
name();
: To keep only one from two or more rays which have the same history (events on the same primitive)
virtual void insert(T *r)
Select the ray.
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.
TYPEHISTORY getModeHistory()
Get the TYPEHISTORY of this Selector.
void setModeHistory(TYPEHISTORY _modeHistory)
Set the TYPEHISTORY of this Selector.
TYPEHISTORY modeHistory
TYPEHISTORY used by this Selector (by default, HISTORY_FACE)
virtual void reset()
Reset (clear the data) of this Selector.
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.
FaceSelector(TYPEHISTORY _modeHistory=HISTORY_FACE)
Constructor.
virtual ~FaceSelector()
Destructor.
virtual Selector< T > * Copy()
Copy Selector.
Base class for Selector (used to keep or disable rays according different criterias)
void setIsDeletable(bool _isDeletable)
Set deletable flag.
bool deletable
Flag to know if the selector may be deleted or not.