00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #pragma once 00011 00012 00013 #ifdef HMFC_STATIC_LIB 00014 # error "Code cannot be statically linked." 00015 #endif 00016 00017 00018 #ifdef H_PACK_8 00019 # pragma pack(push) 00020 # pragma pack(8) 00021 #endif 00022 00023 00025 00026 # if !defined(__APPLE__) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)) 00027 # define OLD_GCC 00028 # define OVERRIDE 00029 # else 00030 # define OVERRIDE override 00031 # endif 00032 00033 #include "PointCloudAPI.h" 00034 #include "HWindowInfoOOC.h" 00035 #include "varray.h" 00036 00037 00039 00040 00044 class HWindowFilterOOC : public ooc::query::Filter { 00045 public: 00049 HWindowFilterOOC (bool deep_filter); 00050 00053 virtual bool RejectPointsInMemory () OVERRIDE; 00054 00057 virtual bool RejectPointsOnDisk () OVERRIDE; 00058 00061 virtual bool RejectNode (ooc::NodeHandle const & node_handle) OVERRIDE; 00062 00067 virtual bool RejectBounding (ooc::Point const & min_bound, ooc::Point const & max_bound) OVERRIDE; 00068 00073 virtual bool AcceptPoint (ooc::Point const & point, size_t point_index) OVERRIDE; 00074 00077 void AddRectangleWindow (HBaseView & view, ooc::Point const & window_min, ooc::Point const & window_max); 00078 00081 void AddTriangleWindow (HBaseView & view, ooc::Point const & p1, ooc::Point const & p2, ooc::Point const & p3); 00082 00085 void ClearWindows (); 00086 00089 bool HasWindows () const; 00090 00091 private: 00092 void WorldBoxCorners (ooc::Point const & world_min, ooc::Point const & world_max, ooc::Point (&out_world_points)[8]); 00093 00094 private: 00095 VArray<HWindowInfoOOC> window_infos; 00096 bool deep_filter; 00097 }; 00098 00099 00100