8 #ifndef ssClosestIntersectionFunctor_H_
9 #define ssClosestIntersectionFunctor_H_
11 #include <vlutil/vlConfig.h>
31 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
55 virtual bool operator()(TypeToIntersect& itemToIntersect, Container& container);
77 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
80 , myIntersectionRecord(0)
81 , myIntersectionRecordType(
DtGdbNode::IRT_IPOINT)
86 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
91 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
93 (TypeToIntersect& itemToIntersect, Container& containerToIntersect)
97 assert(myIntersectionRecord != 0);
99 typename Container::iterator iter = containerToIntersect.begin();
100 typename Container::iterator endIter = containerToIntersect.end();
101 for (; iter != endIter; ++iter)
103 if ((*iter)->intersect(itemToIntersect, *myIntersectionRecord, myIntersectionRecordType))
105 assert(myIntersectionRecord->intersectionFound());
114 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
115 T_IntersectionRecordType*
118 return myIntersectionRecord;
122 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
126 assert(newIntersectionRecord != 0);
127 myIntersectionRecord = newIntersectionRecord;
131 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
135 return myIntersectionRecordType;
138 template <
typename TypeToIntersect,
typename Container,
typename T_IntersectionRecordType>
142 myIntersectionRecordType = newIntersectionRecordType;
T_IntersectionRecordType * myIntersectionRecord
Definition: ssClosestIntersectionFunctor.h:69
Definition: ssClosestIntersectionFunctor.h:32
virtual ~DtSsClosestIntersectionFunctor()
Definition: ssClosestIntersectionFunctor.h:87
DtIntersectRecordType
Definition: gdbNode.h:74
DtSsClosestIntersectionFunctor()
Definition: ssClosestIntersectionFunctor.h:78
virtual void setIntersectionRecordType(DtGdbNode::DtIntersectRecordType &newIntersectionRecordType)
Definition: ssClosestIntersectionFunctor.h:140
virtual void setIntersectionRecord(T_IntersectionRecordType *newIntersectionRecord)
Definition: ssClosestIntersectionFunctor.h:124
virtual T_IntersectionRecordType * intersectionRecord() const
Definition: ssClosestIntersectionFunctor.h:116
virtual bool operator()(TypeToIntersect &itemToIntersect, Container &container)
Definition: ssClosestIntersectionFunctor.h:93
Definition: ssFunctor.h:46
virtual DtGdbNode::DtIntersectRecordType intersectionRecordType() const
Definition: ssClosestIntersectionFunctor.h:133
DtSsClosestIntersectionFunctor & operator=(const DtSsClosestIntersectionFunctor &original)
DtGdbNode::DtIntersectRecordType myIntersectionRecordType
Definition: ssClosestIntersectionFunctor.h:70