Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef OBJTREE_FILTER_H
00030 #define OBJTREE_FILTER_H
00031
00032 #include <srs_env_model/but_server/objtree/box.h>
00033
00034 namespace objtree
00035 {
00036
00040 class Filter
00041 {
00042 public:
00043 enum Type
00044 {
00045 ZERO = 0,
00046 BOX = 1,
00047 PLANE = 2,
00048 SPHERE = 3
00049 };
00050
00051 virtual bool filter(const Box &dim) const = 0;
00052 virtual Type type() const = 0;
00053 };
00054
00058 class FilterBox : public Filter
00059 {
00060 private:
00061 Box m_box;
00062
00063 public:
00064 FilterBox(const Box &box);
00065 virtual bool filter(const Box &dim) const;
00066
00067 virtual Type type() const
00068 {
00069 return BOX;
00070 }
00071 };
00072
00076 class FilterPlane : public Filter
00077 {
00078 private:
00079 float m_posX, m_posY, m_posZ;
00080 float m_vecX, m_vecY, m_vecZ;
00081
00082 public:
00083 FilterPlane(float posX, float posY, float posZ, float vecX, float vecY, float vecZ);
00084 virtual bool filter(const Box &dim) const;
00085
00086 virtual Type type() const
00087 {
00088 return PLANE;
00089 }
00090 };
00091
00095 class FilterZero : public Filter
00096 {
00097 public:
00098 virtual bool filter(const Box &dim) const;
00099
00100 virtual Type type() const
00101 {
00102 return ZERO;
00103 }
00104 };
00105
00109 class FilterSphere : public Filter
00110 {
00111 private:
00112 float m_x, m_y, m_z;
00113 float m_radiusSquare;
00114
00115 public:
00116 FilterSphere(float x, float y, float z, float radius);
00117 virtual bool filter(const Box &dim) const;
00118
00119 virtual Type type() const
00120 {
00121 return SPHERE;
00122 }
00123 };
00124
00125 }
00126
00127 #endif // OBJTREE_FILTER_H
srs_env_model
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Tomas Lokaj, Jan Gorig, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:50:48