File: PointIntersectionFunctor.h

package info (click to toggle)
psurface 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,016 kB
  • ctags: 1,077
  • sloc: cpp: 12,335; makefile: 111; awk: 38
file content (22 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef POINT_INTERSECTION_FUNCTOR_H
#define POINT_INTERSECTION_FUNCTOR_H

#include "StaticVector.h"

/** \brief Functor class needed to insert StaticVector<.,3> objects into a MultiDimOctree
 */
template <class ctype>
struct PointIntersectionFunctor
{

    bool operator()(const std::tr1::array<ctype,3>& lower, 
                    const std::tr1::array<ctype,3>& upper, const StaticVector<ctype,3>& item) const {
        return (lower[0] <= item[0]) && (item[0] <= upper[0])
            && (lower[1] <= item[1]) && (item[1] <= upper[1])
            && (lower[2] <= item[2]) && (item[2] <= upper[2]);
    }

};


#endif