ccCropTool.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  4. //# #
  5. //# This program is free software; you can redistribute it and/or modify #
  6. //# it under the terms of the GNU General Public License as published by #
  7. //# the Free Software Foundation; version 2 or later of the License. #
  8. //# #
  9. //# This program is distributed in the hope that it will be useful, #
  10. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  11. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  12. //# GNU General Public License for more details. #
  13. //# #
  14. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_CROP_TOOL_HEADER
  18. #define CC_CROP_TOOL_HEADER
  19. //qCC_db
  20. #include <ccBBox.h>
  21. class ccHObject;
  22. class ccGLMatrix;
  23. //! Cropping tool
  24. /** Handles clouds and meshes for now
  25. **/
  26. class ccCropTool
  27. {
  28. public:
  29. //! Crops the input entity
  30. /** \param entity entity to be cropped (should be a cloud or a mesh)
  31. \param box cropping box
  32. \param inside whether to keep the points/triangles inside or outside the input box
  33. \param meshRotation optional rotation (for meshes only)
  34. \return cropped entity (if any)
  35. **/
  36. static ccHObject* Crop(ccHObject* entity, const ccBBox& box, bool inside = true, const ccGLMatrix* meshRotation = nullptr);
  37. };
  38. #endif //CC_CROP_TOOL_HEADER