00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CSTOOL_MESHFILTER_H__
00020 #define __CSTOOL_MESHFILTER_H__
00021
00022 #include "csutil/set.h"
00023 #include "csutil/ref.h"
00024 #include "iengine/mesh.h"
00025
00026 namespace CS
00027 {
00028 namespace Utility
00029 {
00030
00031 enum MeshFilterMode
00032 {
00033 MESH_FILTER_EXCLUDE,
00034 MESH_FILTER_INCLUDE
00035 };
00036
00037 class CS_CRYSTALSPACE_EXPORT MeshFilter
00038 {
00039 public:
00040 MeshFilter();
00041 ~MeshFilter();
00042
00043 void AddFilterMesh (iMeshWrapper* mesh, bool addChildren=false);
00044 void RemoveFilterMesh (iMeshWrapper* mesh);
00045
00046 bool IsMeshFiltered (iMeshWrapper* mesh) const;
00047
00048 void SetFilterMode (MeshFilterMode mode)
00049 {
00050 filterMode = mode;
00051 }
00052
00053 MeshFilterMode GetFilterMode () const
00054 {
00055 return filterMode;
00056 }
00057
00058 void Clear ();
00059
00060 private:
00061 MeshFilterMode filterMode;
00062
00063 csSet<csRef<iMeshWrapper> > filteredMeshes;
00064 };
00065
00066 }
00067 }
00068
00069 #endif